求老师编写通达信公式:股价连续三日以上在大阳K线实体(涨幅达6%以上)的50%上方作平台整理,

且三天以上平台整理的震幅不超过5%
2024-12-03 18:46:49
推荐回答(1个)
回答1:

value_a1:=(close-ref(close,1))/ref(close,1)*100;
value_a2:=(high-low)/low*100;
value_a3:=open+(close-open)*0.5;
value_a4:=ref(value_a1>=6,1) and value_a2<=5 and close>=ref(value_a3,1);
value_a5:=ref(value_a3,barslast(value_a4)+1);
value_a6:=value_a5*1.1;
value_b1:=cross(close,value_a6);
value_b2:=barslast(value_a4)-barslast(value_b1);
value_b3:=if(value_b2>0,value_b2,drawnull);
value_b4:=count(between(close,value_a5,value_a6) and value_a2<=5,value_b3)=value_b3;
value:ref(value_b4 and value_b3>=2,1) and value_b1;