Pages:
Actions
  • #1 by markoone11 on 23 Aug 2018
  • Hi,

    Can somebody help me to form the correct condition in my trigger...

    I have a trade setup, where I am laying a number of selections, at 1 tick below the current, and backing (greening) out, 3 ticks above.

    I would like to have a condition such that there is a maximum of 3 lay bets, either matched or unmached.

    I wanted to use something like this...

    Market's Trigger Expression  --> (market_ulnum + market_mlnum) less than or equal to 3

    But it is not possible to do that, as there is no option for Market's trigger expression. I can look to achieve the above, using
    s_1_bm_laynum + s_1_bu_laynum +
    s_2_bm_laynum + s_2_bu_laynum +
    s_3_bm_laynum + s_3_bu_laynum +
    s_4_bm_laynum + s_4_bu_laynum +

    etc etc

    But I am sure there is a better way, that I am missing...

    Can anybody help?

    I can see that I have the options to use Market's number of matched lay bets, but I can't combine it with Market's number of unmatched lay bets.

    My thought processes are saying use Selections Trigger Expression market_ulnum + market_mlnum <= 3, but these are market variables, and not a selection variables?

    Thanks

    Mark.
  • #2 by mcbee on 23 Aug 2018
  • hi
    and selections trigger expression market_mlnum+market_ulnum is less than 3

    so if there are 2 it will allow 1 more , but if you have is equal or less than 3 it will allow 4

    mcbee
  • #3 by markoone11 on 23 Aug 2018
  • hi mcbee,

    Thanks for the response.

    The idea is, I don't want more than 3 bets in the same race. 2 is fine, 1 is fine, but 3 is the MAX. The min number of runners is 7, and after watching for some time, I have found a way to allow bets to be layed, once the price has been rising. The detail is not important, as this part is working perfectly, UNTIL I saw a race which had 5 bets placed, as the criteria used was satisfied in all 5. The problem I have is that I don't want more than 3 bets.

    I think I have the logic correct in using    (matched count + unmatched count) <= 3

    Also, given that one of my 'try-out' triggers, is that I will ask for 1 tick below, and the criteria are satisfied, it will ask for 1 tick below lay_price, which will give me an unmatched lay bet, and potentially at some point, this bet will get matched. Whilst this is going on, I may have achieved another matched bet, so I will have 2 matched bets, and if another is placed, and it is unmatched, then market_mlnum = 2, and market_ulnum = 1, and as such, there cannot be any more bets placed, as the sum of market_mlnum + market_ulnum = 3

    BUT, I want to check that the matched bets AND the unmatched bets, are no more than 3, so, say 1 matched and 2 waiting to be matched, or any combination, as long as the sum total of bets les than or equal to 3.

    Which gave me the thought of using (market_ulnum + market_mlnum) is less than or equal to 3, where the sum of these 2 values will give me the total bets, be that matched or unmatched, which is why I used the above.

    The unfortunate thing is, I don't know how to get the number of ALL bets, and use it in a conditions.

    I am sorry that I am quite verbose, but I think its a simple requirement I am asking for, but I just am not sure how to achieve it.

    Thanks for any help

    Mark.
  • #4 by markoone11 on 23 Aug 2018
  • ahhhhh!!! fool!!

    mcbee, I have just twigged what you meant

    DOH! sorry

    yes, you are correct, so < 3 means allowing 1 more bet. Thank you for correcting my schoolboy error.

    I am still stuck on how to achieve it because I can't combine (market_ulnum + market_mlnum) < 3, in any part of the trigger conditions.

    Thanks

    Mark.
  • #5 by mcbee on 23 Aug 2018
  • hi
    and selections trigger expression market_mlnum+market_ulnum is less than 3

    can be added to your conditions , it is not for the selection but for the markets number of lay bets matched and unmatched .

    mcbee
  • #6 by markoone11 on 24 Aug 2018
  • Thank you mcbee,

    Mark.
  • #7 by markoone11 on 24 Aug 2018
  • I think to expand on this, I would say that my lack of understanding had led me to assume that I NEEDED to use a MARKET'S variable, because I wanted to get all of the markets lay bets, and so, I couldn't consider using a Selection's trigger expression, because this was based on a selection, and not the whole market.

    mcbee, you have cleared that up for me now, which will now enable me to think more laterally in my development.

    Apologies again for the <= 3 mistake! As a senior developer, I really should be sticking my head in a vice, until the stupid parts get squeezed out, and at this rate, sadly, I may not have much left!

    Thanks

    Mark.
Pages:
Actions