抄底逃顶指标公式源码抄底逃顶决策源码
//#@Fname=抄底逃顶趋势决策//#@comment=//#@control=Check#1 趋势线
//#|Check#2 决策密码//#@FuncType=//#@style=:Line516,成交价格,1,0,1,4,920515;
//#@availperiod=2147430400//#@param=N1=1.0000000001,0.0000000001,1.0000000001,1;
N2=0.0000000001,0.0000000001,1.0000000001,1;
//#@isDrawCurve=1//#@Fdesc=抄底逃顶趋势决策//#@defaultperiod=16384//#@coord=M//#@ordinate=0,0.000000;
0,0.000000;
1,20487.000000;
0,0.000000;
0,0.000000;
0;
0,0.000000//#@@FUNCSPEC@=source
LC:=REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
AR:=SUM(HIGH-OPEN,26)/SUM(OPEN-LOW,26)*100;
Varb:=SMA(MAX(CLOSE-LC,0),7,1)/SMA(ABS(CLOSE-LC),7,1)*100;
Varc:=SMA(MAX(CLOSE-LC,0),13,1)/SMA(ABS(CLOSE-LC),13,1)*100;
Vard:=BARSCOUNT(CLOSE);
主力:=EMA( (CLOSE-MA(CLOSE,7))/MA(CLOSE,7)*480,2)*5;
散户:=EMA( (CLOSE-MA(CLOSE,11))/MA(CLOSE,11)*480,7)*5;
dpLC:=REF(INDEXC,1);
dpRSI1:=SMA(MAX(INDEXC-dpLC,0),6,1)/SMA(ABS(INDEXC-dpLC),6,1)*100;
dpAR:=SUM(INDEXH-INDEXO,26)/SUM(INDEXO-INDEXL,26)*100;
dpVarb:=SMA(MAX(INDEXC-dpLC,0),7,1)/SMA(ABS(INDEXC-dpLC),7,1)*100;
dpVarc:=SMA(MAX(INDEXC-dpLC,0),13,1)/SMA(ABS(INDEXC-dpLC),13,1)*100;
dpVard:=BARSCOUNT(INDEXC);
dpzl:=EMA( (INDEXC-MA(INDEXC,7))/MA(INDEXC,7)*480,2)*5;
dpsh:=EMA( (INDEXC-MA(INDEXC,11))/MA(INDEXC,11)*480,7)*5;
DRAWTEXT(CROSS(85,RSI1),HIGH*1.02,'顶'),colorgreen;
DRAWTEXT(CROSS(85,dpRSI1),HIGH*1.02,'系统风险'),coloryellow;
de1:=CROSS(RSI1,25) AND (CROSS(dpRSI1,25) OR dpzl>dpsh);
DRAWTEXT(de1,LOW*0.98,'底'),colorred;
IF((n10 AND n2>0))
{
IF(CLOSE>OPEN)
RETURN "阳";
ELSE IF(CLOSE=CLOSE[1])
RETURN "阳";
ELSE IF(CLOSE==OPEN AND OPEN0))
{
Var1=MONEY/VOL;
A=SMA(Var1,5,1)-SMA(Var1,55,1);
B=SMA((A-SMA(A,5,1)),5,1);
风险系数:B;
IF(CLOSE>MA(CLOSE,5) AND A>REF(A,1) AND B>REF(B,1))
RETURN ("colorred");
IF(CLOSEREF(A,1) AND B>REF(B,1))
RETURN ("colorwhite");
IF(A=MA(CLOSE,20))
RETURN ("colorwhite");
IF(AREF(A,1) AND BREF(B,1))
RETURN ("colorwhite");
}
ELSE IF(n1>0 AND n20,5);
r6:=COUNT(大单净差BBD>0,6);
a1:=IF(C0,2,0);
a6:=IF(DIFF2>0,2,0);
a7:=IF(C>m34,2,0);
a8:=IF(C>m5,2,0);
a9:=IF(r5>3,2,0);
a10:=IF(r6>3,1,0);
az:=a1+a2+a3+a4+a5+a6+a7+a8+a9+a10;
IF(C2.5)
red:=az>2.5;
ELSE green:=az2.5)
RETURN ("colorRED");
IF(az<2.5)
RETURN ("colorgreen");
}
SHGZG;
MONEY;
HIGH;
LOW;
TIPTEXT(ISNULL(REFX(CLOSE,1)),0,' '),colorred;
TIPTEXT(ISNULL(REF(CLOSE,1)),0,'');