Pages:
Actions
  • #1 by londolozi on 09 Oct 2017
  • I have am trying to use a 'set user variable' trigger but I get odd results.
    My first variable is mv1 where value = market_volume Individually for each market. No more often than 10sec
    My second variable is mv2 where value = market_volume Individually for each market. No more often than 2sec

    Depending on my market list I may have 2-3 markets active at once.

    In my triggers I test the value of mv1 : mv2 within each market but even though I have set 'individually for each market' my triggers appear to pick up different market mv1 and mv2 values regardless I have set 'Individually for each market' 

    Even though I use Individually for each market do I need to refer to each market as eg. mv1_market_id and not just mv1

  • #2 by MarkV on 09 Oct 2017
  • Hi londolozi
    tested this as follows:

    mv1 no more often than 10 secs
    mv2 no more often than 2 secs
    individually for each market
    favourite only, or first matching selection i.e. trigger fires for only one selection each refresh
    market refresh rate 1 sec

    works fine and view variables shows correct figures for each market in focus 

    mv1 matches market volume on the main screen every 10 secs
    mv2 matches market volume on the main screen every 2 secs
    mv2-mv1 shows difference between the two and is zero once every 10 secs

    also tested with mv1_market_id etc. with similar results.
  • #3 by londolozi on 10 Oct 2017
  • Thank you for your reply Mark,
    Perhaps it's the parsing?

    The aim of the variable to to monitor market activity. Unlike UK racing we don't get the dynamic indicators like 'behind the barriers' so I am trying to create and equivalent such that some races in AU will be avoided.

    The formula I use is mv5 > mv1 + (now_time-refresh_start)/mnt*mktgrowth
    mv1 is run once per market
    Where mnt = 0.000694 mktgrowth = 2500

    In the User Variables window (see Mv1Mv51.jpg not the same race) the results appear to be correct by my manual calculations.

    However, as the Mv1Mv5.jpg shows the final = mv1,which suggests my parsing of the formula is not correct.
    My calculations says 12512+11346.9 or 23858 but the log shows 12512 (mv1)




  • #4 by londolozi on 10 Oct 2017
  • I found this Thread

    So I put all the variables in brackets and now its works?

    ((((now_time) - (refresh_start)) / (mnt)) * (mktgrowth)) + (mv1)

    What are the brackets required? Nothing in help file about this.
  • #5 by MarkV on 10 Oct 2017
  • I think you are right about the parsing. I always understood from using Excel, expressions in brackets would be parsed to values first, and then the whole formula would be parsed. There is a page in the manual about the order of parsing variables in MFP, but as you say no guidance on the use of brackets. Glad you have got it working.
  • #6 by londolozi on 11 Oct 2017
  • Why does this formula return FALSE.
    See image.
    The formula asks if mv5 is greater than ((((now_time) - (refresh_start))/(mnt))*(mktgrowth))+ (mv1)
    Which results in .... Is 141858 > 60152 answer is FALSE??
    Why?
  • #7 by MarkV on 11 Oct 2017
  • Hi
    mv5_market_id is not parsed and returns 141858_135263523 which is not floating point or integer so condition is FALSE

    checking the manual, user variable names cannot contain any variables or functions (even though I tried with _market_id and it seemed ok)

    can you try setting user variable mv5 individually for each market
    and use mv5 is greater than your bracketed formula? it should work.
  • #8 by londolozi on 12 Oct 2017
  • In the end I put mv5 in () as well.
    Seems overkill but now it works well.
    Any markets that are low in volatility are ignored which was my goal.

    The only bug I have now is this

    APi feeds stop regularly

Pages:
Actions