【ATR Big Profit Stop】(N倍ATR大幅盈利出场法)
  
- UID
- 2
- 积分
- 2914403
- 威望
- 1407234 布
- 龙e币
- 1507169 刀
- 在线时间
- 13521 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2025-3-3

|
【ATR Big Profit Stop】(N倍ATR大幅盈利出场法)
程式码部分,信号:ATR Big Profit Stop- Inputs: BigProfitATRs(7), ATRLength(10), ExitBarLen(3);
- Variables: ATRVal(0), PosHL(0);
- ATRVal = AvgTrueRange(ATRLength) * BigProfitATRs;
- If BarsSinceEntry = 0 Then PosHL = Close;
- If MarketPosition = 1 Then Begin
- If Close > PosHL Then PosHL = Close;
- If PosHL > EntryPrice + ATRVal Then sell Next Bar at Lowest(Low, ExitBarLen) Stop;
- End;
- If MarketPosition = -1 Then Begin
- If Close < PosHL Then PosHL = Close;
- If PosHL < EntryPrice - ATRVal Then buytocover Next Bar at Highest(High, ExitBarLen) Stop;
- End;
复制代码 |
论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
|
|
|
|
|
|
  
- UID
- 2
- 积分
- 2914403
- 威望
- 1407234 布
- 龙e币
- 1507169 刀
- 在线时间
- 13521 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2025-3-3

|
程式码解析部分:
本帖隐藏的内容需要回复才可以浏览 |
|
|
|
|
|
|

- UID
- 21723
- 积分
- 400
- 威望
- 200 布
- 龙e币
- 200 刀
- 在线时间
- 117 小时
- 注册时间
- 2021-4-15
- 最后登录
- 2024-8-3
|
|
|
|
|
|
|
  
- UID
- 2
- 积分
- 2914403
- 威望
- 1407234 布
- 龙e币
- 1507169 刀
- 在线时间
- 13521 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2025-3-3

|
视频部分参考:http://www.qhlt.cn/thread-127007-1-1.html
原理是这样的,设置 一个N*ATR,因为atr是计算出来的,这个是变动的,我们主要的设置是N的数值,可以在 1 ,2 ,3....等,这个也是优化的地方,根据品种不同,交易周期不同可以通过回测选出一个比较好的数值。
当进场后盈利达到这个N*ATR后就开始启用跟踪出场,这个范例中是用某个周期内的最高和最低出场法则。 |
|
|
|
|
|
|

- UID
- 21527
- 积分
- 420
- 威望
- 215 布
- 龙e币
- 205 刀
- 在线时间
- 6 小时
- 注册时间
- 2021-1-2
- 最后登录
- 2023-9-30
|
|
边学边用
|
|
|
|
|
  
- UID
- 22996
- 积分
- 4080
- 威望
- 2040 布
- 龙e币
- 2040 刀
- 在线时间
- 685 小时
- 注册时间
- 2023-7-21
- 最后登录
- 2025-1-25
|
|
|
|
|
|
|