So I just discovered that my EA's don't work in the weekends

 
haha gotcha! but actually, I can't run back testing on my EA's in the weekends, because I use 'MODE_TICKVALUE' in my calculations; and if the markets are closed, it pulls the 'live' value for that 'constant'; which is ZERO.
you got me good, MT4.

    double tickValue = MarketInfo(Symbol(), MODE_TICKVALUE);
    double point = MarketInfo(Symbol(), MODE_POINT);
    double slDistance = MathAbs(Ask - stopLoss) / point;

    double lotSize = targetLoss / (slDistance * tickValue);
2024.07.20 12:45:44.567 2024.01.17 10:00:00  RSI stacker multitrade GBPCHF,H1: zero divide in 'RSI stacker multitrade.mq4' (139,47)


I was building stuff last weekend and it kept giving me 'divide by zero' errors and was driving me NUTS, I couldn't figure out how or where my math was 'wrong'.
It wasn't. I only figured it out because I was back-testing last night and using a spreadsheet to record my historical; then resumed again today with the same bot on the same pair etc etc to just get a straight up "NOPE" from my computer.

so either I have to 'adjust' my dynamic lot sizing in the weekends, or find another hobby :)
 

Can not reproduce. My advisors that use MODE_TICKVALUE (and other MarketInfo values) work without problems in the tester on weekends.

I'll tell you more - MarketInfo can return 0 in live mode too. Therefore you should check the error and return value of MarketInfo every time you call it. If the data is not available, then do not trade this tick.

I also request MarketInfo values ​​(which are necessary to calculate the lot) with each tick so that the terminal keeps this data up to date.