I have a strategy running in which I want to use Buy and Sell Pressure.
However, the strategy fails to read it. It always indicates 50/50 whereas I see
on the chart the percentages are not 50/50
This is the code:
protected override void Initialize()
{
CalculateOnBarClose = true;
BuySellPressure().CalculateOnBarClose = false;
}
protected override void OnBarUpdate()
{
if (Historical)
return;
//debug
Print(Instrument.FullName.ToString() + " " + Time[0].ToString() + " BUYP " + BuySellPressure().SellPressure[0].ToString() + " SELLP " + BuySellPressure().BuyPressure[0].ToString()
+ " PREV BUYP " + BuySellPressure().SellPressure[1].ToString() + " PREV SELLP " + BuySellPressure().BuyPressure[0].ToString());
}
This is the output: (everytime 50/50)
ES 12-15 10/12/2015 7:15:38 AM BUYP 50 SELLP 50 PREV BUYP 50 PREV SELLP 50
CL 11-15 10/12/2015 7:15:58 AM BUYP 50 SELLP 50 PREV BUYP 50 PREV SELLP 50
ES 12-15 10/12/2015 7:16:16 AM BUYP 50 SELLP 50 PREV BUYP 50 PREV SELLP 50
M6A 12-15 10/12/2015 7:16:18 AM BUYP 50 SELLP 50 PREV BUYP 50 PREV SELLP 50
ES 12-15 10/12/2015 7:16:28 AM BUYP 50 SELLP 50 PREV BUYP 50 PREV SELLP 50
Does anyone have an idea what I'm doing wrong ?
Comment