Author Topic: Daily profit/loss limit  (Read 6294 times)

Tags:
  • All members
  • Posts: 3
Daily profit/loss limit
« on: 26 Oct 2013, 10:48 »
Here's something I can't work out how to do easily. I've searched the board, and can't find the question being asked easily.

I want my triggers to stop for the day if I either have made a certain amount (or a certain percentage), and also to stop if I have lost a certain amount or percentage.

The triggers will then resume as normal the next day.

Is there a straightforward way of doing this?

Kind regards

P

  • All members
  • Posts: 3
Re: Daily profit/loss limit
« Reply #1 on: 26 Oct 2013, 10:51 »
I should add - I know there's an option in Settings, but I want a solution where I don't need to go in and change that on a daily basis. Can these options be set programatically?

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: Daily profit/loss limit
« Reply #2 on: 26 Oct 2013, 11:51 »
hi pandini
you would use the bank balance in your conditions.
you need to have a new trigger to record the start of day balance(name sb), value   balance   or add it as an action to a one time only trigger, using the set user variable action.
then you would add the conditions to your betting trigger
and selections trigger expression balance is less than sb+(the amount of profit you want)
and selections trigger expression balance is greater than sb-(the loss amount you want)



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.

  • All members
  • Posts: 3
Re: Daily profit/loss limit
« Reply #3 on: 28 Oct 2013, 10:32 »
Thanks McBee. It was working out when a new day starts that I'm having trouble with.
Is there an easy way to do this?
Cheers
p

  • All members
  • Posts: 231
  • Gender: Male
Re: Daily profit/loss limit
« Reply #4 on: 28 Oct 2013, 12:38 »
In a similar vain, I have been using a dutch lay with loss recoupment for some time, and I would like it to reset if the parameters of variables "last_lost" or "losses" are breached at pre determined figures.

The action "reset profit/loss" does reset last_lost and losses, but does not appear to reset the variable "total_won", which is a key figure in my staking plan (ie I'm attempting to win a pre determined amount in each cycle).

From memory, it used to reset in version 6, so is there any reason for the change? Or is there another variable which will perform the same task?

Thanks,

bobh


  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: Daily profit/loss limit
« Reply #5 on: 28 Oct 2013, 12:58 »
hi bobh
you need to use    reset Win/Lose History
the   reset Win/Lose History  trigger action does work ok, i have just tested it.


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.

  • All members
  • Posts: 231
  • Gender: Male
Re: Daily profit/loss limit
« Reply #6 on: 28 Oct 2013, 13:24 »
Thanks mcbee.

I made a mistake in my previous message - I meant to say "reset Win/Lose history" instead of "reset Profit/Loss history".

Are you sure it resets total_won?

I'm almost certain it didn't reset it a couple of days ago, but I can't confirm that. My formula also uses hist_count (which was reset).

Nevertheless, I will use Reset Win/Lose history again today and see if it triggers.

Thanks again,

bobh

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: Daily profit/loss limit
« Reply #7 on: 28 Oct 2013, 15:05 »
hi
to see if it worked
open the variable screen
type  total_won

you will see how much you have won or lost
then when the trigger resests the history etc, you will see it go to 0


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.

  • All members
  • Posts: 231
  • Gender: Male
Re: Daily profit/loss limit
« Reply #8 on: 04 Nov 2013, 09:35 »
Hi again mcbee,

Sorry for the long delay in response, but I have not had an occasion where I needed to reset Win/Lose history (which means I have met my pre-set profit targets) for the last few days, but I needed it yesterday.

Luckily, I was watching at the time, and last_lost limit was exceeded, which meant that my trigger should have reset win/lose history, and then my bets would have reduced accordingly.

Initially, it did reset.

total_won, hist_count, last_lost and last_pl all reset to zero, but then for some reason (perhaps when the next race started to be monitored), total_won,last_lost and last_pl all reverted to the previous amounts - total_won and last_pl showed a negative, and last_lost a positive.

As my next bet is based on a recoup of losses (ie total_won is negative), if I hadn't been watching at the time, the next bet would have been sizeable. Luckily, I was able to manually stop the trigger, but I had to stop betting for the day as total_won remained negative and above my preset figure.

The fact that the variables reverted initially seems to tell me that my trigger is at fault. It is the first trigger of many, all of the others following relate to conditions that must be met at each track before a bet is placed (hence a separate trigger for each track on which I want to operate).

This first trigger reads:

reset Win/Lose history globally
All Matching selections
Once per market
All Markets
Selections trigger expression losses is greater than 4
OR Selections trigger expression last_lost is equal or greater than 80

That's all.

If there is no solution to this particular problem, I would want to stop betting for the day if the limits are exceeded.

Sorry to be long-winded about this (I find it hard to explain), but any suggestions would be appreciated.

bobh

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: Daily profit/loss limit
« Reply #9 on: 06 Nov 2013, 06:40 »
hi
i have tested the reset win/lose history and it works ok.
do you use the variables last_won etc in any other triggers, to record or det them.


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.

  • All members
  • Posts: 231
  • Gender: Male
Re: Daily profit/loss limit
« Reply #10 on: 06 Nov 2013, 13:43 »
Thanks Mcbee.

I'm trying to win $1.00 per race (that's easier than saying 1 unit per race), and that involves loss recovery.

So the formula in each trigger for the lay amount is:

IF(total_won>hist_count+1,1/(1-comm),(hist_count-total_won+1)/(1-comm))

So total_won is an essential part of the formula.

The idea is if my pre-set limits last_lost or losses are reached then I write my losses off in that cycle, and go back to my first bet of $1.00.

Of course I need a high strike rate to win consistently, and this has been achieved, but the last couple of days have been ordinary because the reset has not worked, and large bets have been placed (and lost) when it should have been $1.00, and profits have been badly effected.

I am not betting until I can sort out the problem, so happy to wait for a solution if any.

Thanks again,

Bobh



  • All members
  • Posts: 19
  • Gender: Male
Re: Daily profit/loss limit
« Reply #11 on: 13 Aug 2018, 21:38 »
Hi Guys,

I know that this is an old topic, though it's the only one I can find which relates to what I would like to do. 

I would like to stop auto-betting for the current day under these conditions:

Total loss for the day is < £x.
Total profit for the day is > £y.

Where, for example, x could be -50 and y could be 80.

Reset can be done at midnight, so that auto-betting continues the next day. 

Is there a simple way to do this? 

Regards

Mike

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: Daily profit/loss limit
« Reply #12 on: 13 Aug 2018, 21:55 »
hi
total loss and profit is in the  total_won  condition , it gives the running total.
for the reset at midnight you would have a trigger with the action to reset the win/lose history with a time condition using the  now_time_timestr  , and trigger expression now_time_timestr is between 00:00:00 and 00:10:00

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.

  • All members
  • Posts: 19
  • Gender: Male
Re: Daily profit/loss limit
« Reply #13 on: 13 Aug 2018, 21:59 »
Excellent - many thanks for the speedy response mcbee, I'll give it a whirl :)

 

Please note, BetFair is seems to be currently OFFLINE