Author Topic: Sleep for X secs and find PL for each player  (Read 709 times)

Tags:
  • All members
  • Posts: 59
Sleep for X secs and find PL for each player
« on: 01 Dec 2022, 15:26 »
Hi All,

I have 2 questions that I haven't been able to find the answer to in the docs.

Question 1.
Is it possible to set a trigger to sleep after all conditions are met, then recheck the conditions?

A couple of examples:
Example 1.
- Trigger looks for 1-0
- Goal is scored and score is 1-0
- Wait a couple of mins while VAR check is happening
- Recheck that it's still 1-0
- Open trade

Example 2.
- Trigger looks for tennis player to score break point
- Break point scored
- Wait 5 seconds while market goes haywire, then settles
- Make trade (no need to recheck conditions)

Question 2.

Is it possible to find out how much profit/loss is on each player?

Example.
- Player 1 has £10 backed at 2.2
  - Now player 1's PL is £11.76
  - And player 2's PL is -£10.00
- Then a few more trades happen
  - Now player 1's PL is £5.02
  - And player 2's PL is £2.10

This one probably didn't need an example ;D

Can I find out that P1 has £5.02 and P2 has £2.10?

Thanks










  • Moderator
  • Posts: 3597
*
Re: Sleep for X secs and find PL for each player
« Reply #1 on: 01 Dec 2022, 17:39 »
Hi
Yes with variations of conditions:

Q1E1
after goal set user variable eg. lgn with value market_score1+market_score2
and check the variable is the same 2 mins since last goal
markets minutes since last goal is greater than 2
and selections trigger expression market_score1+market_score2 is equal to lgn

Q1E2
timer trigger:
set a user variable in the break point trigger eg. bpt with value now_time
then in trade trigger use this condition:
and selections trigger expression (now_time-bpt)/mf_second is greater than 5

this will wait 5 seconds after break point scored to fire the trade trigger

Q2
use selection variables either tradeout_pl or tradeout_net
see the explanations in helpfile

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: 59
Re: Sleep for X secs and find PL for each player
« Reply #2 on: 02 Dec 2022, 11:14 »
Hi Mark,

Thanks again for the explanations.

The sleep timer is very clear.

In terms if the P/L on each selection, I'm still slightly unsure.

What I want to look for is a gap.  So let's say I want to know whether, in a tennis match, the fav has a larger profit than the dog by more than £1.

I can get the fav PL by:
Favourite's - Trigger Expression - tradeout_pl -  is greater than - [but what would I put here?]


  • Moderator
  • Posts: 3597
*
Re: Sleep for X secs and find PL for each player
« Reply #3 on: 02 Dec 2022, 17:41 »
Hi
r_ prefix = rank
r_1_tradeout_pl = rank 1 (fav) Trade out P/L
r_2_tradeout_pl = rank 2 (2nd fav) Trade out P/L

condition:
selections trigger expression r_1_tradeout_pl - r_2_tradeout_pl is greater than 1.00
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: 59
Re: Sleep for X secs and find PL for each player
« Reply #4 on: 02 Dec 2022, 19:05 »
Ahh, lovely. Thanks Mark

 

Please note, BetFair is seems to be currently OFFLINE