I'm trying to get the buy sell volume and pressure data into my NT strategy, I'm using the existing indicator supplied in NT platform, but I get zero and NAN values. I have multiple dataseries in my strategy, I'm using the 30 seconds data series for buy sell data. Could you please check and let me know why I'm not able to get the values? I'm running my strategy realtime - Calculate = Calculate.OnEachTick;
//code
//Add a series seconds
AddDataSeries(null, BarsPeriodType.Second, 30, MarketDataType.Last);
Print("Buy Volume - " + BuySellVolume(BarsArray[2]).Buys[0]);
Print("Sell Volume - "+ BuySellVolume(BarsArray[2]).Sells[0]);
Print("Total Volume - "+ BuySellVolume(BarsArray[2]).Buys[0] + BuySellVolume(BarsArray[2]).Sells[0]);
Print("Buy to Sell Ratio - "+ (BuySellVolume(BarsArray[2]).Buys[0]) / BuySellVolume(BarsArray[2]).Sells[0]);
Print("Sell to Buy Ratio - "+ (BuySellVolume(BarsArray[2]).Sells[0]) / BuySellVolume(BarsArray[2]).Buys[0]);
if(BuySellPressure(BarsArray[2]).BuyPressure[0] >= 70);
{
Print(Time[0].ToString());
Print("Buy pressure is high - Enter LONG -"+ BuySellPressure(BarsArray[2]).BuyPressure[0]);
}
if(BuySellPressure(BarsArray[2]).SellPressure[0] >= 70);
{
Print(Time[0].ToString());
Print("Sell pressure is high - Enter SHORT - "+ BuySellPressure(BarsArray[2]).SellPressure[0]);
}
//output
2/13/2022 11:28:30 PM
Buy pressure is high - Enter LONG -50
2/13/2022 11:28:30 PM
Sell pressure is high - Enter SHORT - 50
Buy Volume - 0
Sell Volume - 0
Total Volume - 00
Buy to Sell Ratio - NaN
Sell to Buy Ratio - NaN
Thankyou,
Murali

Comment