• #1 by LiAlH4 on 25 Nov 2021
  • Hi,

    Feel a little bit embarrassed to post such trivial question but I sort of fried my brain on the equations today. The idea is as follows:

    I back selection at odds X and want to cash out for 65% of the predicted profit (in case the pick wins), examples:

    I back under at 2.40. I want to green when the profit is 0.65*(2.40-1) = 0.65*1.40 = 0.91
    Similarly, if I back at 9.00. I want to lay when the potential profit is 0.65*8 = 5.2 

    I coded it this way, which I am not super happy about:

    GREEN UP by ticks = 1
    if selection trigger's expression is stake*(bm_backp-1)-(lay_price-1)*(bm_backp/(lay_price-0.05)*stake) is greater than 0.65*stake*(bm_backp-1)

    So in general it works fine, but the problem is it waits for the lay_price to approach a certain value and if the market has poor liquidity I sometimes miss the green up opportunity.

    What I would like to do is to place the appropriate lay bet shortly after the back bet has been matched and keep it there throughout the game. What would be the best way to do it?

    Thank you,

  • #2 by Tim (WellDoneSoft) on 26 Nov 2021
  • Have you tried "Attempt to greenup" trigger action?
  • #3 by LiAlH4 on 26 Nov 2021
  • Hi Tim,

    Good suggestion! but I still do not know how to tell the program to attempt greening up for 65% of the payout
  • #4 by Tim (WellDoneSoft) on 26 Nov 2021
  • Action: Attempt to greenup
    Based on profit %: 100/ ( (bm_backp - 1) * 0.65)
    Condition: Any selection's matched back is greater than 0
  • #5 by LiAlH4 on 26 Nov 2021
  • Fantastic! thank you!!!