 | |  |  |
飞狐超级均线与极波段源码公式:
DIFF:=指数平滑移动平均(收盘价,6) - 指数平滑移动平均(收盘价,13);
DEA:=指数平滑移动平均(DIFF,5);
DFA:=2.5*(DEA-DIFF);
MACD1:=2*(DIFF-DEA);
MACD2:=指数平滑移动平均(MACD1,3);
x1:=DIFF<=DEA and DFA>=0;
x2:=DIFF>=DEA and DFA<=0;
x3:=DIFF>=向前引用(DIFF,1) AND DEA<向前引用(DEA,1);
x4:=DIFF<向前引用(DIFF,1) AND DEA>向前引用(DEA,1);;
画渐变背景色(收盘价,RGB颜色值(50,60,50),RGB颜色值(80,80,80),1);
{K线}
画柱线(x1 and 开盘价>收盘价,最高价,最低价,0,0),ColorFFA100;//跌阴
画柱线(x1 and 开盘价>收盘价,收盘价,开盘价,7,0),ColorFFA100;
画柱线(x1 and 开盘价<=收盘价,最高价,最低价,0,0),ColorFFA100;//跌阳
画柱线(x1 and 开盘价<=收盘价,收盘价,开盘价,7,1),ColorFFA100;
画柱线(x2 and 开盘价>收盘价,最低价,最高价,0,0),Color5050FF;//涨阴
画柱线(x2 and 开盘价>收盘价,收盘价,开盘价,7,0),Color5050FF;
画柱线(x2 and 开盘价<=收盘价,最低价,最高价,0,0),Color5050FF;//涨阳
画柱线(x2 and 开盘价<=收盘价,收盘价,开盘价,7,1),Color5050FF;
画柱线(x3 and 开盘价>收盘价,最高价,最低价,0,0),COLORGREEN;//低阴
画柱线(x3 and 开盘价>收盘价,收盘价,开盘价,7,0),COLORGREEN;
画柱线(x3 and 开盘价<=收盘价,最高价,最低价,0,0),COLORGREEN;//低阳
画柱线(x3 and 开盘价<=收盘价,收盘价,开盘价,7,1),COLORGREEN;
画柱线(x4 and 开盘价>收盘价,最低价,最高价,0,0),COLORYELLOW;//盘整阴
画柱线(x4 and 开盘价>收盘价,收盘价,开盘价,7,0),COLORYELLOW;
画柱线(x4 and 开盘价<=收盘价,最低价,最高价,0,0),COLORYELLOW;//盘整阳
画柱线(x4 and 开盘价<=收盘价,收盘价,开盘价,7,1),COLORYELLOW;;
{字}
指定位置显示文字(系统参数(3)=数据位置,0,10,2,'■绿买;'),COLORGREEN;
指定位置显示文字(系统参数(3)=数据位置,0,60,2,'■蓝卖;'),ColorFFA100;
指定位置显示文字(系统参数(3)=数据位置,0,110,2,'■红持;'),COLORRED;
指定位置显示文字(系统参数(3)=数据位置,0,160,2,'■黄调整'),COLORYELLOW;
MA5:MA(C,5) colorwhite;
MA10:MA(C,10)coloryellow;
POLYLINE(C,MA(C,20)) color999999;
MA30:MA(C,30)colorgreen;
POLYLINE(C,MA(C,45)) color999999;
MA60:MA(C,60)colormagenta;
POLYLINE(C,MA(C,90)) color999999;
MA120:MA(C,120)colorcyan;
POLYLINE(C,MA(C,150)) color999999;
POLYLINE(C,MA(C,180)) color999999;
POLYLINE(C,MA(C,210)) color999999;
MA250:MA(C,250)colorred; |
| |  | |  |
|