I am trying to make a simple EA that can open and close limit orders at specific times. Every time I run the code I get an Error 130. The take profit and stop loss both look right. Could anyone look at the code and see if they can give me a better idea of what is causing the error?
Here is a piece of the code. The full EA is attached.
I spent all weekend trying to figure this out but didn't have any luck. If anyone could help I would really appreciate it.
See this document : Requirements and Limitations in Making Trades.
A buy limit order have to be placed below market price, not above or it will be triggered immediately.