手机端
当前位置:爱约股 > 公式技巧 > 把“ 生命线和大本赢主图 ” 改成同花顺公式

把“ 生命线和大本赢主图 ” 改成同花顺公式

这是两个公式的原码:

生命线


VAR2:=LLV(LOW,10);
VAR3:=HHV(HIGH,25);
小心: 3.2,COLORyellow;
风险: 3.5,COLORblue;
动力线:= EMA((CLOSE-VAR2)/(VAR3-VAR2)*4,4);
STICKLINE(动力线>REF(动力线,1) ,动力线 ,REF(动力线,1),1,0),COLORRED;
STICKLINE(动力线<=REF(动力线,1) ,动力线 ,REF(动力线,1),1,0),COLOR00ff00;
底部:0.2,COLORC6C600;
关注:0.5,COLORFF75FF;
DRAWICON( FILTER(CROSS(动力线,关注),20),动力线+0.02 ,6);
DRAWICON( FILTER(CROSS(动力线,底部),20),动力线+0.02 ,6);
//强弱分界:1.75,COLORred;

趋势:ma(动力线,3);
PARTLINE(趋势>REF(趋势,1),趋势),LINETHICK2,COLORRED;
PARTLINE(趋势<REF(趋势,1),趋势),LINETHICK2,COLORgreen;
//出击:IF((趋势>REF(趋势,1)) AND (REF(趋势,1)<REF(趋势,2)) AND (趋势<1),0.3,0);

大本赢主图
N 缺省 10 最小 10 最大25

dk:=EMA(C,n);
STICKLINE(DK<=CLOSE AND CLOSE>=OPEN,HIGH,CLOSE,0.1,1),COLORRED;
STICKLINE(DK<=CLOSE AND CLOSE>=OPEN,LOW,OPEN,0.1,1),COLORRED;
STICKLINE(DK<=C AND CLOSE>=OPEN,CLOSE,OPEN,8,1),COLORRED;
STICKLINE(DK<=C AND CLOSE<OPEN,HIGH,LOW,0.1,0),COLORRED;
STICKLINE(DK<=C AND CLOSE<OPEN,CLOSE,OPEN,8,0),COLORRED;

STICKLINE(DK>CLOSE AND CLOSE>=OPEN,HIGH,CLOSE,0.1,1),COLORGREEN;
STICKLINE(DK>CLOSE AND CLOSE>=OPEN,LOW,OPEN,0.1,1),COLORGREEN;
STICKLINE(DK>C AND CLOSE>=OPEN,CLOSE,OPEN,8,1),COLORGREEN;
STICKLINE(DK>C AND CLOSE<OPEN,HIGH,LOW,0.1,0),COLORGREEN;
STICKLINE(DK>C AND CLOSE<OPEN,CLOSE,OPEN,8,0),COLORGREEN;

PARTLINE(EMA((2*CLOSE+HIGH+LOW)/4,6)>REF(EMA((2*CLOSE+HIGH+LOW)/4,6),1),EMA((2*CLOSE+HIGH+LOW)/4,5)),colorFF;
PARTLINE(EMA((2*CLOSE+HIGH+LOW)/4,6)<REF(EMA((2*CLOSE+HIGH+LOW)/4,6),1),EMA((2*CLOSE+HIGH+LOW)/4,5)),colorFF00;
PARTLINE(EMA((2*CLOSE+HIGH+LOW)/4,10)>REF(EMA((2*CLOSE+HIGH+LOW)/4,13),1),EMA((2*CLOSE+HIGH+LOW)/4,13)),colorFF;
PARTLINE(EMA((2*CLOSE+HIGH+LOW)/4,10)<REF(EMA((2*CLOSE+HIGH+LOW)/4,13),1),EMA((2*CLOSE+HIGH+LOW)/4,13)),LINETHICK1,colorff00;
PARTLINE(EMA((LOW+CLOSE+OPEN)/3,28)>REF(EMA((LOW+CLOSE+OPEN)/3,28),1),REF(EMA((LOW+CLOSE+OPEN)/3,25),1)),LINETHICK2,colorFF;
PARTLINE(EMA((LOW+CLOSE+OPEN)/3,28)<REF(EMA((LOW+CLOSE+OPEN)/3,28),1),REF(EMA((LOW+CLOSE+OPEN)/3,25),1)),LINETHICK2,colorFF00;
AA1:=AMOUNT/V;
BB1:=L<AA1*0.9;
CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;
DD1:=L<MA(C,5)*0.921;
EE1:=V<MA(V,5)*1.5;
FF1:=BB1 AND CC1 AND DD1 AND EE1;
DRAWTEXT(ff1,(LOW* 0.99),'.'),Colorblue;
A51:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1);
黑马线:=EMA(A51,5);
A54:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;
趋势线:=(MA(3*SMA(A54,6,1)-2*SMA(SMA(A54,5,1),5,1),2));
DRAWTEXT(CROSS(趋势线,0)AND 黑马线<40,(HIGH* 0.97),'.'),COLORwhite;
LC:=REF(CLOSE,1);
RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);
FF:=EMA(CLOSE,3);
MA15:=EMA(CLOSE,21);
DRAWTEXT(CROSS(88,RSI),(HIGH * 1.02),'c'),color00ffff;
VAR2:=LLV(LOW,27);
VAR3:=HHV(HIGH,34);
VAR4:=EMA((CLOSE-Var2)/(Var3-Var2)*4,4)*25;
注买:=IF((Var4<10),80,100);
RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
超跌:=IF(J<0,10,0);
BDDD:=LLV(J,2)=LLV(J,8);
买入:=IF(CROSS(J,REF(J+0.01,1)) AND BDDD AND J<20,30,0);
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
买:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);
DRAWTEXT(filter(买=1,5),LOW-0.03,'.'),Colorred;
 

 

 

解答如下:

VAR2:=LLV(LOW,10);
VAR3:=HHV(HIGH,25);
小心: 3.2,coloryellow;
风险: 3.5,colorblue;
动力线:= EMA((CLOSE-VAR2)/(VAR3-VAR2)*4,4);
STICKLINE(动力线>REF(动力线,1) ,动力线 ,REF(动力线,1),8,0),colorred;
STICKLINE(动力线<=REF(动力线,1) ,动力线 ,REF(动力线,1),8,0),COLOR00ff00;
底部:0.2,COLORC6C600;
关注:0.5,COLORFF75FF;
DRAWICON( FILTER(CROSS(动力线,关注),20),动力线+0.02 ,6);
DRAWICON( FILTER(CROSS(动力线,底部),20),动力线+0.02 ,6);
//强弱分界:1.75,COLORred;

趋势:MA(动力线,3);
//PARTLINE(趋势>REF(趋势,1),趋势),LINETHICK2,colorred;
PARTLINE(趋势,趋势>REF(趋势,1),RGB(250,0,0)),LINETHICK2,colorred;

//PARTLINE(趋势<REF(趋势,1),趋势),LINETHICK2,colorgreen;
PARTLINE(趋势,趋势<REF(趋势,1),RGB(0,250,0)),LINETHICK2,colorgreen;

//出击:IF((趋势>REF(趋势,1)) AND (REF(趋势,1)<REF(趋势,2)) AND (趋势<1),0.3,0);

=====================
N:=10 ;
dk:=EMA(C,n);
STICKLINE(DK<=CLOSE AND CLOSE>=OPEN,HIGH,CLOSE,0.1,1),colorred;
STICKLINE(DK<=CLOSE AND CLOSE>=OPEN,LOW,OPEN,0.1,1),colorred;
STICKLINE(DK<=C AND CLOSE>=OPEN,CLOSE,OPEN,8,1),colorred;
STICKLINE(DK<=C AND CLOSE<OPEN,HIGH,LOW,0.1,0),colorred;
STICKLINE(DK<=C AND CLOSE<OPEN,CLOSE,OPEN,8,0),colorred;
STICKLINE(DK>CLOSE AND CLOSE>=OPEN,HIGH,CLOSE,0.1,1),colorgreen;
STICKLINE(DK>CLOSE AND CLOSE>=OPEN,LOW,OPEN,0.1,1),colorgreen;
STICKLINE(DK>C AND CLOSE>=OPEN,CLOSE,OPEN,8,1),colorgreen;
STICKLINE(DK>C AND CLOSE<OPEN,HIGH,LOW,0.1,0),colorgreen;
STICKLINE(DK>C AND CLOSE<OPEN,CLOSE,OPEN,8,0),colorgreen;
//PARTLINE(EMA((2*CLOSE+HIGH+LOW)/4,6)>REF(EMA((2*CLOSE+HIGH+LOW)/4,6),1),EMA((2*CLOSE+HIGH+LOW)/4,5)),colorFF;
//PARTLINE(EMA((2*CLOSE+HIGH+LOW)/4,6)<REF(EMA((2*CLOSE+HIGH+LOW)/4,6),1),EMA((2*CLOSE+HIGH+LOW)/4,5)),colorFF00;
//PARTLINE(EMA((2*CLOSE+HIGH+LOW)/4,10)>REF(EMA((2*CLOSE+HIGH+LOW)/4,13),1),EMA((2*CLOSE+HIGH+LOW)/4,13)),colorFF;
//PARTLINE(EMA((2*CLOSE+HIGH+LOW)/4,10)<REF(EMA((2*CLOSE+HIGH+LOW)/4,13),1),EMA((2*CLOSE+HIGH+LOW)/4,13)),LINETHICK1,colorff00;
//PARTLINE(EMA((LOW+CLOSE+OPEN)/3,28)>REF(EMA((LOW+CLOSE+OPEN)/3,28),1),REF(EMA((LOW+CLOSE+OPEN)/3,25),1)),LINETHICK2,colorFF;
//PARTLINE(EMA((LOW+CLOSE+OPEN)/3,28)<REF(EMA((LOW+CLOSE+OPEN)/3,28),1),REF(EMA((LOW+CLOSE+OPEN)/3,25),1)),LINETHICK2,colorFF00;
AA1:=AMOUNT/V;
BB1:=L<AA1*0.9;
CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;
DD1:=L<MA(C,5)*0.921;
EE1:=V<MA(V,5)*1.5;
FF1:=BB1 AND CC1 AND DD1 AND EE1;
DRAWTEXT(ff1,(LOW* 0.99),'.'),colorblue;
A51:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1);
黑马线:=EMA(A51,5);
A54:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;
趋势线:=(MA(3*SMA(A54,6,1)-2*SMA(SMA(A54,5,1),5,1),2));
DRAWTEXT(CROSS(趋势线,0)AND 黑马线<40,(HIGH* 0.97),'.'),colorwhite;
LC:=REF(CLOSE,1);
RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);
FF:=EMA(CLOSE,3);
MA15:=EMA(CLOSE,21);
DRAWTEXT(CROSS(88,RSI),(HIGH * 1.02),'c'),color00ffff;
VAR2:=LLV(LOW,27);
VAR3:=HHV(HIGH,34);
VAR4:=EMA((CLOSE-Var2)/(Var3-Var2)*4,4)*25;
注买:=IF((Var4<10),80,100);
RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
超跌:=IF(J<0,10,0);
BDDD:=LLV(J,2)=LLV(J,8);
买入:=IF(CROSS(J,REF(J+0.01,1)) AND BDDD AND J<20,30,0);
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
买:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);
DRAWTEXT(FILTER(买=1,5),LOW-0.03,'.'),colorred;
 

分享至:

相关推荐