Author Topic: Variable for increasing prices only  (Read 1040 times)

Tags:
  • All members
  • Posts: 87
Variable for increasing prices only
« on: 16 Aug 2020, 15:40 »
Hi,
I have set up a variable to place bets when the price is between two prices, let's say 5 & 10. However, I only want the trigger to place bets when the price is increasing to reach between 5 & 10. So if a selection started off with bigger price than 10 and decreased to reach below 10, I want the trigger to ignore it.
What variable do I need to use and how?
Thanks in advance.

  • Moderator
  • Posts: 3606
*
Re: Variable for increasing prices only
« Reply #1 on: 16 Aug 2020, 16:45 »
Hi
you need to define your starting off price.
let's say Betfair Starting Price
condition will be:
and selections actual starting price is between 1.01 and 4.9

with this condition the price of the selection has to rise from BSP to get to your range of 5 to 10 
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: 87
Re: Variable for increasing prices only
« Reply #2 on: 16 Aug 2020, 23:03 »
Hi Mark, sometimes a selection who might have an sp greater than the upper limit may drop in price if they are winning but then their price might increase again if they start losing again. I want the trigger to be able to place a bet when they pass the price bands in the increasing direction. Is there not a variable to determine if the movement of the price is increasing or decreasing?
Your method of using the sp will not place a bet in the above example because the sp was greater than the upper limit.
Please advise.

  • Moderator
  • Posts: 3606
*
Re: Variable for increasing prices only
« Reply #3 on: 17 Aug 2020, 08:13 »
Hi
OK, from your first post I understood you wanted to ignore selections with a starting price higher than your upper limit.

a variable that shows if a price is increasing or decreasing is tdif_{minutes}, or pdif_{minutes}
e.g. if tdif_0.25 returns 9 then price has drifted 9 ticks in last 15 seconds. If it returns a negative value then the price is coming in.
in your betting trigger:
selections back price is between 5 and 10
and selections trigger expression tdif_0.25 is greater than 4
the above means the current price is in your betting range, and the price has risen at least 5 ticks over the last 15 seconds 

There are various example triggers which demonstrate trading rising prices here.
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: 87
Re: Variable for increasing prices only
« Reply #4 on: 17 Aug 2020, 09:14 »
yes mark, this is what i was asking for. i have seen this variable in some of my triggers but i didn't know what they were for and how to use them. thanks for the explanation.

  • All members
  • Posts: 87
Re: Variable for increasing prices only
« Reply #5 on: 21 Aug 2020, 19:41 »
If I wanted to track the decreasing prices do i use negative value, ie. pdif_0.25 greater than -2 ?

  • Moderator
  • Posts: 3606
*
Re: Variable for increasing prices only
« Reply #6 on: 22 Aug 2020, 20:51 »
If I wanted to track the decreasing prices do i use negative value, ie. pdif_0.25 greater than -2 ?
Hi
yes a negative value returned by pdif_ is a falling price, it should be less than to measure a minimum decrease

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.

 

Please note, BetFair is seems to be currently OFFLINE