The Round2TickSize suddenly stops to work for my script. It is unable to round the number to the nearest tick today. It was still working yesterday and I have not done anything to the script itself. The script is as follows:
protected override void Initialize()
{
CalculateOnBarClose = false;
hPrice = Instrument.MasterInstrument.Round2TickSize(1.0005 * refHigh) + 2;
lPrice = Instrument.MasterInstrument.Round2TickSize(0.9995 * refLow) - 2;
Print("hPrice: " + hPrice);
Print("lPrice: " + lPrice);
}
When I print the hPrice and lPrice of say SPI, it is not rounded to nearest tick size of 1. Can you pls help? thanks.
Comment