Trying to create a cumulative index using the formula ((Close[0]-Open[0])/(High[0]-Low[0])).
The code is attached. The error I am getting is "Error on plotting indicator 'pressurecum'. Please check the 'OnBarUpdate' or the Plot method: Overflow error. I suppose when High[0] - Low[0] = 0, that is when the problem happens.
Can someone help with a workaround? Thanks!
Comment