I've developed a strategy that uses Bid/Ask volume data to trigger signals.
What I'd like to do now is to compare the Bid/Ask volume of the current candle to the Bid/Ask volume of the previous candle.
Here are my variables:
private int activeBar = -1;
private double askPrice = 0;
private double bidPrice = 0;
private double buys = 0;
private double sells = 0;
private double buy = 0;
private double sell = 0;
Here are my conditions:
if ( buy> sell && my conditions here)
This compares buy & sell volumes of the current candle (works well). In order to compare buy & sell volumes of the PREVIOUS candle I thought I just have to modify the code to buy [1] > sell [1] but I get the following error message: "Cannot apply indexing with [] to an expression of type type 'double'.
What do I have to do to get this fixed? Thanks a lot.

Comment