如何设置这种变色龙指标
此主题相关图片如下:20200604154440.784-2464.jpg
那个线是什么线?均线还是什么?你描述下这个图里面的思路吧。
BB:=CLOSE;
EMA08[1]:=BB[1];
EMA17[1]:=BB[1];
FAST[1]:=0;
SLOW[1]:=0;
FOR I=2 TO DATACOUNT DO BEGIN
EMA08[I]:=(((BB[I] * 2) + (EMA08[(I - 1)] * 7.3896)) / 9.3896);
EMA17[I]:=(((BB[I] * 2) + (EMA17[(I - 1)] * 16.5185)) / 18.5185);
FAST[I]:=(EMA08[I] - EMA17[I]);
SLOW[I]:=(((FAST[I] * 2) + (SLOW[(I - 1)] * 8.0503)) / 10.0503);
END;
DMP:(((((18.5185 * 9.3896) * SLOW) + ((EMA17 * 9.3896) * 16.5185)) - ((EMA08 * 18.5185) * 7.3896)) / 18.2578),SHIFT1,COLORBLUE;
DNDMP:PARTLINE((CLOSE > DMP),DMP),SHIFT1,COLORRED;
DRAWICON((SYSPARAM(3) = BARSCOUNT(CLOSE)),DMP,12),SHIFT1;
STICKLINE(C>dmp,O,C,10,0),COLORRED;
STICKLINE(C<dmp,O,C,10,0),COLORCYAN;
ma10:=ma(c,10);
red:if(c>ma10 or cross(c,ma10),ma10,drawnull),colorred;
green:if(c<ma10 or cross(ma10,c) ,ma10,drawnull),colorgreen;
cd:c>ma10;
STICKLINE(1 ,C,H,0,0,if(cd,COLORRED,COLORGREEN));
STICKLINE(1,C,O,8,if(cd,1,0),if(cd,COLORRED,COLORGREEN));
STICKLINE(1,if(cd,O,c),L,0,0,if(cd,COLORRED,COLORGREEN));
参考这个代码吧。自行调整下均线以及颜色就行了
[此贴子已经被作者于2020/6/4 17:25:45编辑过]