I have a set of rules that are laying by liability to a fixed stake. At a certain point I'm trading out x% of that liability using a back, calculating the amount by using the current P&L on that player
Which works fine for the first lay but I can't work out how to calculate that percentage when I have an existing +/- figure in the player P&L before I make the lay. I can't use last matched bet info as that gives the amount matched, not the liability. I only want to remove liability from the last lay, not overall.
Anyone point me in the right direction ?
Calculating Percentage of Liability
Just came to me that I could save the P&L to an SV prior to the lay then calculate the difference between before and after. That should result in the liability for the last lay - if my thinking is correct. Would need to take into account postive or minus figures.
Or lay price * fixed stake?sniffer66 wrote: ↑Thu Sep 17, 2020 5:26 pmJust came to me that I could save the P&L to an SV prior to the lay then calculate the difference between before and after. That should result in the liability for the last lay - if my thinking is correct. Would need to take into account postive or minus figures.
Anbell wrote: ↑Fri Sep 18, 2020 2:47 amOr lay price * fixed stake?sniffer66 wrote: ↑Thu Sep 17, 2020 5:26 pmJust came to me that I could save the P&L to an SV prior to the lay then calculate the difference between before and after. That should result in the liability for the last lay - if my thinking is correct. Would need to take into account postive or minus figures.
Don't think I explained that well in my OP. It's a fixed liability so the stake is variable, based on the price I lay at - BA does that calc when it lays to liability. I can't see how to capture the amount though, apart from the above
Just to be sure I've understood
After laying to a liability you want to take out a % (which works fine)
But then you want to lay again for a liability and repeat the process above taking out a % of that latest lay liability (effectively ring fencing each entry/exit) and not look at the overall P/L after taking a % out then placing a second lay?
After laying to a liability you want to take out a % (which works fine)
But then you want to lay again for a liability and repeat the process above taking out a % of that latest lay liability (effectively ring fencing each entry/exit) and not look at the overall P/L after taking a % out then placing a second lay?
Spot on Dallas. So I need to calc the % of liability for the latest lay. Only way I can think to do it is snapshot (via SV) the "before" P&L and calc the difference between "before" and "now"Dallas wrote: ↑Fri Sep 18, 2020 10:50 amJust to be sure I've understood
After laying to a liability you want to take out a % (which works fine)
But then you want to lay again for a liability and repeat the process above taking out a % of that latest lay liability (effectively ring fencing each entry/exit) and not look at the overall P/L after taking a % out then placing a second lay?
That's how it would need to be done.sniffer66 wrote: ↑Fri Sep 18, 2020 10:53 amSpot on Dallas. So I need to calc the % of liability for the latest lay. Only way I can think to do it is snapshot (via SV) the "before" P&L and calc the difference between "before" and "now"Dallas wrote: ↑Fri Sep 18, 2020 10:50 amJust to be sure I've understood
After laying to a liability you want to take out a % (which works fine)
But then you want to lay again for a liability and repeat the process above taking out a % of that latest lay liability (effectively ring fencing each entry/exit) and not look at the overall P/L after taking a % out then placing a second lay?
The way i'd do it is to store the P/L with the lay rule, then run a SV rule afterwards (with whatever conditions needed to ensure the previous lay has been matched) to store the new P/L
Then minus the first SV from that leaving you with the new P/L from that lay
Great, thanks. At least I know there's not an easy way to do it before going offDallas wrote: ↑Fri Sep 18, 2020 11:10 amThat's how it would need to be done.sniffer66 wrote: ↑Fri Sep 18, 2020 10:53 amSpot on Dallas. So I need to calc the % of liability for the latest lay. Only way I can think to do it is snapshot (via SV) the "before" P&L and calc the difference between "before" and "now"Dallas wrote: ↑Fri Sep 18, 2020 10:50 amJust to be sure I've understood
After laying to a liability you want to take out a % (which works fine)
But then you want to lay again for a liability and repeat the process above taking out a % of that latest lay liability (effectively ring fencing each entry/exit) and not look at the overall P/L after taking a % out then placing a second lay?
The way i'd do it is to store the P/L with the lay rule, then run a SV rule afterwards (with whatever conditions needed to ensure the previous lay has been matched) to store the new P/L
Then minus the first SV from that leaving you with the new P/L from that lay
Actually Dallas, this is where History Lists really come into their own. I have a lot of lay rules in this automation. Rather than edit each I can just create a rule that saves the P&L every second. Then compare the P&L from Now and x seconds ago. If they differ, the lay has been matched, run the calc on the liability and save that to an SVDallas wrote: ↑Fri Sep 18, 2020 11:10 amThat's how it would need to be done.sniffer66 wrote: ↑Fri Sep 18, 2020 10:53 amSpot on Dallas. So I need to calc the % of liability for the latest lay. Only way I can think to do it is snapshot (via SV) the "before" P&L and calc the difference between "before" and "now"Dallas wrote: ↑Fri Sep 18, 2020 10:50 amJust to be sure I've understood
After laying to a liability you want to take out a % (which works fine)
But then you want to lay again for a liability and repeat the process above taking out a % of that latest lay liability (effectively ring fencing each entry/exit) and not look at the overall P/L after taking a % out then placing a second lay?
The way i'd do it is to store the P/L with the lay rule, then run a SV rule afterwards (with whatever conditions needed to ensure the previous lay has been matched) to store the new P/L
Then minus the first SV from that leaving you with the new P/L from that lay
The new functionality has really opened up some possibilities I hadnt even thought of.