该指标5.2版通过但新版本提示函数错误,请老师帮忙,谢谢! [博易POBO]
咨询内容:
QS2:=(MA(CLOSE,4)+MA(CLOSE,8)+MA(CLOSE,16)+MA(CLOSE,32))/4;
QS:=IF(DATAPERIOD-4>0,QS2,0);
VAR1:=EMA(EMA(CLOSE,7),7);
控盘1:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1000;
控盘:=IF(DATAPERIOD-4>0,控盘1,0);
PARTLINE(控盘>0,QS),COLOR0000FF,LINETHICK2;
PARTLINE(控盘<0,QS),COLOR40FF00,LINETHICK2;
KJC1:=QS1*0.93;
KJC:=IF(DATAPERIOD-4>0,KJC1,0);
DRAWTEXT(CROSS(KJC,C) AND C<KJC,L*0.99,'空单减仓'),COLORYELLOW;
DRAWICON(CROSS(KJC,C) AND C<KJC,L,8);
DRAWICON(控盘>0 AND C>REF(C,1) AND QS>0,QS,8);
DRAWICON(控盘<0 AND C<REF(C,1) AND QS>0,QS,14);
MI1:=C-REF(C,1);
MI:=IF(DATAPERIOD-4>0,MI1,0);
AMI1:=SMA(MI,3,1);
AMI:=IF(DATAPERIOD-4>0,AMI1,0);
F:=MA(REF(AMI,1),10)-MA(REF(AMI,1),20);
D:=SMA(F,10,1);
DRAWICON(CROSS(D,F) AND 控盘>0,H,11);
{DRAWTEXT(CROSS(D,F) AND C>QS1,H*1.018,'预警'),COLORMAGENTA;}
{AA1:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,30))/MA(CLOSE,30);
AA:=IF(DATAPERIOD-4>0,AA1,0);
支撑线:=DMA((2*CLOSE+LOW+HIGH)/4,AA),LINETHICK2,COLORMAGENTA;
CC:=(CLOSE/支撑线);
MA1:=MA(CC*(2*CLOSE+HIGH+LOW)/4,3);
MAAA:=((MA1-支撑线)/支撑线)/3;
TMP1:=MA1-MAAA*MA1;
TMP:=IF(DATAPERIOD-4>0,TMP1,0);
PARTLINE(TMP-支撑线<0 AND TMP>0,支撑线),LINETHICK2,COLORYELLOW;
PARTLINE(TMP-支撑线>0 AND TMP>0,支撑线),LINETHICK2,COLORMAGENTA;}
STICKLINE(控盘>0,H,L,0,0),COLOR5555FF;{红K}
STICKLINE(控盘>0,C,O,4,0),COLOR0000AA;
STICKLINE(控盘>0,C,O,3,0),COLOR0000CC;
STICKLINE(控盘>0,C,O,2,0),COLOR0000EE;
STICKLINE(控盘>0,C,O,1,0),COLOR5555FF;
STICKLINE(控盘>0,C,O,0,0),COLOR8080FF;
STICKLINE(控盘<0,H,L,0,0),COLORFFFF15;{绿K}
STICKLINE(控盘<0,C,O,4.1,0),COLOR515100;
STICKLINE(控盘<0,C,O,3,0),COLOR919100;
STICKLINE(控盘<0,C,O,2,0),COLORCACA00;
STICKLINE(控盘<0,C,O,1,0),COLORFFFF15;
STICKLINE(控盘<0,C,O,0,0),COLORFFFFAC;
{如下短线指标}
SAR1:=SAR_POBO(7,2,10),CIRCLEDOT;
SAR:=IF(DATAPERIOD-4>0,0,SAR1);
QSA:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
QSA1:=(MA(CLOSE,2)+MA(CLOSE,4)+MA(CLOSE,8)+MA(CLOSE,16))/4;
PARTLINE(C>SAR AND SAR>0,QSA1),COLOR0000FF,LINETHICK2;
PARTLINE(C<SAR AND SAR>0,QSA1),COLOR40FF00,LINETHICK2;
压力支持位1:=MA(CLOSE,26);{压力支撑线}
线条1:=MA(CLOSE,28);
线条:=IF(DATAPERIOD-4>0,0,压力支持位1);
压力支持位:=IF(DATAPERIOD-4>0,0,线条1);
PARTLINE(C>压力支持位1 AND 压力支持位1>0,线条1),COLORFF00FF,LINETHICK2;
PARTLINE(C<压力支持位1 AND 压力支持位1>0,线条1),COLOR00FFFF,LINETHICK2;
PARTLINE(C=压力支持位1 AND 压力支持位1>0,线条1),COLOR000000,LINETHICK2;
DRAWICON(CROSS(C,SAR),L*0.9995,5);{B,S点}
DRAWICON(CROSS(SAR,C),H*1.0008,9);
DRAWICON(C<SAR AND C<REF(C,1)*0.9995 AND DATAPERIOD-4<=0,QSA1,14);{加速点}
DRAWICON(C>SAR AND C>REF(C,1)*1.0005 AND DATAPERIOD-4<=0,QSA1,8);
STICKLINE(C>SAR AND SAR>0,H,L,0,0),COLOR5555FF;{红色K}
STICKLINE(C>SAR AND SAR>0,C,O,4,0),COLOR0000AA;
STICKLINE(C>SAR AND SAR>0,C,O,3,0),COLOR0000CC;
STICKLINE(C>SAR AND SAR>0,C,O,2,0),COLOR0000EE;
STICKLINE(C>SAR AND SAR>0,C,O,1,0),COLOR5555FF;
STICKLINE(C>SAR AND SAR>0,C,O,0.1,0),COLOR8080FF;
STICKLINE(C<SAR,H,L,0,0),COLORFFFF15;{绿色K}
STICKLINE(C<SAR,C,O,4.1,0),COLOR515100;
STICKLINE(C<SAR,C,O,3,0),COLOR919100;
STICKLINE(C<SAR,C,O,2,0),COLORCACA00;
STICKLINE(C<SAR,C,O,1,0),COLORFFFF15;
STICKLINE(C<SAR,C,O,0.1,0),COLORFFFFAC;
{多空气象
MA3:=MA(C,170);
DRAWGBK(MA3>C,COLORRGB(0,0,0),COLORRGB(9,60,1),0);
DRAWGBK(MA3<C,COLORRGB(0,0,0),COLORRGB(62,1,1),0);
DRAWGBK(MA3=0,COLORRGB(0,0,0),COLORRGB(0,0,0),0);}
{减仓信号
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K1:=SMA(RSV,3,1);
D1:=SMA(K1,3,1);
DRAWICON(CROSS(K1,D1) AND 控盘5<0 AND K1<30,L,3);
DRAWICON(CROSS(D1,K1) AND 控盘5>0 AND K1>70,H,10);
DRAWTEXT(CROSS(K1,D1) AND 控盘5<0 AND K1<30,L*0.9993,'空减仓'),COLORFF00FF;
DRAWTEXT(CROSS(D1,K1) AND 控盘5>0 AND K1>70,H*1.001,'多减仓'),COLOR80FF80;}
QS2:=(MA(CLOSE,4)+MA(CLOSE,8)+MA(CLOSE,16)+MA(CLOSE,32))/4;
QS:=IF(DATAPERIOD-4>0,QS2,0);
VAR1:=EMA(EMA(CLOSE,7),7);
控盘1:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1000;
控盘:=IF(DATAPERIOD-4>0,控盘1,0);
PARTLINE(控盘>0,QS),COLOR0000FF,LINETHICK2;
PARTLINE(控盘<0,QS),COLOR40FF00,LINETHICK2;
KJC1:=QS1*0.93;
KJC:=IF(DATAPERIOD-4>0,KJC1,0);
DRAWTEXT(CROSS(KJC,C) AND C<KJC,L*0.99,'空单减仓'),COLORYELLOW;
DRAWICON(CROSS(KJC,C) AND C<KJC,L,8);
DRAWICON(控盘>0 AND C>REF(C,1) AND QS>0,QS,8);
DRAWICON(控盘<0 AND C<REF(C,1) AND QS>0,QS,14);
MI1:=C-REF(C,1);
MI:=IF(DATAPERIOD-4>0,MI1,0);
AMI1:=SMA(MI,3,1);
AMI:=IF(DATAPERIOD-4>0,AMI1,0);
F:=MA(REF(AMI,1),10)-MA(REF(AMI,1),20);
D:=SMA(F,10,1);
DRAWICON(CROSS(D,F) AND 控盘>0,H,11);
{DRAWTEXT(CROSS(D,F) AND C>QS1,H*1.018,'预警'),COLORMAGENTA;}
{AA1:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,30))/MA(CLOSE,30);
AA:=IF(DATAPERIOD-4>0,AA1,0);
支撑线:=DMA((2*CLOSE+LOW+HIGH)/4,AA),LINETHICK2,COLORMAGENTA;
CC:=(CLOSE/支撑线);
MA1:=MA(CC*(2*CLOSE+HIGH+LOW)/4,3);
MAAA:=((MA1-支撑线)/支撑线)/3;
TMP1:=MA1-MAAA*MA1;
TMP:=IF(DATAPERIOD-4>0,TMP1,0);
PARTLINE(TMP-支撑线<0 AND TMP>0,支撑线),LINETHICK2,COLORYELLOW;
PARTLINE(TMP-支撑线>0 AND TMP>0,支撑线),LINETHICK2,COLORMAGENTA;}
STICKLINE(控盘>0,H,L,0,0),COLOR5555FF;{红K}
STICKLINE(控盘>0,C,O,4,0),COLOR0000AA;
STICKLINE(控盘>0,C,O,3,0),COLOR0000CC;
STICKLINE(控盘>0,C,O,2,0),COLOR0000EE;
STICKLINE(控盘>0,C,O,1,0),COLOR5555FF;
STICKLINE(控盘>0,C,O,0,0),COLOR8080FF;
STICKLINE(控盘<0,H,L,0,0),COLORFFFF15;{绿K}
STICKLINE(控盘<0,C,O,4.1,0),COLOR515100;
STICKLINE(控盘<0,C,O,3,0),COLOR919100;
STICKLINE(控盘<0,C,O,2,0),COLORCACA00;
STICKLINE(控盘<0,C,O,1,0),COLORFFFF15;
STICKLINE(控盘<0,C,O,0,0),COLORFFFFAC;
{如下短线指标}
SAR1:=SAR_POBO(7,2,10),CIRCLEDOT;
SAR2:=IF(DATAPERIOD-4>0,0,SAR1);
QSA:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
QSA1:=(MA(CLOSE,2)+MA(CLOSE,4)+MA(CLOSE,8)+MA(CLOSE,16))/4;
PARTLINE(C>SAR2 AND SAR2>0,QSA1),COLOR0000FF,LINETHICK2;
PARTLINE(C<SAR2 AND SAR2>0,QSA1),COLOR40FF00,LINETHICK2;
压力支持位1:=MA(CLOSE,26);{压力支撑线}
线条1:=MA(CLOSE,28);
线条:=IF(DATAPERIOD-4>0,0,压力支持位1);
压力支持位:=IF(DATAPERIOD-4>0,0,线条1);
PARTLINE(C>压力支持位1 AND 压力支持位1>0,线条1),COLORFF00FF,LINETHICK2;
PARTLINE(C<压力支持位1 AND 压力支持位1>0,线条1),COLOR00FFFF,LINETHICK2;
PARTLINE(C=压力支持位1 AND 压力支持位1>0,线条1),COLOR000000,LINETHICK2;
DRAWICON(CROSS(C,SAR2),L*0.9995,5);{B,S点}
DRAWICON(CROSS(SAR2,C),H*1.0008,9);
DRAWICON(C<SAR2 AND C<REF(C,1)*0.9995 AND DATAPERIOD-4<=0,QSA1,14);{加速点}
DRAWICON(C>SAR2 AND C>REF(C,1)*1.0005 AND DATAPERIOD-4<=0,QSA1,8);
STICKLINE(C>SAR2 AND SAR2>0,H,L,0,0),COLOR5555FF;{红色K}
STICKLINE(C>SAR2 AND SAR2>0,C,O,4,0),COLOR0000AA;
STICKLINE(C>SAR2 AND SAR2>0,C,O,3,0),COLOR0000CC;
STICKLINE(C>SAR2 AND SAR2>0,C,O,2,0),COLOR0000EE;
STICKLINE(C>SAR2 AND SAR2>0,C,O,1,0),COLOR5555FF;
STICKLINE(C>SAR2 AND SAR2>0,C,O,0.1,0),COLOR8080FF;
STICKLINE(C<SAR2,H,L,0,0),COLORFFFF15;{绿色K}
STICKLINE(C<SAR2,C,O,4.1,0),COLOR515100;
STICKLINE(C<SAR2,C,O,3,0),COLOR919100;
STICKLINE(C<SAR2,C,O,2,0),COLORCACA00;
STICKLINE(C<SAR2,C,O,1,0),COLORFFFF15;
STICKLINE(C<SAR2,C,O,0.1,0),COLORFFFFAC;
{多空气象
MA3:=MA(C,170);
DRAWGBK(MA3>C,COLORRGB(0,0,0),COLORRGB(9,60,1),0);
DRAWGBK(MA3<C,COLORRGB(0,0,0),COLORRGB(62,1,1),0);
DRAWGBK(MA3=0,COLORRGB(0,0,0),COLORRGB(0,0,0),0);}
{减仓信号
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K1:=SMA(RSV,3,1);
D1:=SMA(K1,3,1);
DRAWICON(CROSS(K1,D1) AND 控盘5<0 AND K1<30,L,3);
DRAWICON(CROSS(D1,K1) AND 控盘5>0 AND K1>70,H,10);
DRAWTEXT(CROSS(K1,D1) AND 控盘5<0 AND K1<30,L*0.9993,'空减仓'),COLORFF00FF;
DRAWTEXT(CROSS(D1,K1) AND 控盘5>0 AND K1>70,H*1.001,'多减仓'),COLOR80FF80;}
谢谢老师! 来源 程序化久久网
该指标5.2版通过但新版本提示函数错误,请老师帮忙,谢谢!
QS1:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;QS2:=(MA(CLOSE,4)+MA(CLOSE,8)+MA(CLOSE,16)+MA(CLOSE,32))/4;
QS:=IF(DATAPERIOD-4>0,QS2,0);
VAR1:=EMA(EMA(CLOSE,7),7);
控盘1:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1000;
控盘:=IF(DATAPERIOD-4>0,控盘1,0);
PARTLINE(控盘>0,QS),COLOR0000FF,LINETHICK2;
PARTLINE(控盘<0,QS),COLOR40FF00,LINETHICK2;
KJC1:=QS1*0.93;
KJC:=IF(DATAPERIOD-4>0,KJC1,0);
DRAWTEXT(CROSS(KJC,C) AND C<KJC,L*0.99,'空单减仓'),COLORYELLOW;
DRAWICON(CROSS(KJC,C) AND C<KJC,L,8);
DRAWICON(控盘>0 AND C>REF(C,1) AND QS>0,QS,8);
DRAWICON(控盘<0 AND C<REF(C,1) AND QS>0,QS,14);
MI1:=C-REF(C,1);
MI:=IF(DATAPERIOD-4>0,MI1,0);
AMI1:=SMA(MI,3,1);
AMI:=IF(DATAPERIOD-4>0,AMI1,0);
F:=MA(REF(AMI,1),10)-MA(REF(AMI,1),20);
D:=SMA(F,10,1);
DRAWICON(CROSS(D,F) AND 控盘>0,H,11);
{DRAWTEXT(CROSS(D,F) AND C>QS1,H*1.018,'预警'),COLORMAGENTA;}
{AA1:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,30))/MA(CLOSE,30);
AA:=IF(DATAPERIOD-4>0,AA1,0);
支撑线:=DMA((2*CLOSE+LOW+HIGH)/4,AA),LINETHICK2,COLORMAGENTA;
CC:=(CLOSE/支撑线);
MA1:=MA(CC*(2*CLOSE+HIGH+LOW)/4,3);
MAAA:=((MA1-支撑线)/支撑线)/3;
TMP1:=MA1-MAAA*MA1;
TMP:=IF(DATAPERIOD-4>0,TMP1,0);
PARTLINE(TMP-支撑线<0 AND TMP>0,支撑线),LINETHICK2,COLORYELLOW;
PARTLINE(TMP-支撑线>0 AND TMP>0,支撑线),LINETHICK2,COLORMAGENTA;}
STICKLINE(控盘>0,H,L,0,0),COLOR5555FF;{红K}
STICKLINE(控盘>0,C,O,4,0),COLOR0000AA;
STICKLINE(控盘>0,C,O,3,0),COLOR0000CC;
STICKLINE(控盘>0,C,O,2,0),COLOR0000EE;
STICKLINE(控盘>0,C,O,1,0),COLOR5555FF;
STICKLINE(控盘>0,C,O,0,0),COLOR8080FF;
STICKLINE(控盘<0,H,L,0,0),COLORFFFF15;{绿K}
STICKLINE(控盘<0,C,O,4.1,0),COLOR515100;
STICKLINE(控盘<0,C,O,3,0),COLOR919100;
STICKLINE(控盘<0,C,O,2,0),COLORCACA00;
STICKLINE(控盘<0,C,O,1,0),COLORFFFF15;
STICKLINE(控盘<0,C,O,0,0),COLORFFFFAC;
{如下短线指标}
SAR1:=SAR_POBO(7,2,10),CIRCLEDOT;
SAR:=IF(DATAPERIOD-4>0,0,SAR1);
QSA:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
QSA1:=(MA(CLOSE,2)+MA(CLOSE,4)+MA(CLOSE,8)+MA(CLOSE,16))/4;
PARTLINE(C>SAR AND SAR>0,QSA1),COLOR0000FF,LINETHICK2;
PARTLINE(C<SAR AND SAR>0,QSA1),COLOR40FF00,LINETHICK2;
压力支持位1:=MA(CLOSE,26);{压力支撑线}
线条1:=MA(CLOSE,28);
线条:=IF(DATAPERIOD-4>0,0,压力支持位1);
压力支持位:=IF(DATAPERIOD-4>0,0,线条1);
PARTLINE(C>压力支持位1 AND 压力支持位1>0,线条1),COLORFF00FF,LINETHICK2;
PARTLINE(C<压力支持位1 AND 压力支持位1>0,线条1),COLOR00FFFF,LINETHICK2;
PARTLINE(C=压力支持位1 AND 压力支持位1>0,线条1),COLOR000000,LINETHICK2;
DRAWICON(CROSS(C,SAR),L*0.9995,5);{B,S点}
DRAWICON(CROSS(SAR,C),H*1.0008,9);
DRAWICON(C<SAR AND C<REF(C,1)*0.9995 AND DATAPERIOD-4<=0,QSA1,14);{加速点}
DRAWICON(C>SAR AND C>REF(C,1)*1.0005 AND DATAPERIOD-4<=0,QSA1,8);
STICKLINE(C>SAR AND SAR>0,H,L,0,0),COLOR5555FF;{红色K}
STICKLINE(C>SAR AND SAR>0,C,O,4,0),COLOR0000AA;
STICKLINE(C>SAR AND SAR>0,C,O,3,0),COLOR0000CC;
STICKLINE(C>SAR AND SAR>0,C,O,2,0),COLOR0000EE;
STICKLINE(C>SAR AND SAR>0,C,O,1,0),COLOR5555FF;
STICKLINE(C>SAR AND SAR>0,C,O,0.1,0),COLOR8080FF;
STICKLINE(C<SAR,H,L,0,0),COLORFFFF15;{绿色K}
STICKLINE(C<SAR,C,O,4.1,0),COLOR515100;
STICKLINE(C<SAR,C,O,3,0),COLOR919100;
STICKLINE(C<SAR,C,O,2,0),COLORCACA00;
STICKLINE(C<SAR,C,O,1,0),COLORFFFF15;
STICKLINE(C<SAR,C,O,0.1,0),COLORFFFFAC;
{多空气象
MA3:=MA(C,170);
DRAWGBK(MA3>C,COLORRGB(0,0,0),COLORRGB(9,60,1),0);
DRAWGBK(MA3<C,COLORRGB(0,0,0),COLORRGB(62,1,1),0);
DRAWGBK(MA3=0,COLORRGB(0,0,0),COLORRGB(0,0,0),0);}
{减仓信号
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K1:=SMA(RSV,3,1);
D1:=SMA(K1,3,1);
DRAWICON(CROSS(K1,D1) AND 控盘5<0 AND K1<30,L,3);
DRAWICON(CROSS(D1,K1) AND 控盘5>0 AND K1>70,H,10);
DRAWTEXT(CROSS(K1,D1) AND 控盘5<0 AND K1<30,L*0.9993,'空减仓'),COLORFF00FF;
DRAWTEXT(CROSS(D1,K1) AND 控盘5>0 AND K1>70,H*1.001,'多减仓'),COLOR80FF80;}
来源:程序化99网( WWW.CXH99.COM )
博易技术人员: QS1:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;QS2:=(MA(CLOSE,4)+MA(CLOSE,8)+MA(CLOSE,16)+MA(CLOSE,32))/4;
QS:=IF(DATAPERIOD-4>0,QS2,0);
VAR1:=EMA(EMA(CLOSE,7),7);
控盘1:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1000;
控盘:=IF(DATAPERIOD-4>0,控盘1,0);
PARTLINE(控盘>0,QS),COLOR0000FF,LINETHICK2;
PARTLINE(控盘<0,QS),COLOR40FF00,LINETHICK2;
KJC1:=QS1*0.93;
KJC:=IF(DATAPERIOD-4>0,KJC1,0);
DRAWTEXT(CROSS(KJC,C) AND C<KJC,L*0.99,'空单减仓'),COLORYELLOW;
DRAWICON(CROSS(KJC,C) AND C<KJC,L,8);
DRAWICON(控盘>0 AND C>REF(C,1) AND QS>0,QS,8);
DRAWICON(控盘<0 AND C<REF(C,1) AND QS>0,QS,14);
MI1:=C-REF(C,1);
MI:=IF(DATAPERIOD-4>0,MI1,0);
AMI1:=SMA(MI,3,1);
AMI:=IF(DATAPERIOD-4>0,AMI1,0);
F:=MA(REF(AMI,1),10)-MA(REF(AMI,1),20);
D:=SMA(F,10,1);
DRAWICON(CROSS(D,F) AND 控盘>0,H,11);
{DRAWTEXT(CROSS(D,F) AND C>QS1,H*1.018,'预警'),COLORMAGENTA;}
{AA1:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,30))/MA(CLOSE,30);
AA:=IF(DATAPERIOD-4>0,AA1,0);
支撑线:=DMA((2*CLOSE+LOW+HIGH)/4,AA),LINETHICK2,COLORMAGENTA;
CC:=(CLOSE/支撑线);
MA1:=MA(CC*(2*CLOSE+HIGH+LOW)/4,3);
MAAA:=((MA1-支撑线)/支撑线)/3;
TMP1:=MA1-MAAA*MA1;
TMP:=IF(DATAPERIOD-4>0,TMP1,0);
PARTLINE(TMP-支撑线<0 AND TMP>0,支撑线),LINETHICK2,COLORYELLOW;
PARTLINE(TMP-支撑线>0 AND TMP>0,支撑线),LINETHICK2,COLORMAGENTA;}
STICKLINE(控盘>0,H,L,0,0),COLOR5555FF;{红K}
STICKLINE(控盘>0,C,O,4,0),COLOR0000AA;
STICKLINE(控盘>0,C,O,3,0),COLOR0000CC;
STICKLINE(控盘>0,C,O,2,0),COLOR0000EE;
STICKLINE(控盘>0,C,O,1,0),COLOR5555FF;
STICKLINE(控盘>0,C,O,0,0),COLOR8080FF;
STICKLINE(控盘<0,H,L,0,0),COLORFFFF15;{绿K}
STICKLINE(控盘<0,C,O,4.1,0),COLOR515100;
STICKLINE(控盘<0,C,O,3,0),COLOR919100;
STICKLINE(控盘<0,C,O,2,0),COLORCACA00;
STICKLINE(控盘<0,C,O,1,0),COLORFFFF15;
STICKLINE(控盘<0,C,O,0,0),COLORFFFFAC;
{如下短线指标}
SAR1:=SAR_POBO(7,2,10),CIRCLEDOT;
SAR2:=IF(DATAPERIOD-4>0,0,SAR1);
QSA:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
QSA1:=(MA(CLOSE,2)+MA(CLOSE,4)+MA(CLOSE,8)+MA(CLOSE,16))/4;
PARTLINE(C>SAR2 AND SAR2>0,QSA1),COLOR0000FF,LINETHICK2;
PARTLINE(C<SAR2 AND SAR2>0,QSA1),COLOR40FF00,LINETHICK2;
压力支持位1:=MA(CLOSE,26);{压力支撑线}
线条1:=MA(CLOSE,28);
线条:=IF(DATAPERIOD-4>0,0,压力支持位1);
压力支持位:=IF(DATAPERIOD-4>0,0,线条1);
PARTLINE(C>压力支持位1 AND 压力支持位1>0,线条1),COLORFF00FF,LINETHICK2;
PARTLINE(C<压力支持位1 AND 压力支持位1>0,线条1),COLOR00FFFF,LINETHICK2;
PARTLINE(C=压力支持位1 AND 压力支持位1>0,线条1),COLOR000000,LINETHICK2;
DRAWICON(CROSS(C,SAR2),L*0.9995,5);{B,S点}
DRAWICON(CROSS(SAR2,C),H*1.0008,9);
DRAWICON(C<SAR2 AND C<REF(C,1)*0.9995 AND DATAPERIOD-4<=0,QSA1,14);{加速点}
DRAWICON(C>SAR2 AND C>REF(C,1)*1.0005 AND DATAPERIOD-4<=0,QSA1,8);
STICKLINE(C>SAR2 AND SAR2>0,H,L,0,0),COLOR5555FF;{红色K}
STICKLINE(C>SAR2 AND SAR2>0,C,O,4,0),COLOR0000AA;
STICKLINE(C>SAR2 AND SAR2>0,C,O,3,0),COLOR0000CC;
STICKLINE(C>SAR2 AND SAR2>0,C,O,2,0),COLOR0000EE;
STICKLINE(C>SAR2 AND SAR2>0,C,O,1,0),COLOR5555FF;
STICKLINE(C>SAR2 AND SAR2>0,C,O,0.1,0),COLOR8080FF;
STICKLINE(C<SAR2,H,L,0,0),COLORFFFF15;{绿色K}
STICKLINE(C<SAR2,C,O,4.1,0),COLOR515100;
STICKLINE(C<SAR2,C,O,3,0),COLOR919100;
STICKLINE(C<SAR2,C,O,2,0),COLORCACA00;
STICKLINE(C<SAR2,C,O,1,0),COLORFFFF15;
STICKLINE(C<SAR2,C,O,0.1,0),COLORFFFFAC;
{多空气象
MA3:=MA(C,170);
DRAWGBK(MA3>C,COLORRGB(0,0,0),COLORRGB(9,60,1),0);
DRAWGBK(MA3<C,COLORRGB(0,0,0),COLORRGB(62,1,1),0);
DRAWGBK(MA3=0,COLORRGB(0,0,0),COLORRGB(0,0,0),0);}
{减仓信号
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K1:=SMA(RSV,3,1);
D1:=SMA(K1,3,1);
DRAWICON(CROSS(K1,D1) AND 控盘5<0 AND K1<30,L,3);
DRAWICON(CROSS(D1,K1) AND 控盘5>0 AND K1>70,H,10);
DRAWTEXT(CROSS(K1,D1) AND 控盘5<0 AND K1<30,L*0.9993,'空减仓'),COLORFF00FF;
DRAWTEXT(CROSS(D1,K1) AND 控盘5>0 AND K1>70,H*1.001,'多减仓'),COLOR80FF80;}
谢谢老师! 来源 程序化久久网
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容