工作已完成
![](https://c.mql5.com/i/avatar/avatar_na2.png)
指定
I will Backtest Tradingsignals, but not use the given Stop Loss and TP..I will use ATR based TP and SL.
The Indicator will allow to add at the Input parameters the date and time of the received signal, so one's I run a Backtest it will open the trade
at the indicated date/hour and fix the SL and TP with the ATR values of the choosen Timeframe:
Parameters:
1. Signal 2020.05.04 14:58
2. Trade Buy/Sell
3. Lotsize % of Balance 2
4. ATR period 14
5. TP - ATR Multiplier 1
6. SL - ATR Multiplier 1.5
7. ATR Candle M15, H1, H4, Daily
8. Partial Close True/False
9. Trailing Stop - ATR Multiplier 1.5
If I would Backtest anything at the Stategy Tester with Period M15, it would take the ATR value for this loaded timeframe.
This is why I add Point 7: There I can choose which candle timeframe must be taken into account for the ATR to fix SL and TP and not the ATR values of the used period at the Strategy Tester.
Think the usual way is to use the already closed candles of the choosen Timeframe, example:
Signal |
2020.05.04 14:58 |
Candle Time Frame |
H1 |
ATR period |
14 |
Order is at 14:58, so it must take the 14 before 1H closed candles as ATR value ( 14:00,13:00,12:00, etc…)
Point 8:
Partial close
True: Close Full position at ATR TP
False: Close 50% position at ATR TP and move SL to entry. Other 50% position will be trailed based on Trailingstop ATR Multiplier value point 9 for the same candle time frame of point 7.