ihzx 发表于 2021-8-21 14:00:05

大智慧空中加油指标公式

<p>M5:=MA(CLOSE,5);   <br />
M10:=MA(CLOSE,10);   <br />
M20:=MA(CLOSE,20);   <br />
M30:=MA(CLOSE,30);   <br />
M250:=MA(CLOSE,250);   <br />
N1:=BARSLAST(CROSS(M5,M10));   <br />
N2:=BARSLAST(CROSS(M10,M5));   <br />
D:=IF(N1&lt;N2,N1+1,0);   <br />
K:=IF(N2&lt;N1,N2+1,0);   <br />
QSXS:=M5&gt;M20 AND M10&gt;M20 AND M20&gt;REF(M20,1)   <br />
AND M30&gt;REF(M30,1);   <br />
启动:D*QSXS,COLORRED,LINETHICK0;   <br />
跑道:K*QSXS,COLORFFFF00,LINETHICK0;   <br />
HKFJ:=HHV(D,5)&gt;=2 AND QSXS AND M5&gt;REF(M5,1) AND M5&gt;M10;   <br />
飞机:HKFJ*D,COLORFF00FF,LINETHICK2;   <br />
HKSJ:=BARSLAST(飞机&gt;0 AND NOT(REF(飞机,1)))+1;   <br />
高度:(C/REF(C,HKSJ)-1)*100,COLOR00FFFF;   <br />
加油:启动&gt;0 AND 飞机=0,COLOR00FF00,POINTDOT,LINETHICK0;   <br />
N3:=BARSLAST(加油)+1;   <br />
K5:=ATAN((M5/REF(M5,1)-1)*100)*180/3.14159;   <br />
JXGD1:=K5&gt;REF(K5,1) AND REF(K5,1)&lt;REF(K5,2);   <br />
JXGD2:=M5&gt;REF(M5,1) AND REF(M5,1)&lt;REF(M5,2);   <br />
加速:FILTER((JXGD1 OR JXGD2)   <br />
AND C&gt;M5 AND HKFJ,3),COLOR00FFFF,POINTDOT,LINETHICK0;   <br />
N4:=BARSLAST(加速);   <br />
STICKLINE(加油,0,启动/10+1,4,1),COLOR00FF00;   <br />
STICKLINE(N4&gt;0 AND N4&lt;=5,REF(启动,N4+1),REF(启动,N4+1),4,0),COLORFFFFFF;   <br />
DRAWTEXT(加速,启动,'▲'),COLOR00FFFF;<br />
空中加油主图(源码)用法:图有提示 <br />
M5:=MA(C,5);   <br />
M10:MA(C,10),LINETHICK1;   <br />
M20:MA(C,20),LINETHICK2;   <br />
M30:MA(C,30),LINETHICK1;   <br />
M250:MA(C,250),COLORFF3399,LINETHICK3;   <br />
N1:=BARSLAST(CROSS(M5,M10));   <br />
N2:=BARSLAST(CROSS(M10,M5));   <br />
D:=IF(N1&lt;N2,N1+1,0);   <br />
K:=IF(N2&lt;N1,N2+1,0);   <br />
QSXS:=M5&gt;M20 AND M10&gt;M20 AND M20&gt;REF(M20,1) AND M30&gt;REF(M30,1);   <br />
启动: D*QSXS,COLORRED,LINETHICK0;   <br />
跑道: K*QSXS,COLORFFFF00,LINETHICK0;   <br />
HKFJ:=HHV(D,5)&gt;=2 AND QSXS AND M5&gt;REF(M5,1) AND M5&gt;M10;   <br />
飞机: HKFJ*D,COLORFF00FF,LINETHICK0;   <br />
HKSJ:=BARSLAST(飞机&gt;0 AND NOT(REF(飞机,1)))+1;   <br />
高度: (C/REF(C,HKSJ)-1)*100,COLOR00FFFF,LINETHICK0;   <br />
加油:启动&gt;0 AND 飞机=0,COLOR00FF00,POINTDOT,LINETHICK0;   <br />
N3:=BARSLAST(加油)+1;   <br />
K5:=ATAN((M5/REF(M5,1)-1)*100)*180/3.14159;   <br />
JXGD1:=K5&gt;REF(K5,1) AND REF(K5,1)&lt;REF(K5,2);   <br />
JXGD2:=M5&gt;REF(M5,1) AND REF(M5,1)&lt;REF(M5,2);   <br />
加速:FILTER((JXGD1 OR JXGD2)   <br />
AND C&gt;M5 AND HKFJ,3),COLOR00FFFF,POINTDOT,LINETHICK0;   <br />
N4:=BARSLAST(加速);   <br />
STICKLINE(加油,(O+C)/2-0.01,(O+C)/2+0.01,4,0),COLOR00FF00;   <br />
STICKLINE(加油,L,H,1,1),COLOR00FF00;   <br />
STICKLINE(加速,(O+C)/2-0.01,(O+C)/2+0.01,4,0),COLOR00FFFF;   <br />
STICKLINE(加速,L,H,1,1),COLOR00FFFF;   <br />
STICKLINE(N4&gt;0 AND N4&lt;=5,REF(O,N4+1),REF(O,N4+1),4,1),COLORFFFFFF;   <br />
DRAWTEXT(加速,L,'加▲速'),COLOR00FFFF;   <br />
DRAWTEXT(飞机,M30,'。'),COLORFFFFFF;</p>
<p></p>
<p>&nbsp;</p>
页: [1]
查看完整版本: 大智慧空中加油指标公式