mql5 current candle

linux_usr

Trader
Oct 20, 2023
72
3
19
39
Anyone put me on the correct path to modifying a bot to open a trade on signal "current candle" not on close. thanx
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,342
1,542
144
Odesa
www.earnforex.com
An expert advisor can open a trade each tick. It probably has more to do with how you are checking for a signal. If you shared the relevant section of the code, perhaps, it would be possible to tell what to do.
 

linux_usr

Trader
Oct 20, 2023
72
3
19
39
i am just started out learning. i still cant find anything to get the mt5 template to use current instead of close candle
Code:
 for (int i = total - 1; i >= 0; i--)
 

linux_usr

Trader
Oct 20, 2023
72
3
19
39
Code:
input ENUM_CANDLE_TO_CHECK CandleToCheck = CURRENT_CANDLE;
Code:
enum ENUM_CANDLE_TO_CHECK
{
    CURRENT_CANDLE = 0,  // Current candle
    CLOSED_CANDLE = 1    // Previous candle
};

am i getting close to the correct code? compiles ok need to test it