Hello friends.
I'm developing a trigger for dutching in greyhound racing.
Today it is based on the back_prices of the market, undergoing some conditions.
I wanted help in the next step, which would be the trigger reads a TXT file with tips indicating the favorites from 1 to 6, mix (I will say the rule ahead) with the favorites (1 to 6) according to their back_prices.
This new selection (new favorites from 1 to 6) would go through my conditions (already in operation today) for the trigger to decide whether to enter (with dutching in 2, 3 or 4 favorites) or not.
How the mixing should work:
A = favorites according to current back_prices F1,F2,F3,F4,F5,F6
T = favorites according to my tips TF1,TF2,TF3,TF4,TF5,TF6
M = mixed favorites M1,M2,M3,M4,M5,M6
Example 1:
A = 3,1,2,5,6,4
T = 6,1,5,4,2,3
M = 3,6,1,2,5,4
The trigger would do a zigzag, starting with A. If the number already exists (see case F2, which was already chosen from A), jump and choose from the other list (A or T).
Example 2:
A = 6,3,1,4,2,5
T = 3,4,6,2,1,5
M = 6,3,4,1,2,5
Each line of the TXT file could have (to be able to select by Market Name):
date (YYYYMMDD), hour (HHMM), City, TF1,TF2,TF3,TF4,TF5,TF6
My trigger already eliminates the runs that do not have 6 greyhounds and those with greyhound reserves (Res), so if it's easy, I can generate the TXT file with the names of the greyhounds and not with their numbers.
If the race is not found in the TXT file, the trigger will make M = A and set a variable to indicate it.
I appreciate who can help in implementing the above routine so I add in my trigger.