Author Topic: Verifying price increase over 5 stages?  (Read 3108 times)

Tags:
  • All members
  • Posts: 5
  • Karma: +0/-0
Verifying price increase over 5 stages?
« on: Tue, 16 March, 2010, 19:16 »
Hi all,

I've spent the afternoon picking apart the many existing triggers available to download and reading through documentation etc but I'm at a loss.

What I'd like to do is start monitoring a horse market 10 mins before the off and immediately make note of all runners' odds.

Then 8 mins before the off I check all the runners odds again.

This happens a further 3 times totalling 5 sets of odds on each runner.

These sets of odds will then be used to determine whether to back/lay the runner based on a smooth increase/decrease (as opposed to jumps in odds movement or a mix of increase/decrease.)

E.g.

2.0 - 2.2 - 2.4 - 2.6 - 2.8 = Back
2.0 - 2.2 - 2.6 - 2.8 - 3 = No bet (odds jump between 2.2 and 2.6)
2.0 - 2.2 - 2.4 - 2.2 - 2.6 = No bet (odds are a mix of increase/decrease)

Any thoughts on a trigger I can use as a basis pretty please?

EDIT: I've been thinking about other ways to approach this and the following seems logical for a single runner:

- Create 5 user variables
- Check price at 10 mins and set variable 1 to that price
- Check price at 8 mins and set variable 2 to that price
- Check price at 6 mins and set variable 3 to that price
- Check price at 4 mins and set variable 4 to that price
- Check price at 2 mins and set variable 5 to that price
- IF(Variable_1>Variable_2,IF(Variable_2>Variable_3,IF(Variable_3>Variable_4,IF(Variable_4>Variable_5,PLACE_BET_LOGIC_HERE,),),),)

Regarding the 'smoothness' between odds I've seen a few triggers utilising a price_diff type method so I think that could be tweaked for that part.

Any thoughts on the first part though and whether it could be looped to go through all runners and flag them?

Thanks.

  • Administrator
  • Posts: 8952
  • Karma: +337/-2
  • Gender: Female
*
Re: Verifying price increase over 5 stages?
« Reply #1 on: Thu, 18 March, 2010, 18:07 »
Please look at the trigger I'm attaching.

You don't need to create so many variables, as MF Pro keeps in its memory the price  that the selection has had in every refresh within the market history depth (which by default is 30 mins).

The idea of the trigger is to take the difference between the price 10 min ago and the current back price in ticks. Then divide it by 4, thus obtaining the average price increase in ticks in each interval.

Every condition then checks whether the price in the corresponding timestamp is higher than the price in the previous timestamp by that number of ticks.

One remark though - it's quite hard to find a qualifying market and selection.
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Usuários brasileiros, bem vindos ao nosso WhatsApp chat!

Присоединяйтесь к нашей официальной группе ВКонтакте!

  • All members
  • Posts: 5
  • Karma: +0/-0
Re: Verifying price increase over 5 stages?
« Reply #2 on: Fri, 19 March, 2010, 13:04 »
Ooh excellent, thanks very much. I'll take a look at this and see if any tweaks throw up more markets for it.

I noticed you used a hardcoded "/4" to average the four snapshots. Is there a way to make MFP determine the divisor? For example Excel uses =AVERAGE()?

  • Administrator
  • Posts: 8952
  • Karma: +337/-2
  • Gender: Female
*
Re: Verifying price increase over 5 stages?
« Reply #3 on: Fri, 19 March, 2010, 13:14 »
You can create a user variable on top of other triggers, call it somehow, e.g. "divisor", assign it a value, and insert it in the conditions of the trigger instead of 4.

Then whenever you need to change it, just edit the variable's value.
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Usuários brasileiros, bem vindos ao nosso WhatsApp chat!

Присоединяйтесь к нашей официальной группе ВКонтакте!

  • All members
  • Posts: 5
  • Karma: +0/-0
Re: Verifying price increase over 5 stages?
« Reply #4 on: Fri, 19 March, 2010, 13:26 »
Sorry, what I meant was as an example with Form:

For example if I was using the silks operation to calculate an average for each runner's form I'd have:

ADVISOR - 11 (average = 1)
ALAIVAN - 121 (average = 1.33)
BARIZAN - 311112 (average = 1.5)

Each of these has a different number of form results so the following would end up incorrect as the number of entries in the form differs between runners:

(silk_form_1 + silk_form_2 + silk_form_3 + silk_form_4 + silk_form_5 + silk_form_6)/6

ADVISOR - 11 (1 + 1 / 6 = 0.33)
ALAIVAN - 121 (1 + 2 + 1 / 6 = 0.67)
BARIZAN - 311112 (3 + 1 + 1 + 1 + 1 + 2 / 6 = 1.5)

Ideally I'd like to be able to have MFP know how many entries there are for the divisor, e.g.

=AVERAGE(silk_form_1 + silk_form_2 + silk_form_3 + silk_form_4 + silk_form_5 + silk_form_6)

Is this possible or would it assume that a blank entry is "0" and still divide by 6 as if the entry were "000011" instead of the actual "11"?