Checking the change in price over a long period of time

Description

Change of price over 3 hours

The problem looks trivial: how to evaluate a change of price over an extended period of time, e.g. 3 hours. MarketFeeder Pro has a ready formula for checking the price change within the user-defined market history depth.

What makes it non-trivial though is the fact that it is very costly to have a market history depth of several hours, which means keeping hundreds of Megabytes in memory, especially when you intend to monitor tens of markets.

Triggers

Download trigger file

The file has two blocks for solving the task in two different ways.

The first block uses the standard MF Pro variable ltdif_{minutes} which returns the change of price in ticks over {minutes}. But that implies you may have to set the market history depth to unreasonable values, such as 180 minutes in the example. Adopt this approach only if you are monitoring no more than a couple of markets at a time, and delete them once they are settled! The advantage of this method is that the change registered by the trigger is "moving", i.e. you can check the price that the selection had 3 hours ago at any moment. The other block is not allowing such flexibility.

The second block remembers the prices of all selections in the market at a certain moment of time (in the example, it is 3 hours and 1 minute before the event's start). Then 3 hours later those prices are compared with the current ones and a bet is placed against the selections whose price has changed by the given number of ticks. This approach does not demand deep market history, but its downside is that you only get to compare prices recorded at fixed moments of time, e.g. at 3 hours and at 1 minute before the off.

Use the constants in the file to set the moments of time between which to register the change of price, as well as the number of ticks by which the price must raise or fall.

 

If you have not heard of BetFair yet or do not have an account, register today and get £20 free. Use the link below:
 
© 2005-2017 WellDone Creative Software. All rights reserved. Terms and conditions.
BetFair® and the BetFair Logo are registered trade marks of The Sporting Exchange Limited. Gamble responsibly.