Trigger Lay-2H
Create a trigger for horse and greyhound racing, the rule for races are as follows:
Constants:
A- Value Stake (Can be fixed stake or bank percentage, which is best to work on the rule. The preference is that it be a percentage of the bank.)
B- Horses Run
C - Min_Odds Minimum Odds to lay (second Horse)
D - Max_Odds Maximum Odds to lay (second Horse)
E - Rank Horse (Rank Of the favourite to lay) Initially it will be the second
Rules:
1- Runs with at least 5 horses
2 - Enter lay in the second favorite horse (horse with the second smaller odd in lay). The value Of this odd must be between 2.8 and 5.5 (can be a constant)
3 - Enter pre-live 1 minute before the race, hold bet and stay to the end
4 - Do not enter if the market is suspended
5 - If the bet is lost in the next race, the value of the stake must be the responsibility
Of the previous race (lost) if you lose again the same happens, the stake value of the next race
Should be the previous responsibility.
Rule Repetition: If you lose 3 consecutive races, in the next 3 (4,5,6) the value of the
Stake should be the value of responsibility for the third race. After the 3 races, the next
Have the initial stake value set in the constant. (If this "Repetition Rule" condition is too complex or unfeasible, Can be aborted)
EX: Odd 4.52
Racing Stake Responsibility
0 0.25 0,88 won
1 0.25 0.88 lost
2 0.88 3.08 loss
3 3.08 10.78 loss
4 10.78 37.73 loss
5 3.08 10.78 Win or lose - Race repeat 3
6 3.08 10.78 Win or lose - Race repeat 3
7 3.08 10.78 Win or lose - Race repeat 3
8 0.25 0.88
9 0.25 0.88