Hello!
I'm having a few issues getting a cross-market setup to work correctly, and was hoping someone may have some solution(s).
My current setup is geared to place bets in three different markets, at the same time, provided certain conditions are met (all calculations are based on available prices in the markets). Both speed and accuracy are critical to the setup working successfully, but I can't seem to get both at the same time.
Speed: I can operate the setup using a single trigger, with three actions (one per market), set to fire when a (relatively dense) single line condition is met. However, if I set the trigger to calculate from a single market then I cannot 'move' certain information into the other markets for use (e.g. the price(s) in the other market(s) that caused the trigger to fire) so any split second price movements can lead to failure (i.e. backing at back_price can produce a lower figure than the one used in the calculation). Alternatively, I can let the trigger run the calculation in every market, so the information needed is available everywhere, but then this also leads to errors as the markets are not refreshed in perfect sync - such that the same calculation can return different values in different markets (even if they're very closely synced). The speed at which things work is as fast as can be, but the inaccuracies which happen mean its either unworkable or unsuccessful.
Accuracy: This uses the above setup to identify that a selection has met the condition, but saves all the relevant information as (event level) user variables which ensures accuracy. A second trigger then places the relevant bets in the three markets on the selection identified using these variables, and a third trigger then resets everything. However, this method means that it can only operate on one selection at a time, and it also adds at least one refresh delay into the process (0.5 delay is probably workable, but I'd be looking to have this running across up to 100 markets at once, and the calculation load is already heavier than I'd like). The method is 100% accurate, but the delay/load means bets don't always hit their targets fast enough. This is better than having inaccuracies, as the bets can wait to be matched if prices have moved, but if any of the bets miss then there are liabilities which I'm keen to avoid (I can implement safeties for if this does happen, but the trigger is set to fire only when all the bets are actually available, so greater delay = greater chance of missing).
Load: The calculation I'm using has quite a lot of variables, and has to be run relatively frequently (i.e. quick refresh rate), which creates quite a bit of load. This may be manageable if the calculation were run in only one market per event, but as that makes it unworkable I need to run in it at least three - tripling the load. This might be workable at a push, but as I can't get the 'speed' version to work successfully, the load is further increased as additional triggers (to bet and reset) are constantly checking to see if they're needed. The 'accurate' setup can handle maybe 9 markets at once without too much trouble, things get sluggish between 10-20, and worse at 20+. (N.B. I'm not sure this is limited by my hardware, as neither my processor nor memory are maxed out during operation, but it'd be useful to know which side the bottleneck is on/whether upgrading my PC would allow MF to handle greater load).
Any suggestions as to what I could do which would maintain accuracy, whilst still making everything as fast and low-load as possible?
Thanks!