(MT5) Need help with setting up orders in Grid
Immediately a mistake.
Read help:
Returns the requested order property, pre-selected using OrderGetTicket or OrderSelect. Order property must be of the datetime, int type. There are 2 variants of the function.
The function returns the requested property of an open position, pre-selected using PositionGetSymbol or PositionSelect. The position property should be of datetime, int type. There are 2 variants of the function.
- www.mql5.com
Hello I am learning mql5 language. I have designed a code to setup pending orders in gird when a candle is bigger than the predefined range. If candle is bullish then place 1 sell trade and then set a specific amount of sell limit orders based on open price of the Sell trade and opposite for buys.
When anyone of the trade reaches the TP I want to close all orders and positions. Please check my code and help me improve it.