以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  [求助]  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=58245)

--  作者:yuefei227
--  发布时间:2013/10/31 17:44:38
--  [求助]

图片点击可在新窗口打开查看此主题相关图片如下:搜狗截图13年10月31日1737_1.png
图片点击可在新窗口打开查看
移动止损15个点,划线,  当价格由上往下穿越此线时   按此线此时的价格开仓    请问怎么定义这个?
--  作者:jinzhe
--  发布时间:2013/11/1 8:59:38
--  
这个止损线是代码弄出来的,还是手工划出来的
--  作者:yuefei227
--  发布时间:2013/11/1 10:13:40
--  

 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));


--  作者:jinzhe
--  发布时间:2013/11/1 10:18:01
--  

 

if cross(clsoe,stopprice) then buy(holding=0,1,limitr,stopprice);