I am trying to calculate the gap between each bars for the close price. I am seeking the difference between previous close and current opening of the bar.
i tried this double dif = Open[0] - Close[1];
but its not what i am looking for. Any tips? e.g if previous close was 10 and opening at 8 the difference is 2. I want each gap for all bars in the chart, do i need to for loop?
TY
Comment