Looking for some assistance implementing an idea via meta editor. I am attempting to generate an exit signal on trades placed that compares the open price of a trade + the ATR value for the time that the trade was initiated with the opening price of a new bar. The idea is that when during a buy trade the open price + ATR is < the open price of a new bar, the trade will close itself. If it is a sell trade, the opposite is true; open price of trade - ATR > open price of new bar, trade closes. I’m not looking for a take profit or stop loss that corresponds to the ATR value; this should only close the trade if a bar opens at a higher or lower value than the open price + ATR value. I have some code written that takes into account the spread costs and other factors. Please PM me and I will share screen shots of the code I currently have to work with.
Thanks all, happy trading
- [ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5.
- Help with MA cross over Price IN EA
- Wma 5/20 - Ema
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register