Pages:
Actions
  • #1 by armarni on 08 Oct 2019
  • Hi everyone

    I have been using the 'write to file' action to store a lot of information about each UK horse racing market at 07:30 am each day.  There can be 40 races on most days, so the trigger is trying to write an awful lot of info about each market all at the same time, and as a result I think errors and discrepancies are creeping in.

    What I want to do is start this process at 07:30:00 and do it one market at a time, pausing for 3 seconds before executing the trigger in the next market so that each market has a chance to write its stuff to file before the next one does the same.

    I have been trying to combine now_time_timestr and 7:30:00+market_index to create a trigger condition that achieves this, but to no avail.  A lot of examples I've seen on here use the difference between now_time & time of the last bet to create delays, but this trigger needs to have a delay without any bets having been placed.  Does anybody have any suggestions?

    Thanks.
  • #2 by pcal72 on 09 Oct 2019
  • Ok One idea, maybe works

    Crate a variable "timer" global and it starts at now_time value
    Create a variable "idx_cntr" to pick market_index+1 must be global and first start must be value 1

    Ok now when your trigger fire timer will be fixed with"now_time" again
    And "idx_cntr" must be "market_index+1" IF all markets NUM are =< than marker_index+1, if negative it will be 1 again.

    In trigger conditions 
    idx_cntr must be = market_index
    And (now_time-timer)/mf_second between 3 and 10000

    Hope that helps you
    Pcal
  • #3 by armarni on 09 Oct 2019
  • Hi Pcal

    thanks for taking the time to think about the problem.  I'm working up a trigger using your suggestion.

    The line below is confusing me slightly.  Is it an IF formula to use, and if so what is the syntax of it?

    IF all markets NUM are =< than marker_index+1, if negative it will be 1 again.
    Thanks once again
  • #4 by armarni on 10 Oct 2019
  • Hi Pcal

    Just an update to let you know that your suggestion worked, so many thanks.  It behaved as you predicted and so long as the market refresh rate was 1 second or under, it created the appropriate gap between firing.

    Cheers
Pages:
Actions