龙听期货论坛's Archiver

C
+
+


 微信: QQ:

龙听 发表于 2018-12-15 10:14

太阳操盘指标源码及使用方法(主图+副图)[大智慧公式]

[code]
{太阳操盘主图}

FL:MA(CLOSE,17)+ABS(MA(CLOSE,17)-ref(MA(CLOSE,17),2)),PRECIS2,colorf4e202;
FS:MA(CLOSE,17)+MA(CLOSE,17)-ref(MA(CLOSE,17),2),PRECIS2,colorf4e202,LINETHICK1;
CG:IF(MA(CLOSE,17)<FS,FS,MA(CLOSE,17)),PRECIS2,colorf4e202,LINETHICK1;
MA6:=MA(CLOSE,6);
MA18:=MA(CLOSE,18);
MA3:=(3)*(MA18) - (2)*(MA6);
小波段:(3)*(MA6) - (2)*(MA18),LINETHICK1,COLOR87B08B;
PARTLINE(cg,cg=fs and cg=fl,RGB(241,225,22)),LINETHICK2;
PARTLINE(小波段,小波段<ref(小波段,1),RGB(0,225,255),小波段>ref(小波段,1),RGB(241,225,22)),LINETHICK1;
牛熊线:MA(C,89),PRECIS2,colorred,LINETHICK2;
{高位减仓}{本文来源 黑马炒股秘籍网}
X:=EMA(((SLOPE(CLOSE,21) * 20) + CLOSE),68);
Y:=EMA(CLOSE,10);
LL:=ref(CLOSE,2);
CXH:=STRTONUM(STRRIGHT(DATESTR(CURRENTDATE),1));
WARNING('',CURRENTTIME>180000 and (CXH=4 OR CXH=9));
MM:=((SMA(MAX((CLOSE - LL),0),6,1) / SMA(ABS((CLOSE - LL)),6,1)) * 100);
DB:=IF(((MM < ref(MM,1)) AND (MM > 79)),MM,0);
DRAWicon(DB,(HIGH * 1.005),2);
DRAWTEXT(DB,(HIGH * 1.05),'减仓'),LINETHICK2,colorFF6699;
[/code]

[code]
{太阳仓位副图}



参数
{参数1 p1: 5, 2 ,20}
{参数2 p2: 4, 2 ,20}

源码:


减仓线:70, POINTDOT,COLOryelLOW;
增仓线:45, POINTDOT,colorf4e202;
var1:=LLV(LOW,P1);
var2:=HHV(HIGH,P1);
黄线上穿增: EMA((CLOSE-var1)/(var2-var1)*100,P2),COLOryelLOW,LINETHICK1;
CXH:=STRTONUM(STRRIGHT(DATESTR(CURRENTDATE),1));
WARNING('',CURRENTTIME>180000 and (CXH=4 OR CXH=9));
黄线下穿减: EMA(0.667*ref(黄线上穿增,1)+0.333*黄线上穿增,2),colorf4e202,LINETHICK1;
FL:=MA(CLOSE,17)+ABS(MA(CLOSE,17)-ref(MA(CLOSE,17),2));
FS:=MA(CLOSE,17)+MA(CLOSE,17)-ref(MA(CLOSE,17),2);
CG:=IF(MA(CLOSE,17)<FS,FS,MA(CLOSE,17));
DRAWTEXT(CROSS(黄线上穿增,黄线下穿减) AND 黄线上穿增<45 and cg=fl and cg=fs,25,'增仓'),COLOR00FF00;
DRAWTEXT(CROSS(黄线上穿增,var2) AND 黄线上穿增<45 and cg=fl and cg=fs,27,'●'),COLORFFFFFF;
DRAWTEXT(CROSS(黄线下穿减,黄线上穿增) AND 黄线上穿增>70 and cg=fl and cg=fs,85,'减仓'),COLOR00FF00;
DRAWTEXT(CROSS(黄线下穿减,黄线上穿增) AND 黄线上穿增>70 and cg=fl and cg=fs,82,'●'),COLOR00FF00;
[/code]

[attach]5841[/attach]

页: [1]