Well... Issue is starting up the beast.
It loads historical data from Binance for past couple days *AND* (!!!) executes trades immediately as if past were present.
That leads to ridiculous order spam and losses caused by fees.
I have tried just about anything to prevent that to no avail.
Couple times I somehow managed to get past this stupid stage (with at least 1 badly placed trade on hands).
Now it's even worse than that. Eventually data loading just stops with a message that market is closed. Despite that it's not and wasn't.
Guessing - that's Binance throttling requests.
function run()
{
BarPeriod = 1;
LookBack = 50;
// tried setting StartDate, EndDate. seemingly to no effect
asset("MATICUSDT");
Verbose = 7;
if(crosswhatever()) { // yes, I made sure that at least couple minutes MUST pass before these hit true
enterLong(1); // 1 to intentionally fail the trade and avoid losses
} else if(crosswhatever()) {
enterShort(1);
}
}
It is Saturday August 14 today. Zorro executes trades based on data from 21-08-12.