Author Topic: specific number of trades for each qualifying selection...  (Read 1237 times)

Tags:
  • All members
  • Posts: 314
Hi,

I am trying to develop a trigger using some of the help given by MarkV and mcbee, I have most of it done, but I am stuck on one last part...

The trigger is a lay then back (greenup), taking 1 tick, and using a set number for stop loss, depending on the odds the lay bet gets matched at - I have done all this in my trigger, no problem.

Over the last week or so, I have been doing this manually using the price ladder, and had some good results, and so, I can conclude that I like my strategy, BUT, I cannot sit at my PC all day trading, and so, I would like to test it using my trigger, and the problem I am wanting to allow EACH qualifying selection to take the trade a maximum of 2 times.

There could be a number of selections for each market, and if they each meet the criteria, then a lay bet will be placed, and if it isn't matched at in play, no more bets, but if at least 1 Lay is matched, then their  back bets and possible stop loss will continue before and during in play. I actually want to allow a maximum of 2 lay bets for each selection, as long as the criteria is met. I think I have coded everything correct, but I am not sure how I tell it to do this a maximum of 2 times. I can see from the 'Execute' that I can choose 'once per selection', or 'specific number of times', and it's this second option which is causing me confusion. To expand on this, if I set 'specific number of times' to 2, what happens if there are 4 qualifying selections, will this command try to execute all 4 selections 2 times each?

If that is the case, then I would have hoped to see 'specific number of times PER SELECTION' - but of course this is not the case, and I am not sure if my coding will produce the required actions, which are trade each horse that qualifies, a maximum of 2 times...

Thanks

Mark.

  • Moderator
  • Posts: 3605
*
Hi
try one of these conditions in the lay trigger:
and trigger <name of laying trigger> number of runs per selection is less than 2
and selections number of matched lay bets is less than 2

or a variation on the last if you want to limit by lay matched amount:
and selections lay matched is less than £xx.xx
Please read the following disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.

 

Please note, BetFair is seems to be currently OFFLINE