Pages:
Actions
  • #1 by redarme on 20 Jan 2013
  • hi all

    Would someone mind telling me how i would record the last price at which i have traded for a given index ?

    I am making back and lay bets using the index so have a bunch of back and lays for index 1 and i need to know the traded price for the latest one - (whether it was a back or lay doesn't matter)

    The last price at which i traded is what i base my next bet on so bm_layp and bm_backp arent that helpful because one of them isn't the last bet and if i include a condition of (last traded price is x ticks higher than bm_layp or bm_backp) one of these prices will activate the trigger despite not being relevant to what is going on in the market at that specific time.

    I've tried user variables based on the time the bets were matched e.g (now_time - bm_laytime)/0.00001157 is greater than (now_time - bm_backtime)/0.00001157 but struggle with what to put as the value for the variable.

    thanks





  • #2 by pcal72 on 20 Jan 2013
  • Hi

    Will try to help

    I think bm_type is what you need.

    From manual explanation.....

    "The type of the last non-SP matched bet placed on the selection.
    The variable will return the index that corresponds with the type of
    the bet. Thus, 1 stands for a lay bet, and 2 stands for a back bet. If
    no matched bets found, this will return 0."

    So...

    First you need be sure u have any kind of bet. U can use this.

    And selection index is equal to x
    And selection trigger expression bm_number is greater than 0


    Now, dont know how you intent to use it,but after u know there are bets placed in this index, using this formula will give u the last bet price u place, based on bm_type.

    IF(bm_type=1,bm_layp,bm_backp)

    Hope that fix your problem

    pcal72
  • #3 by londolozi on 20 Jan 2013
  • What about an IF statement with a user variable as you say.
    IF(bm_backp>0,bm_backp,bm_layp)
    Affected by Trigger x [the one that fires the back or lay]
  • #4 by redarme on 20 Jan 2013
  • perfect - thanks for the replies

    using the 'if' statement as the value of the trigger seems to have done the trick.
Pages:
Actions