Bootstrap

文华财经期货多空波段趋势线变色精准买卖点声音预警主图指标公式源码

文华财经期货多空波段趋势线变色精准买卖点声音预警主图指标公式源码:

//移动均线

主趋势线:=EMA(EMA(C,10),10);//EMA10

拐头:=主趋势线>REF(主趋势线,1);

DRAWCOLORLINE(拐头 ,主趋势线,COLORRED,COLORGREEN),LINETHICK1;

//SAR

STEP1:=2/100;

MVALUE1:=20/100;

SARLINE:=SAR(4,STEP1,MVALUE1),CIRCLEDOT,COLORRED;

SARLINE1:=-SAR(4,STEP1,MVALUE1),CIRCLEDOT,COLORGREEN;

JC:=SUMBARS(CROSS(SARLINE>0,0.5),1);//金叉

SC:=SUMBARS(CROSS(SARLINE<0,0.5),1);//死叉

//空损

REF( HHV(H,3),SC,1) )

短多:=JC=3 && SARLINE>0 ;

短空:=SC=3 && SARLINE<0 ;

//DRAWICON(JC=3 && SARLINE>0 ,REF( LLV(L,3),JC ) ,'ICO4');//短多上箭头

//DRAWICON(SC=3 && SARLINE<0 ,REF( HHV(H,3),SC ),'ICO5');//短空下箭头

AA:=EMA(C,5) > EMA(C,20);

BB:=EMA(C,5) < EMA(C,20);

5上20:=SUMBARS(AA AND AA <> REF (AA,1),1);

5下20:=SUMBARS(BB AND BB <> REF (BB,1),1);

DRAWTEXT(5下20 < 5上20 && CROSS(SARLINE<0,0.5) && L<REF(SARLINE,1) && C<O, REF( HHV(H,3),SC ) ,'▼'),FONTSIZE30,COLORLIGHTGREEN;//加空

PLAYSOUND(5下20 < 5上20 && CROSS(SARLINE<0,0.5) && L<REF(SARLINE,1) && C<O, 'A'); //当条件满足时,播放声音'纯碱15分钟空'

DRAWTEXT(5上20 < 5下20 && CROSS(SARLINE>0,0.5) && H>REF(ABS(SARLINE),1) && C>=O, REF( LLV(L,3),JC ) ,'▲'),FONTSIZE30,COLORMAGENTA;//加多

PLAYSOUND(5上20 < 5下20 && CROSS(SARLINE>0,0.5) && H>REF(ABS(SARLINE),1) && C>=O, 'B'); //当条件满足时,播放声音'纯碱15分钟多'

日开:REF(O,DAYBARPOS-0.5),NODRAW;//日线开盘价

DRAWSHIFTNUMBER(ISLASTBAR ,日开,日开,2,COLORYELLOW,0,10),ALIGN0,FONTSIZE20,VALIGN0;

KTEXT(ISLASTBAR,-10,日开,0,COLORYELLOW,'日:'),FONTSIZE20,VALIGN0;

周开:REF(O,SUMBARS(WEEKDAY<REF(WEEKDAY,1),1)-0.5),NODRAW;

DRAWSHIFTNUMBER(ISLASTBAR ,周开,周开,2,COLORYELLOW,0,10),ALIGN0,FONTSIZE20,VALIGN2;//

KTEXT(ISLASTBAR ,-10,周开,0,COLORYELLOW,'周:'),FONTSIZE20,VALIGN2;

月开:REF(O,SUMBARS(MONTH<>REF(MONTH,1),1)-0.5),NODRAW;

DRAWSHIFTNUMBER(ISLASTBAR ,月开,月开,2,COLORMAGENTA,0,10),ALIGN0,FONTSIZE20,VALIGN2;//

KTEXT(ISLASTBAR ,-10,月开,0,COLORMAGENTA,'月:'),FONTSIZE20,VALIGN2;

;