1、此公式源码来自网络,少做改动,于此真诚感谢原创者!
2、本公式是一套有买卖点提示的较完善交易系统,大道至简的傻瓜式交易系统。
3、参数可基于个人风格、不同个股进行手工调节。费话少说,源码奉上;欢迎交流!
{唐奇安通道}
{N:=20;T:=10;}
M1:MA(C,N);
HPB:=REF(HHV(H,N),1);
LPB:=REF(LLV(L,T),1);
{多头交易}
BUYIN:=H>HPB AND C>M1;
BUYEXIT:=L<LPB;
SINGAL:=IF(BUYIN,1,IF(BUYEXIT,-1,0));
CURRSIGN:=REF(SINGAL,BARSLAST(SINGAL));
UPTREND:=CURRSIGN= 1;
DWTREND:=CURRSIGN=-1;
{跟踪止损}
空平:IF(DWTREND,HPB,DRAWNULL),COLORBLUE,LINETHICK2;
多止:IF(UPTREND,LPB,DRAWNULL),COLORRED,LINETHICK2;
信号持续:IF(DWTREND,BARSLAST(UPTREND),BARSLAST(DWTREND)),NODRAW,COLORMAGENTA;
DRAWICON(BARSLAST(DWTREND)=1,多止,7);
DRAWICON(BARSLAST(UPTREND)=1,空平,8);
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);