Pages:
Actions
  • #1 by flanna on 05 Jan 2013
  • Hello,

    How can I make a constant that records the highest level of money in my BF account?

    I' d like the constant to remember the (high) value from day to day, increasing it if the money in my account gets higher.

    I' m also wondering if this should be a "constant" or a "variable". Not really sure what the difference is.
  • #2 by MarkV on 05 Jan 2013
  • Set user variable
    Name: high_level
    Value: IF(total_funds>high_level,total_funds,high_level)
    The above is for real mode.
    You could run the trigger periodically, or after each market.

    A constant is just that (stays the same). A variable changes. In the above example you would set a constant to initialise the high_level variable. e.g value=0 to start, or to reset a variable at the start of each new market, or day etc.

    Here is the value formula which should work with both test mode and real mode. I have not tested it so please try it using test mode.
    IF(test_mode=1,IF(test_funds>high_level,test_funds,high_level),IF(total_funds>high_level,total_funds,high_level))
  • #3 by flanna on 05 Jan 2013
  • Thanks Mark.

    I created a variable called "high_level" and set the scope to "Horse Racing". Then I right clicked on the variable name and clicked on "set value", then I typed in the value as you suggested. The value now shows "unknown variable scope" in red.

    I tried changing the scope to Global Scope but it the "value" field still shows "unknown variable scope" in red.

    Have I missed something?
  • #4 by MarkV on 05 Jan 2013
  • Hi
    Here is a trigger which will update the high_level variable once per market. You can set your own conditions when you want it to run. If you add the trigger to the end of your trigger file, it will update the high_level variable after your trigger file has completed. You can view the value in View Variables window.
  • #5 by mcbee on 06 Jan 2013
  • hi
    the constant should be set to.
    remember last value


    mcbee
  • #6 by MarkV on 06 Jan 2013
  • hi
    the constant should be set to.
    remember last value


    mcbee
    quite right mcbee - thank you - corrected trigger file attached.
  • #7 by flanna on 07 Jan 2013
  • Thanks, folks.

    I'm going to try this out today.
Pages:
Actions