Author Topic: Spread Profit / Loss  (Read 1768 times)

Tags:
  • All members
  • Posts: 157
Spread Profit / Loss
« on: 06 Nov 2018, 15:33 »
Hi,

Which action to we use if we have back and lay bets on the same selection and want to spread any profit/loss across all selections.

I have tried using Distribute loss and Green-up but they don't work.

Thanks,

  • Moderator
  • Posts: 3597
*
Re: Spread Profit / Loss
« Reply #1 on: 06 Nov 2018, 17:20 »
Hi
spread a freebet P/L equally, try these two triggers in test mode. You will need to add your own conditions to control when you want them to fire.

selection has a positive P/L

LAY
price: lay_price
amount: profit_loss/lay_price
condition: selections profit/loss is greater than 0

selection has a negative P/L

BACK
price: back_price
amount: -profit_loss/back_price
condition: selections profit/loss is less than 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.

  • All members
  • Posts: 157
Re: Spread Profit / Loss
« Reply #2 on: 06 Nov 2018, 20:10 »
Hi spread a freebet P/L equally, try these two triggers in test mode. You will need to add your own conditions to control when you want them to fire. selection has a positive P/L LAY price: lay_price amount: profit_loss/lay_price condition: selections profit/loss is greater than 0 selection has a negative P/L BACK price: back_price amount: -profit_loss/back_price condition: selections profit/loss is less than 0

Thanks for this.

I have tried this before with very good effect if only 1 selection has back/lay trades.

Where it seems to go wrong is if I have more than 1 selection with positive back/lay or negative back/lay outcomes in the same market etc.

I could be wrong but I remember reading somewhere that if you have more than 1 qualifying selection then you need to first find a selections profit with no trades and then deduct that from the selections profit/loss before trying to equalise profit/loss across all selections.

Problem is I cant get my head around on exactly how to build the triggers for it etc.

Help! :(

  • All members
  • Posts: 157
Re: Spread Profit / Loss
« Reply #3 on: 06 Nov 2018, 20:21 »
I think the solution lies here but I cant get my head around how to build the triggers:

First find a selection with no matched bets. This selection has a profit_loss named profit_loss_no_bets

For every selection with positive (profit_loss-profit_loss_no_bets):
enter a lay bet at lay_price with stake: (profit_loss-profit_loss_no_bets)/lay_price

For every selection with negative (profit_loss-profit_loss_no_bets):
enter a back bet at back_price with stake:
-(profit_loss-profit_loss_no_bets)/back_price

  • Moderator
  • Posts: 3597
*
Re: Spread Profit / Loss
« Reply #4 on: 06 Nov 2018, 20:24 »
you're correct, it's in the formulas topic here
I'll have a look tomorrow and see if I can convert to a trigger

just seen your last post, lol. will post here tomorrow if I have a trigger   
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: 157
Re: Spread Profit / Loss
« Reply #5 on: 06 Nov 2018, 21:39 »
you're correct, it's in the formulas topic here I'll have a look tomorrow and see if I can convert to a trigger just seen your last post, lol. will post here tomorrow if I have a trigger

Thanks, your a star. :)

  • All members
  • Posts: 347
Re: Spread Profit / Loss
« Reply #6 on: 07 Nov 2018, 09:08 »
Interested in this too...
The market_tradeout figure just goes out the window completely when you have multiple lay and back bets on the same selection

I would like to know the fomula for how to work out the TRUE tradeout value.

  • Moderator
  • Posts: 3597
*
Re: Spread Profit / Loss
« Reply #7 on: 07 Nov 2018, 10:49 »
ok, this trigger is verbatim as per Martin Steiner's formulae. Brief testing looks like it does the job. You will need to add your own conditions or modify as to when you want the trigger block to run. Have a play 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.

  • All members
  • Posts: 157
Re: Spread Profit / Loss
« Reply #8 on: 07 Nov 2018, 10:52 »
ok, this trigger is verbatim as per Martin Steiner's formulae. Brief testing looks like it does the job. You will need to add your own conditions or modify as to when you want the trigger block to run. Have a play in test mode.

Will do. Many thanks. :)

  • All members
  • Posts: 157
Re: Spread Profit / Loss
« Reply #9 on: 19 Dec 2018, 16:02 »
ok, this trigger is verbatim as per Martin Steiner's formulae. Brief testing looks like it does the job. You will need to add your own conditions or modify as to when you want the trigger block to run. Have a play in test mode.

Hi,

How would I go about repeating the triggers, if say one or more remained unmatched. You could use the match trigger but that might mean the wrong amount getting matched etc ?

Thanks,

 

Please note, BetFair is seems to be currently OFFLINE