以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 指标改写 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=156311) |
-- 作者:系统使用者 -- 发布时间:2017/7/27 15:10:37 -- 指标改写 VARIABLE: aspect=0; //初始化假定做多头 VARIABLE: stopprice=0;//止损价格变量 VARIABLE: stopnum = 10; //止损价差 if barpos = 0 then stopprice := l - stopnum; if aspect = 0 then begin if l <= stopprice then begin aspect:= 1; stopprice := h+stopnum; end if l - stopnum > stopprice then stopprice := l-stopnum; end if aspect = 1 then begin if h >= stopprice then begin aspect:= 0; stopprice := l-stopnum; end if h + stopnum < stopprice then stopprice := h+stopnum; end //画线 PARTLINE( aspect = 0, stopprice , colorrgb(255,0,0)); PARTLINE( aspect = 1, stopprice , colorrgb(0,255,0)); 请帮忙把上面的改为主图指标,序列模式。好引用
|
-- 作者:wenarm -- 发布时间:2017/7/27 15:42:54 -- 这个你编译的时候,会提示你使用逐k方式,你可以用逐k模式,不同模式下引用也没问题的。 或者选择不切换成逐k模式也行。 策略没什么可改的啊 |