Author Topic: Simple trigger to count number of refreshes and average back price movement?  (Read 9127 times)

Tags:
  • All members
  • Posts: 149
Hello Guys,
I'd appreciate any help here if you could please!

I'm trying to create a trigger that will average a selections back price movement(each b_leap), say over 5 minutes before the off.  ::)

Would anyone be able to provide me with a simple trigger that gives me a 'count' value for the number of refreshes during that time and a total back price movement(would it be b_leap) during the same time so that I can arrive at the average back price movement during that period!

I've set the 'Idle' refresh period to 3 seconds prior to the off.

Kind regards.

  • Moderator
  • Posts: 3631
*
Hi
Why not use tdif_{minutes}
tdif_mins / (60 / idle_rate)

for example:
tdif_5 = 15 (back price change over 5 minutes was 15 ticks)
refresh rate = 3 secs
15 / (60 / 3) = 0.75 avg ticks movement per refresh

so an example condition would be:
selection's trigger expression tdif_mins/(60/idle_rate) is greater than x

If you wanted to do in on price difference rather than ticks use pdif_{minutes}

To count refreshes:
Set User Variable
Name: counter
Value: counter+1


Please read the following disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.

  • All members
  • Posts: 149
Hi,
I did use tdif but I wanted the actual movement, b_leap, each refresh so I could arrive at an actual average over the 5 minute period rather than an overall average and not sure how to calculate all that?

To count refreshes I'd already put similar trigger to your suggestion but it doesn't want to do anything when I'm watching the variables window, it just stays on 0.

I've had problems running triggers properly on my Toshiba laptop since ver 7 was introduced so think that may be down to computer problem, and incompatibilities, rather than me doing something wrong.
Regards

  • Moderator
  • Posts: 3631
*
Hi
I think I may be wrong with the formula in my first post, so please ignore it.
Attached is a refresh counter..
..and I think you can do something similar with b_leap

I'll post it up in a little while
Please read the following disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.

  • All members
  • Posts: 149
I'll take a look... thank you for any help.
Regards

  • All members
  • Posts: 149
Just ran your trigger, does exactly same as mine, displays 0 in variable window, so obviously need new computer as thats where the problem lies, my Toshiba laptop for the refresh part, damn!  :-[

  • Moderator
  • Posts: 3631
*
Hi
If you are betting on a specific selection, for example fav, I thought of adding another user variable to hold the cumulative value of b_leap, and incrementing it as per the counter above. This will only work for 1 selection because it is a global variable.

(re last post)
I can confirm I tested the counter and it does increment. Just checking, the market you were testing on was refreshing wasn't it?
Please read the following disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.

  • All members
  • Posts: 149
Yes markets refreshes 7 minutes prior to the off so have a computer problem here, or Toshiba/MF Pro incompatibility... had problems with another Toshiba laptop too which I sold, 64 bit system, and buyer has no problems running his personal stuff on it.

I wasn't planning to bet on a specific selection, I was looking for a low volatility selections back price along with some other stuff I use to highlight a potential bet selection but was having problems calculating refresh average back price over 5 minutes... think the problem could be my computer.

  • Moderator
  • Posts: 3631
*
Hi
Just check this setting on the off chance:
Settings > Betting Options > Triggers > No triggering till.... should be un-ticked.

Also might be worth trying a new profile with default settings?
Please read the following disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.

  • All members
  • Posts: 149
Yeah the first option is unticked and set a new profile up the other day, will set another up tomorrow but to be honest, version 7 has NEVER run right on my Toshiba since day one. I emailed Les at MF Pro when version 7 was first introduced with problems and still to this day having them.
Regards

  • All members
  • Posts: 149
Hi,
I've set a  new profile up and counter increments fine now, dont know why it wouldn't work with other profile I created couple of weeks ago.

Any idea how I'd calculate an average b_leap value then for all selections to filter out those which are volatile?
Regards

  • Moderator
  • Posts: 3631
*
Hi
Similar to as I was trying to do in the earlier post,
I thought of using a remember trigger to remember selections back prices.
Then 5 minutes later, compare the remembered values to current back prices.
Take the difference and divide it by the number of refreshes from the counter.

If you want to add up the specific b_leap values for all selections, I think the only way is to have a user variable for each selection. Maybe something like what mcbee has done in this topic http://community.welldonesoft.com/triggered-betting-10/being-a-bit-thick-about-user-variables/
Please read the following disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.

  • All members
  • Posts: 149
Hi,
Thanks for your help.

Just downloaded McBee's trigger and will set a variable for each selection, update it each refresh with b_leap to get a cumulative total and average movement!

Thanks

  • √Člite
  • Posts: 3698
  • Gender: Male
*
hi
this will not work how you want.
because the back price leap has a plus and minus value.
so the leap this refresh is -.23
the next refresh is .20
giving a leap of -.03
but the true leap is .43 (from -.23 to .20)
with it having a minus and plus, one cancels the other out.


mcbee
Please read the following  disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.

  • All members
  • Posts: 149
Thats exactly what I want... I'm not looking to measure each movement and end up with a total cumulative figure, I want to see the fluctuation over 5 mins each refresh to somehow gauge the smoothness of the back price!

 

Please note, BetFair is seems to be currently OFFLINE