Author Topic: Stop backing if lay price greater than certain number of ticks [TCKTWGV-245971]  (Read 2798 times)

Tags:
  • Administrator
  • Posts: 8818
  • Gender: Female
*
Copied from the support:

Quote
I am using a trigger to back horses or dogs at back_price. I want to add a condition to my trigger that will stop the bet being placed if the lay price is more than a certain number of ticks greater than the back price.
for example" AND lay price = or less than 5 ticks greater than back price"
If this is not possible to use some sort of % condition to achieve the same result.
 
I do not know what the back price of my selection will be, it could it any price as it is chosen by trigger, but i don't want to back it if the lay price is not in the same region as the back price.
 
can you please assist. Many thanks in anticipation.

Please note that the triggers for version 6 are no longer created as a part of free technical support.
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

Присоединяйтесь к официальному Telegram-каналу!

  • Moderator
  • Posts: 3597
*
Hi
The condition to add to your backing trigger is:
and selections trigger expression g_ticks(back_price,lay_price) is equal or less than 5

if you are using version 6, if I remember correctly the syntax is:
AND Trigger Expression g_ticks(back_price,lay_price) is equal or less than 5

Explanation from manual:
g_ticks(price1, price2)
Returns the difference between price1 and price2 in ticks. If price1 is less than price2, the result will be positive, otherwise - negative. Examples:
g_ticks(2, 3) = 50
g_ticks(4, 3.5) = -10
g_ticks(6, 6) = 0
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.

  • Élite
  • Posts: 3698
  • Gender: Male
*
hi
wow, that looks complicated.
for v6 and v7 just use
and selections back price is equal or greater than r_ticks(lay_price,-5)


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.

  • Moderator
  • Posts: 3597
*
Hi
Attached is a trigger file demonstrating both conditions. It will back the favourite, but you can modify it to your own requirement. Only one trigger should be enabled:
In the constants set:
amount to back
maximum ticks between best back and best lay prices
minutes before the off to bet

Please try it in test mode.
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