Pages:
Actions
  • #1 by LiAlH4 on 12 May 2018
  • Hi,

    I am thinking of making a new trigger but don't even know how to approach this. 

    Basically, what I would like to do is to do live trading depending on how odds behave in a certain time window. For example, I would like to enter the market when odds in the last n minutes changed by less than x ticks. I was thinking of calculating standard deviation every n minutes but it seems hard and it might be some easier solution that you are aware of.

    Any help is greatly appreciated. 

    Thank you
  • #2 by MarkV on 12 May 2018
  • Hi
    these selection variables should do precisely that:

    tdif_{minutes}
    The change of the back price over the time specified, in price ticks. For example, if the price has changed from 3.0 to 3.65 within 4 minutes, then tdif_4 will return 13.
    ltdif_{minutes}
    The change of the lay price over the time specified, in price ticks. For example, if the price has changed from 6.0 to 5.1 within 11.5 minutes, then tdif_11.5 will return -9.

    so your condition could be something like:
    and selections trigger expression tdif_5 is between -10 and 10

    there is also a selection parameter condition you could use:
    and selections back ticks dif over n mins is between -10 and 10
  • #3 by LiAlH4 on 13 May 2018
  • Mark,

    You are awesome. Thanks
  • #4 by LiAlH4 on 14 May 2018
  • Mark,

    A quick question. Is it possible not to check this criteria during HT break (footie markets)? 
  • #5 by MarkV on 14 May 2018
  • Hi
    the match_minute variable increments during 1st half stoppage time and then resets to 45. e.g. it goes
    44, 45, 46, 47, (ht start) 45, 45, 45....(2nd half start) 46, 47, 48....

    so you could use a condition block something like:

    AND
         selections trigger expression match_minute is outside 44 and 50 
         and selections back ticks dif over n mins is between -10 and 10

    or you could similarly use minutes since the off making an allowance for stoppage time:

     AND
         markets minutes since the off is outside 47 and 63
         and selections back ticks dif over n mins is between -10 and 10  

    you would need to test to find your optimum "outside range"
         
  • #6 by LiAlH4 on 15 May 2018
  • Thanks Mark! The first solution seems to be working well for me. 

    My final question would be about tdif_{n} variable. Does it accept high precision floats? Basically, I am thinking of creating a function that changes the value of n as a function of time.

    So let's say it is 30th minute into the match, then I can calculate n= f(t=30) = 5 (let's say). What if my function returns a crazy number like 3.63463414?? Will tdif still accept it?

    I have tried using {} and (), such as tdif_{func} and tdif_(func), to put my function (quadratic with respect to match_minutes) after tdif_ but my trigger does not fire. What would be the correct syntax?

    Thank you for all your help
  • #7 by LiAlH4 on 15 May 2018
  • Oh my god. I have found where the problem is. If you use any formula with tdif it will give you something like this"
    14:54:28    Checking condition and Selection's Trigger Expression tdif_(match_minute*-0.0852+8.3) is between -20 and 11.
    14:54:29Selection: Under 2.5 Goals, initial expr.: tdif_(match_minute*-0.0852+8.3), intermediate: tdif_+3.78184400, final: tdif_+3.78184400.
    14:54:29Selection: Over 2.5 Goals, initial expr.: tdif_(match_minute*-0.0852+8.3), intermediate: tdif_+3.78184400, final: tdif_+3.78184400.
    The problem here is that + in tdif_+3.78184400.

    I have tried two conditions one was tdif_(0.5) -> working fine, and tdif_(+0.5) -> not working at all.
    Any solution to this??
  • #8 by MarkV on 16 May 2018
  • Hi
    I've had a bit of a play and I think you need to use an absolute value and calculate the formula in a user variable. Adjust your between range accordingly. 

    TRIGGER
    set user variable, name: myvar, value: ABS(match_minute*-0.0852+8.3)
    no conditions
    execute: no more often than 0.2 sec

    your trigger condition:
    and selections trigger expression tdif_myvar is between 0.1 and 11 



Pages:
Actions