How do I compare the current price with that 1 hour ago?
- Quick Tips
- How to make a trigger start 45 sec after or before the off?
- After I started MF Pro and opened 'Triggers', I can't see the triggers I added last time
- How do I stop it betting when my balance reaches certain level?
- My triggers are not working. What to do?
- How to calculate the amount I want to back to win £100?
- How can I apply staking plans?
- How can I cancel a trigger if another trigger has worked?
- How do I compare the current price with that 1 hour ago?
- How to bet a percent of the total bank
- How to bet on a selection based on its position in the list, and not its price
- How to make a trigger bet the default betting amounts specified for the market
- How to check or uncheck all selections in the market
- How to bet to a fixed liability/payout
- How to bet on the selection with the specific BetFair order
- How to cancel all unmatched bets if at least one was matched
- How to apply triggers to specific selections
- How to cancel unmatched bets and post them at the best price before the start of the event
- How to Dutch Selections Chosen By Specific Conditions
- How to bet in races with a specific number of runners?
- How to stop betting after x wins/losses in a row?
- How to back at lay odds and lay at back odds?
- How to eliminate the loss on possible winners In-Play?
- How to apply triggers to specific markets
- How to apply various stop-loss methods
- How to determine whether the previous event affected by a trigger has finished
- How to apply the 'Fill or kill' rule?
- Betting on selections whose IDs are given in Excel
There are two ways of doing this: through a special trigger condition, and through a trigger variable.
1. Trigger condition
Selection's Back Price Dif over [x] mins
Selection's Lay Price Dif over [x] mins
By inserting a number instead of [x], you can get the absolute price difference within the last x minutes. The word "absolute" means that the difference is not given in price ticks. For example, if the back price was 4.0 ten minutes ago, and now became 4.4, then the condition:
Selection's Back Price Dif over 10 mins is equal to 0.4
will be true, because the price has changed exactly by 0.4. If it were 4.4 five minutes ago, and became 3.8, then "Selection's Back Price Dif over 5 mins" will be -0.6.
Therefore to know how much the price changed within the last hour, construct a similar condition:
Selection's Back Price Dif over 60 mins ...
or
Selection's Lay Price Dif over 60 mins ...
2. Trigger Expression
There are special trigger variables returning the price difference over time as an absolute value, and as a number of ticks. They are, respectively, pdif_[number] and tdif_[number]. You can use these variables in trigger expressions. To find out whether the back price grew more that by 5 ticks over the last 20 minutes, create the following condition:
Trigger Expression tdif_20 is greater than 5
Another example: finding out if the price has dropped by more than 20% over the last 15 minutes:
Trigger Expression -pdif_15*100/(back_price-pdif_15) is greater than 20
If the price was - say - 6.0 fifteen minutes ago, and became 5.0, then pdif_15 will return -1.0. Inserting these figures in the formula will give us:
--1*100/(5--1) = 100/6 = 16.67%
So it is not greater than 20.
Examples
1. Lay on any selection whose price increased by 3 or more ticks over the last 10 minutes
Action: lay
Price: lay_price
Amount: specify amount
Markets, Market Status: choose appropriate
Selections: All Matching Selections
Execute: once per market
Conditions are met:
Any Selection's Lay Price is greater than 0
and Trigger Expression tdif_10 is equal or greater than 3
2. Lay on any selection whose price increased by 20% over the last 10 minutes
Action: lay
Price: lay_price
Amount: specify amount
Markets, Market Status: choose appropriate
Selections: All Matching Selections
Execute: once per market
Conditions are met:
Any Selection's Lay Price Dif over 10 mins is equal or greater than (lay_price-pdif_10)*0.2
3. Back on any selection whose price decreased by 40% within the last 20 minutes
Action: back
Price: back_price
Amount: specify amount
Markets, Market Status: choose appropriate
Selections: All Matching Selections
Execute: once per market
Conditions are met:
Any Selection's Back Price Dif over 20 mins is equal or less than -(back_price-pdif_20)*0.4
