以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://222.73.7.161/bbs/index.asp)
--  策略编写求助区  (http://222.73.7.161/bbs/list.asp?boardid=11)
----  [求助]请老师高手帮忙改编成金字塔图表交易系统和金字塔指标,万分感谢!  (http://222.73.7.161/bbs/dispbbs.asp?boardid=11&id=165991)

--  作者:lqf3618
--  发布时间:2018/10/21 20:52:01
--  [求助]请老师高手帮忙改编成金字塔图表交易系统和金字塔指标,万分感谢!
MA7:   MA(C,7);
MA16 : MA(CLOSE,16);
FS:=  MA16  + 2*STD(CLOSE,16);
FS1:= MA16 - 2*STD(CLOSE,16);
SJ:=BARSLAST(DATE<>REF(DATE,1) OR BARPOS=1)+1;
SJE:=SJ>=0 AND TIME<=230000 ;
JS:=TIME>=233000;

TJ1:=MA7>MA16 AND C>MA7;
TJ2:=MA7<MA16 AND C<MA7;
CL:=SJE AND C>FS;
CL2:=SJE AND C<FS1;
TJ3:=IF(SJ=1,0,IF(CL,1,IF(CL2,-1,REF(TJ3,1))));
TJ6:=IF(SJ=1,0,IF(REF(TJ6,1)<>1 AND (SJE AND (CL OR (TJ1 AND TJ6=-1))),1,IF(REF(TJ6,1)<>-1 AND (SJE AND (CL2 OR (TJ2 AND TJ3=1))),-1,IF(JS,0,REF(TJ6,1)))));

DRAWICON(REF(TJ6,1)<>1 AND TJ6=1,L,4);
DRAWICON(REF(TJ6,1)<>-1 AND TJ6=-1,H,5);
DRAWTEXT(REF(TJ6,1)=0 AND TJ6=1,L,\'      开多\');
DRAWTEXT(REF(TJ6,1)=0 AND TJ6=-1,H,\'      开空\');
DRAWTEXT(REF(TJ6,1)=-1 AND TJ6=1,L,\'      平空开多\');
DRAWTEXT(REF(TJ6,1)=1 AND TJ6=-1,H,\'      平多开空\');
DRAWTEXT(REF(TJ6,1)<>0 AND TJ6=0,L,\'      收盘平仓\');
STICKLINE(TJ6>0,H,MAX(O,C),0,1),COLORRED;
STICKLINE(TJ6>0,MIN(O,C),L,0,1),COLORRED;
STICKLINE(TJ6>0,O,C,4,1),COLORRED;
STICKLINE(TJ6<0,H,L,0,0),COLORGREEN;
STICKLINE(TJ6<0,O,C,4,0),COLORGREEN;
STICKLINE(TJ6=0,H,L,0,0),COLORYELLOW;