Pages:
Actions
  • #1 by ehobbit on 15 Nov 2013
  • I've read the manual but I'm still confused.

    In my trigger, I have a constant which is defined as 0.1 * balance.
    The manual says
    "Constants are variables whose values can be defined upon loading a trigger file they are stored in. That is, a constant can be declared before any trigger starts working."

    So I load the trigger and all is fine.
    I then made a deposit to betfair, and my "constant" was immediately recalculated to reflect the new balance. The trigger was not even running.

    So How do I set a truly global constant, i.e. work out 10% of my bank and have that figure available even when the bank changes during the day?
  • #2 by mcbee on 15 Nov 2013
  • hi
    with constants, they must have fixed amounts/letters, not formula's.
    if you want to set the day's amount, then use a trigger to set the amount (trigger set to one time only) or add an action to a trigger that is set to one time only.
    so Add trigger
    set user variable
    name (name of the variable)
    value  balance*0.1
    no condidtions
    selection favourite (only used for activating the trigger)
    markets all markets
    market status  all markets
    Execute  one time only

    this will set the variable to 10% of your balance and will only change if you reload the triggers

    mcbee

  • #3 by ehobbit on 15 Nov 2013
  • Sorted.  :D
    Many thanks for the great support, really enjoying getting back into programming with MFP.
  • #4 by ehobbit on 18 Nov 2013
  • Next issue - how can I reset total_won (or set it manually to zero) so that I can leave the trigger running from day to day?
  • #5 by mcbee on 18 Nov 2013
  • hi
    the only way to reset total_won is to use a new trigger to reset win/lose history.
    so new trigger
    action   reset win/lose history
    conditions
    and selections trigger expression total_won is greater than  (your set profit)
    selection favourite (only used for activating the trigger)
    markets all markets
    market status  all markets
    Execute  once per market


    mcbee
Pages:
Actions