{FSKY 引用名源码如下}
今量:VOL;
昨量:REF(VOL,1);
前量:REF(VOL,2);
昨开:REF(O,1);
昨收:REF(C,1);
前开:REF(O,2);
前收:REF(C,2);
{引用名:FSKY};
{分主图反MACD源码如下}
{分时主图}
{反转MACD 参数: P, 0, 20, 4;}
前量:="FSKY.前量#DAY";
昨量:="FSKY.昨量#DAY";
今量:="FSKY.今量#DAY";
前总:=前量;
昨总:=昨量;
总:=今量,NODRAW;
BMM:=MAX(前总,昨总);
AMM:=IF(总/BMM>2,BMM*3,BMM);
MM:=200/AMM;
KP:=DYNAINFO(4);
ZX:=DYNAINFO(7);
A1:=IF(ZX>=KP,355,0);
A2:=IF(ZX>=KP,0,355);
A3:=IF(ZX>=KP,0,0);
DRAWRECTREL(0,80,MM*今量,110,RGB(A1,A2,A3));
昨开:="FSKY.昨开#DAY";
昨收:="FSKY.昨收#DAY";
A4:=IF(昨收>=昨开,355,0);
A5:=IF(昨收>=昨开,0,355);
A6:=IF(昨收>=昨开,0,0);
DRAWRECTREL(0,40,MM*昨量,70,RGB(A4,A5,A6));
前开:="FSKY.前开#DAY";
前收:="FSKY.前收#DAY";
A7:=IF(前收>=前开,355,0);
A8:=IF(前收>=前开,0,355);
A9:=IF(前收>=前开,0,0);
DRAWRECTREL(0,0,MM*前量,30,RGB(A7,A8,A9));
{MACD P:1,20,4;}
RC:=DYNAINFO( 3);
S2:=SMA(C,2,1);
S6:=SMA(C,6,1);
DK:=2*(S2-S6);
STICKLINE(DK>0,RC,RC+DK,0,1),COLOR0000AA;
STICKLINE(DK<0,RC,RC+DK,0,1),COLOR00AA00;
R1:=MA(C,13);
R2:=SMA(R1,5,2);
DRAWBAND(R1,RGB(255,0,125),R2,RGB(0,111,255));
C,LINETHICK2,COLORDDDDDD;
箱底:LLV(MA((LOW),5),30),COLORLIMAGENTA ,LINETHICK2;
箱顶:HHV(MA((HIGH),6),30),COLORGREEN,LINETHICK2;
预测低一:"分时预测.预测低一#DAY",LINETHICK2,COLORLIGREEN;
DRAWTEXT(ISLASTBAR,预测低一,' 低一'),COLORLIGREEN;
预测低二:"分时预测.预测低二#DAY",LINETHICK2,COLORLICYAN;
DRAWTEXT(ISLASTBAR,预测低二,' 低二'),COLORLICYAN;
预测高一:"分时预测.预测高一#DAY",LINETHICK2,COLORYELLOW;
DRAWTEXT(ISLASTBAR,预测高一,' 高一'),COLORYELLOW;
预测高二:"分时预测.预测高二#DAY",LINETHICK2,COLORRED;
DRAWTEXT(ISLASTBAR,预测高二,' 高二'),COLORRED;
DRAWTEXT_FIX(1,0.36,0.0,0,'预测高二:'),COLORGREEN;
DRAWNUMBER_FIX(1,0.42,0.0,0,CONST(预测高二)),COLORGREEN;
DRAWTEXT_FIX(1,0.24,0.0,0,'预测高一:'),COLORGREEN;
DRAWNUMBER_FIX(1,0.30,0.0,0,CONST(预测高一)),COLORGREEN;
DRAWTEXT_FIX(1,0.48,0.0,0,'预测低一:'),COLORRED;
DRAWTEXT_FIX(1,0.60,0,0,'预测低二:'),COLORRED;
DRAWNUMBER_FIX(1,0.54.0,0,0,CONST(预测低一)),COLORRED;
DRAWNUMBER_FIX(1,0.66,0,0,CONST(预测低二)),COLORRED;
阻力1:"关键点位.阻力1#DAY",POINTDOT,COLORBLUE;
DRAWTEXT(ISLASTBAR,阻力1,' 阻力1'),COLORBLUE;
{关键点:"关键点位.关键点位#DAY",POINTDOT,COLORWHITE;}
支撑1:"关键点位.支撑1#DAY",POINTDOT,COLORBLUE;
DRAWTEXT(ISLASTBAR,支撑1,' 支撑1'),COLORBLUE;
{分时预测源码如下}
{引用名:分时预测}
N:=35;
{N 1 999 35}
AL2:=ABS((REF(C,1)-(REF(O,1)))/(REF(O,1)));
AL3:=ABS((REF(H,1)-(REF(O,1)))/(REF(O,1)));
AL4:=ABS((REF(L,1)-(REF(O,1)))/(REF(O,1)));
ELE:=(((REF(HIGH,1))+(REF(LOW,1))+(REF(OPEN,1))+2*(REF(CLOSE,1)))/5);
上升突破价:=(ELE+((REF(HIGH,1))-(REF(LOW,1))));
上升阻力价:=(2*ELE-(REF(LOW,1)));
下跌支撑价:=(2*ELE-(REF(HIGH,1)));
下跌反转价:=(ELE-((REF(HIGH,1))-(REF(LOW,1))));
预测低一:O-(O*(ABS((AL2+AL3+AL4)/3)));
预测低二:(预测低一+((((ELE+上升突破价+上升阻力价+下跌支撑价+下跌反转价)/5)+O)/2))/2;
{预测当天最高价公式}
预测高一:O+(O*(ABS((AL2+AL3+AL4)/3)));
预测高二:MA(REF(HIGH,1)/REF(CLOSE,2),N)*REF(CLOSE,1);
{关键点位源码如下}
关键点位:(REF(H,1)+REF(L,1)+REF(C,1))/3,COLORGRAY;
阻力3:REF(H,1)-2*((REF(L,1)-关键点位)),COLORGREEN;
阻力2:关键点位+(REF(H,1)-REF(L,1)),COLORYELLOW;
阻力1:2*关键点位-REF(L,1),COLORBLUE;
支撑1:2*关键点位-REF(H,1),COLORBLUE;
支撑2:关键点位-(REF(H,1)-REF(L,1)),COLORYELLOW;
支撑3:REF(L,1)-2*(REF(H,1)-关键点位),COLORGREEN;
{引用名:关键点位};