Hi,
this is related to my other question
https://community.welldonesoft.com/marketfeeder-troubleshooting/check-for-market-name-in-file/msg52047/#msg52047The idea is that I place a lay bet on the favourite, using certain conditions, and if it wins, that's the end. If the horse wins, then I need to use loss recovery on the next qualifying race to get back my loss (100%) and also place the stake value.
I currently have a simple constant called _add which contains the amount lost, and this is used in the back amount formula
as (bank_size * perc_bet) + (_add/0.95)
Ideally, I would really like to be able to detect if the horse won or lost, and then have something in the trigger(s) to either stop at the winning bet, or increase the next bet amount according to the formula above. It has a maximum of 3 losing bets and if that's reached, I write off my losses.
I suspect this would be easy to do if I didn't have other strategies running, but I do have a number of them running, and so detecting the win amount or loss amount may not be related to that specific race of that strategy, so I am a bit stuck on how to do this.
in a nutshell, here is what I am trying to achieve
1. Lay the favourite, using the market_id condition, and odds > _some_odds, lay amount = (bank_size * perc_bet) + (_add/0.95)
2. if horse loses, stop
3. If horse wins, then add losses to the _add variable (constant)
4. Lay the favourite, using the market_id condition, and odds > _some_odds, lay amount = (bank_size * perc_bet) + (_add/0.95)
5. if horse loses, stop
6. If horse wins, then add losses to the existing _add variable (constant)
7. no matter what, this is the 3rd race, so no more betting (there will only be 3 market_id's anyway), if it wins, then write off losses
the conditions can only be based on the specific horse that is bet on, and detecting whether it has won or lost, and then taking the action, as above. I may have other strategies that are using this horse for betting, and it may even be that it places a back bet - so, in effect, for this strategy, I am looking to see if this horse won or lost its race, then take appropriate action.
Can this be done?
Thanks
Mark.