Every time I tried to get tick series I get the 111 error Crash Tick(). No matters how to:
vars Close = series(priceClose(0,10)); //Crash tick() error
vars Change = series(diff(priceClose())); //Crash tick() error
shift(TickSeries,priceClose(),30); //Crash tick() error
I think this is because I can get the last tick price (or close on 0 bar) and the last bar close (time based).
void tick()
{
var LastTick = priceClose();
var LastClose = priceClose(1);
var Difference = LastTick - LastClose;
printf("nPrice A: %f",Difference);
}
void run()
{
BarPeriod = 1./60; // Test
LookBack = 5;
set(TICKS);
}
This code can works if Iīm able to run in HFT mode, but I have errors when When BarPeriod is under 1 sec. Iīm getting the data from MT5 account with the bridge.