Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:加仓及移动止损要怎么写

1楼
allen23 发表于:2014/3/26 12:39:59
价格大于1200,买入1手,止损1150;
继续上升到1250,加仓买入1手,两手持仓止损1200。
请问要怎么写语句?
谢谢!
2楼
jinzhe 发表于:2014/3/26 13:12:38

if h>1200 and h<1250 then buy(holding=0,1,thisclose);

if l<1150 and hhv(h,enterbars+1)>1200 and hhv(h,enterbars+1)<1250 then sell(1,0,thisclose);

 

if h>=1250 then buy(holding=1 or holding=0,1,thisclose);

if l<1200 and hhv(h,enterbars+1)>=1250 then sell(1,0,thisclose);

共2 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.02344 s, 3 queries.