by pawilson » Fri Mar 26, 2021 1:22 pm
Hi, i am trying to find how to update the tick offset on an Auto Lay bet that is waiting to be filled after Back bet has been triggered
I am using BACK-TL2-SL10-IPC to get the bet started
Just to make sure the above is correct this should be performing
1) Trigger a Back bet
2) Auto Level Lay bet 2 ticks away from back price
3) Auto Level Stop loss 10 ticks away from market
4) Keep in play Lay bet if Back bet has been triggered
Now what i want to do is
1) At "X" time before official off time check if live Back bet is current Fav (this i have via another formula)
2) If true Update the waiting to fill Auto level Lay bet so it is no longer 2 ticks away but instead a different number of Ticks IE 10
3) Also have the ability to set the Auto Level amount of the Lay bet using the new ticks so that the amout is x% of that 100% Auto level amount
One solution i had thought of was to not have the IPC for keep in play and then calcuate the the amount needed at the 10 ticks and send a new Lay trigger using that info, and at same time cancel the existing Auto Lay bet. But would be easier if there was an update trigger instead
Lastly, if anyone has an easy formula to calcuate the Auto Level amount for any price (i think it has to include commission fees) that would save me some time. I can calc that eventually just dont have it yet
Thanks