1
Follow
1
Followers
N:=14;
止损倍数:=1.5;
止盈倍数:=2.8;
TR:=MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
ATR:=MA(TR,N);
底分型条件:=LOW[1]<LOW[0] AND LOW[1]<LOW[2] AND HIGH[1]<HIGH[0] AND HIGH[1]<HIGH[2];
严格底分型:=底分型条件 AND (CLOSE[0]>LOW[2]);
买入信号:=严格底分型;
买入价格:=VALUEWHEN(买入信号,CLOSE);
止损价:=买入价格-止损倍数ATR;
止盈价:=买入价格+止盈倍数ATR;
止损条件:=CROSS(止损价,CLOSE);
止盈条件:=CROSS(CLOSE,止盈价);
平仓信号:=止损条件 OR 止盈条件;
买入信号,BK;
平仓信号,SP;
Related Recommendations
Inventor Quant Workflow FAQ (Continuously Updated)Financial Magic Zone Global KOL RecruitmentFAQ Summary (Updating...)PINE Language Introductory Tutorial of FMZ QuantPrimary Tutorial of Strategy Writing with FMZ Quant Trading Platform (Must Read)Getting Started with FMZ Quant Trading Platform (Must Read)
