Forum

Trying to code cumulative delta volume but... what's wrong here?

So I tried to code something from tradingview and make it happen in MQL4. I updated this post to show new problem I have now. The indicator doesn't render new candles when I press play. It only show past candles but not new one. I have no clue why. Then I need to get the cumulatif of sums. The first

Cumulative sum function missing in mql4? Need help to code it.

Since there is no cum() function in mql4, I need help to know how to code a function "cum()" that I can use for my code. I need it for my cumdelta variable "cum(delta)". void OnTick () { //--- tw = High[ 0 ] - fmax (Open[ 0 ], Close[ 0 ]); bw = fmin (Open[ 0 ], Close[ 0 ]) - Low[ 0 ];