How can I execute code only when current candle has closed New comment Namu Makwembo 2021.03.15 10:20 if(high[i-1] > tmau[i-1] && close[i-1] > open[i-1] && close[i] < open[i]) { // EXECUTE CODE HERE ReboundD[i] = high[i] + AtrMultiplier*atr/2; if(tmac[i] - tmac[i-1] > TMAangle*_Point){Caution[i] = ReboundD[i] + 10*_Point;} } if(low[i-1] < tmad[i-1] && close[i-1] < open[i-1] && close[i] > open[i]) { // EXECUTE CODE HERE ReboundU[i] = low[i] - AtrMultiplier*atr/2; if(tmac[i-1] - tmac[i] > TMAangle*_Point) Caution[i] = ReboundU[i] - 10*_Point; } Can someone help me figure out how to execute the codes in the if statement only after the current candle has fully closed Please fix this indicator or EA open and close values in array always identical How to code? New comment
Can someone help me figure out how to execute the codes in the if statement only after the current candle has fully closed