Rss & SiteMap

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

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

标题:ATR止损止盈写法

1楼
pyfans27 发表于:2016/11/24 20:49:42
某价位进场后,1ATR止损,3ATR止盈,5天没有到止损止盈位置也退出
怎么写?
2楼
jinzhe 发表于:2016/11/25 9:12:09
交易在日线还是分钟线?
3楼
pyfans27 发表于:2016/11/28 19:41:31

两者都写一下 我学习下

4楼
jinzhe 发表于:2016/11/29 8:58:45

 

日线:

atr:=stkindi('','atr.atr',0,datatype);

 

if c<enterprice-atr then sell(1,0,thisclose);

if c>enterprice+3*atr then sell(1,0,thisclose);

if enterbars>5 then sell(1,0,thisclose);

 

 

分钟:

分钟线上你要手工算一下一天有多少根k线,假设一天有ss根当前周期的k线

 

atr:=stkindi('','atr.atr',0,datatype);

 

if c<enterprice-atr then sell(1,0,thisclose);

if c>enterprice+3*atr then sell(1,0,thisclose);

if enterbars>ss*5 then sell(1,0,thisclose);

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


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