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
Hi All,
While I'm not entirely new to coding I'm no pro either. I'm trying to code an EA that trades based on a basic Donchian Channel strategy, where I place a buy order when the price closes above the upper band, and closes that order when it touches the middle band. The short will open when the price is below the lower band, and close when the price touches the middle band. And we don't open any new orders until the previously opened position is closed.
The EA currently only places 7 trades and then just stops. It closes them improperly and I don't believe its respecting the stop losses.
Here is my code. Any tips would be greatly appreciated!