飞狐轴上金叉次数主图指标公式

[复制链接]
查看145 | 回复0 | 2021-8-21 12:33:44 | 显示全部楼层 |阅读模式

MA5:MA(C,5) colorwhite;
MA10:MA(C,10)coloryellow;
POLYLINE(C,MA(C,20)) color999999;
MA30:MA(C,30)colorgreen;
POLYLINE(C,MA(C,45)) color999999;
MA60:MA(C,60)colormagenta;
POLYLINE(C,MA(C,90)) color999999;
MA120:MA(C,120)colorcyan;
POLYLINE(C,MA(C,150)) color999999;
POLYLINE(C,MA(C,180)) color999999;
POLYLINE(C,MA(C,210)) color999999;
MA250:MA(C,250)colorred;
VK:=SQRT(VOL/CAPITAL*100*5);
STICKLINE(C>=O,H,L,0,0) COLORred;
STICKLINE(C>=O,C,O,VK+3.8,0) COLORred;
STICKLINE(C< O,H,L,0,0) COLORgreen;
STICKLINE(C< O,C,O,VK+3.8,0) COLORgreen;
EXPLAIN((MA5>MA10 and MA10>MA30 and MA5>MA30),'解:短期均线排列:多头')COLORred;
EXPLAIN((MA5<MA10 and MA10<MA30 and MA5<MA30),'解:短期均线排列:空头');
EXPLAIN((MA30>MA60 and MA30>MA120 and MA60>MA120),'解:中期均线排列:多头');
EXPLAIN((MA30<MA60 and MA30<MA120 and MA60<MA120),'解:中期均线排列:空头');
EXPLAIN((MA60>MA120 and MA120>MA250 and MA60>MA250),'解:长期均线排列:多头');
EXPLAIN((MA60<MA120 and MA120<MA250 and MA60<MA250),'解:长期均线排列:空头');
EXPLAIN((CROSS(MA5,MA10)),'解:短期均线5x10:金叉')COLORred;
EXPLAIN((CROSS(MA10,MA5)),'解:短期均线5x10:死叉');
EXPLAIN((CROSS(C,MA120)),'解:今日股价上穿半年线');
EXPLAIN((CROSS(MA120,C)),'解:今日股价跌破半年线');
EXPLAIN((CROSS(C,MA250)),'解:今日股价上穿一年线');
EXPLAIN((CROSS(MA250,C)),'解:今日股价跌破一年线');
EXPLAIN((CROSS(C,MA60) and CROSS(C,MA120) and CROSS(C,MA250)),'解:股价一阳上穿三线');
EXPLAIN((MA30>REF(MA30,1)),'解:30日均线趋势:向上');
EXPLAIN((MA30>REF(MA30,1) AND MA30<REF(MA30,1)*1.001),'解:30日均线趋势:走平');
EXPLAIN((MA30<REF(MA30,1)),'解:30日均线趋势:向下');
EXPLAIN((MA5>REF(MA5,1)*1.015),'解:5日均线:强劲向上');
EXPLAIN((MA5>REF(MA5,1) AND MA5<REF(MA5,1)*1.005),'解:5日均线:方向不明');
EXPLAIN((MA5<REF(MA5,1)*0.985),'解:5日均线:快速向下');
DIFF:=EMA(C,5)-EMA(C,20);
DEA:=EMA(DIFF,10);
MACD:=2*(DIFF-DEA);
JC:=CROSS(DIFF,DEA);
SC:=CROSS(DEA,DIFF);
DCJC:=JC AND DEA>0;
EXPLAIN((JC AND DEA>0),'解:MACD在0轴上金叉')COLORred;
EXPLAIN((JC AND DEA<0),'解:MACD在0轴下金叉');
EXPLAIN((SC AND DEA>0),'解:MACD在0轴上死叉');
EXPLAIN((SC AND DEA<0),'解:MACD在0轴下死叉');
EXPLAIN((MACD>0 AND MACD>REF(MACD,1)),'解:MACD的红柱:增长');
EXPLAIN((MACD>0 AND MACD<REF(MACD,1)),'解:MACD的红柱:缩短');
EXPLAIN((MACD<0 AND ABS(MACD)>REF(ABS(MACD),1)),'解:MACD的绿柱:增长');
EXPLAIN((MACD<0 AND ABS(MACD)<REF(ABS(MACD),1)),'解:MACD的绿柱:缩短');
EXPLAIN((COUNT(DCJC,20)=2 AND JC AND DEA>0),'解:0轴上金叉次数:2')COLORredCOLORred;
EXPLAIN((COUNT(DCJC,20)=3 AND JC AND DEA>0),'解:0轴上金叉次数:3');
EXPLAIN((COUNT(DCJC,20)=4 AND JC AND DEA>0),'解:0轴上金叉次数:4');
EXPLAINICON(HIGH>=HHV(HIGH,20), 'MyBMP');
EM5:EMA(C,5) colorwhite;
EM10:EMA(C,10)coloryellow;
POLYLINE(C,EMA(C,20)) color999999;
EM30:EMA(C,30)colorgreen;
POLYLINE(C,EMA(C,45)) color999999;
EM60:EMA(C,60)colormagenta;
POLYLINE(C,EMA(C,90)) color999999;
EM120:EMA(C,120)colorcyan;
POLYLINE(C,EMA(C,150)) color999999;
POLYLINE(C,EMA(C,180)) color999999;
POLYLINE(C,EMA(C,210)) color999999;
EM250:EMA(C,250)colorred;
FILLRGN(EMA(C,5)>EMA(C,10),EMA(C,5),EMA(C,10))COLOR6699FF;
FILLRGN(EMA(C,5)<EMA(C,10),EMA(C,5),EMA(C,10))COLORFF6666;
{VK:=SQRT(VOL/CAPITAL*100*5);}
STICKLINE(C>=O,H,L,0,0) COLORred;
STICKLINE(C>=O,C,O,VK+3.8,0) COLORred;
STICKLINE(C< O,H,L,0,0) COLORgreen;
STICKLINE(C< O,C,O,VK+3.8,0) COLORgreen;
EXPLAIN((EM5>EM10 and EM10>EM30 and EM5>EM30),'解:短期均线排列:多头');
EXPLAIN((EM5<EM10 and EM10<EM30 and EM5<EM30),'解:短期均线排列:空头');
EXPLAIN((EM30>EM60 and EM30>EM120 and EM60>EM120),'解:中期均线排列:多头');
EXPLAIN((EM30<EM60 and EM30<EM120 and EM60<EM120),'解:中期均线排列:空头');
EXPLAIN((EM60>EM120 and EM120>EM250 and EM60>EM250),'解:长期均线排列:多头');
EXPLAIN((EM60<EM120 and EM120<EM250 and EM60<EM250),'解:长期均线排列:空头');
EXPLAIN((CROSS(EM5,EM10)),'解:短期均线5x10:金叉');
EXPLAIN((CROSS(EM10,EM5)),'解:短期均线5x10:死叉');
EXPLAIN((CROSS(C,EM120)),'解:今日股价上穿半年线');
EXPLAIN((CROSS(EM120,C)),'解:今日股价跌破半年线');
EXPLAIN((CROSS(C,EM250)),'解:今日股价上穿一年线');
EXPLAIN((CROSS(EM250,C)),'解:今日股价跌破一年线');
EXPLAIN((CROSS(C,EM60) and CROSS(C,EM120) and CROSS(C,EM250)),'解:股价一阳上穿三线');
EXPLAIN((EM30>REF(EM30,1)),'解:30日均线趋势:向上');
EXPLAIN((EM30>REF(EM30,1) AND EM30<REF(EM30,1)*1.001),'解:30日均线趋势:走平');
EXPLAIN((EM30<REF(EM30,1)),'解:30日均线趋势:向下');
EXPLAIN((EM5>REF(EM5,1)*1.015),'解:5日均线:强劲向上');
EXPLAIN((EM5>REF(EM5,1) AND EM5<REF(EM5,1)*1.005),'解:5日均线:方向不明');
EXPLAIN((EM5<REF(EM5,1)*0.985),'解:5日均线:快速向下');
EXPLAIN((JC AND DEA>0),'解:MACD在0轴上金叉');
EXPLAIN((JC AND DEA<0),'解:MACD在0轴下金叉');
EXPLAIN((SC AND DEA>0),'解:MACD在0轴上死叉');
EXPLAIN((SC AND DEA<0),'解:MACD在0轴下死叉');
EXPLAIN((MACD>0 AND MACD>REF(MACD,1)),'解:MACD的红柱:增长');
EXPLAIN((MACD>0 AND MACD<REF(MACD,1)),'解:MACD的红柱:缩短');
EXPLAIN((MACD<0 AND ABS(MACD)>REF(ABS(MACD),1)),'解:MACD的绿柱:增长');
EXPLAIN((MACD<0 AND ABS(MACD)<REF(ABS(MACD),1)),'解:MACD的绿柱:缩短');
EXPLAIN((COUNT(DCJC,20)=2 AND JC AND DEA>0),'解:0轴上金叉次数:2');
EXPLAIN((COUNT(DCJC,20)=3 AND JC AND DEA>0),'解:0轴上金叉次数:3');
EXPLAIN((COUNT(DCJC,20)=4 AND JC AND DEA>0),'解:0轴上金叉次数:4');

202108211145.jpg

202108211145.jpg

 

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则