Author Topic: Triggers stopping after a win  (Read 2433 times)

Tags:
  • All members
  • Posts: 154
  • Gender: Male
Triggers stopping after a win
« on: 03 May 2015, 21:38 »
Can anyone see what is happening with these triggers (attached)?
No prizes for guessing which "system" this trigger is emulating  :o

I have set the favourite's back price to 1.5 to force the trigger to be true for most races and hence speed up testing the staking maths.  It should be >= 3 at least in practice.

I load UK win only horse races so to give time between races for the previous one to be settled.  Back trigger will only fire if previous race has settled (unless first time of placing a bet).

The staking seems to progress as wanted (and gets reset to the minimum value if the stop loss is hit (which it will do at odds of 1.5!)).  What happens after a win is that the triggers never run again.  The line that is testing the favourite's back price always evaluates as False even when the odds are clearly higher!

The only way I can get the triggers to "reset/restart" is by reloading them.

I have nothing in the settings to stop on the bank or PL being a specific number.  I have settings as "Delete settled events automatically" ticked, "Delete all except 5 most recent markets" selected, "Allow small bets" selected and "Settle markets with data loaded from Betfair" selected.

I can't for the life of me see why these triggers stop working after a winning bet, hence this post  ???

regards

Wez


  • Guest
Re: Triggers stopping after a win
« Reply #1 on: 03 May 2015, 22:49 »
I just ran the first one on 50 TM win markets. It worked perfectly after wins and losses and unsettled and settled.

The issue is not the trigger. Either your profile is corrupted or you have a firewall that is not letting the program read the condition of the favs price correctly.

Try each step and see

1.Run profile as administrator.

2.Untick the delete markets except box.

3.Uninstall, delete profiles, reinstall.

Larp


  • All members
  • Posts: 154
  • Gender: Male
Re: Triggers stopping after a win
« Reply #2 on: 05 May 2015, 09:43 »
Larp,

many thanks for running on TM win markets.

I ran a modified version of the triggers yesterday with just one instance of MPF running in test mode using the default profile and that worked.  The mod was to reset win/lose history after a win.  The sequence yesterday was LLLW,LLW,LL

I have kept MFP open and I will see what it does as a continuation of yesterday's racing.  I'm not 100% convinced the reset win/lose history is doing anything now I think about it a bit more because I'm not using any of those variables other than market_settled_pl which has no long term history/persistence.

regards

Wez


  • All members
  • Posts: 154
  • Gender: Male
Re: Triggers stopping after a win
« Reply #3 on: 05 May 2015, 16:07 »
Okay, update - triggers have refused to run today.

MFP finished yesterday as detailed above and the PC and MFP were left on ready for today's racing.  I manually loaded today's UK racing (but will get the scheduler to do this in the future).  Racing started at 14:00 today.  I have been out and just returned only to find no bets have been placed in my absence.  Initially I thought there are no trigger logs, account statements or anything else of any use in working out what is going on, but it has just transpired that it is taking a very, very, very long time for them to load.

The Amend current_loss trigger flashes green suggesting the trigger is active.  Neither of the other 2 triggers flash green.

I have just reloaded the triggers just before a race starts and sure enough the Place bet trigger flashes green and a bet is placed.

So there is an issue with these triggers not working from one day to the next if MFP is left running.  Perhaps I was confusing the "stop after a winner" issue with this one because the last bet placed on the previous day happened to be a win bet when I first spotted this problem.

Now that the trigger logs have finally loaded, I can see what is partly causing the problem.

The "Previous Triggered Event's Status is Settled" trigger is evaluating to False.  To me the previous triggered event was the last race yesterday for which a bet was placed and which has since been settled.  But MFP doesn't seem to carry this fact forward from one day to the next.  Reloading the triggers solves the problem of placing a bet because if the trigger hasn't fired yet (runs = 0 overall) it will place a bet.  Subsequent bets will only get placed once the previous one has been settled.  Works during the day, but not from day to day by the look of it.

Having now said all of that, bets are still not being placed following the first bet (which happened to lose).  The screen shots below show bets not being placed, I then reload the triggers and lo and behold a bet is placed.  So what was stopping more bets being placed after I reloaded the triggers and the first bet was placed?

Answer:  no idea.  The time now is 17:06 and yet the trigger logs won't show me anything more up to date than the 16:40 race.  I'll come back to this later once the trigger logs finally decide to play ball.

It would be good if Oxa et al could confirm whether the Previous Triggered Event's Status isn't carried over from one day to the next and perhaps provide a fix/workaround.

regards

Wez


  • All members
  • Posts: 154
  • Gender: Male
Re: Triggers stopping after a win
« Reply #4 on: 05 May 2015, 19:53 »
Day's racing has finished and still unexplained behaviour.

Screen shot shows no bets being placed until I reload the triggers, time and time again.  Things then seems to work for a while but then it all suddenly stops again (again after a winner, despite there being several winning bets in a row).

Also, trigger logs have stopped recording at 17:10.  No explanation forthcoming from me for this.  The test account statement runs until the end of the day's racing (last entry at 20:37:34), but not the trigger logs.

I'm going to try the suggestion made yesterday about uninstalling MFP, re-installing and shutting down.  I will restart MFP tomorrow and see if it works as it should within the time period of the same day.

Can anyone else run these triggers in real time over the period of a day or two (i.e. program is left running over the course of 2 days) to see if they suffer the same problem?

thanks

Wez - puzzled and unhappy  :(


  • Moderator
  • Posts: 3597
*
Re: Triggers stopping after a win
« Reply #5 on: 05 May 2015, 20:10 »
Hi
Please check the following setting for the carry-over problem:
Settings > General Options > Account Statement > Retrieve data that are not older than x days

 
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.

  • Guest
Re: Triggers stopping after a win
« Reply #6 on: 05 May 2015, 20:17 »
Hi,

The sample I ran on Time Machine was over several days and it worked fine. So I really do think it is the profile being corrupt. Also leaving the program running for days on end may not be best practise.

I think I have a possible work around for you. On test and Time Machine I replaced the condition regarding previous triggered events settled with

And selections trigger expression test_balance is equal to test_funds.

That circumvents the issue at least on test.

For live/real mode it would be

And selections trigger expression balance is equal to total_funds.

This is a quickfix so I am not 100% happy that it works so please double check the above before you go live with it.

PS

I only now have seen Marks suggestion. Maybe that was it.

  • All members
  • Posts: 154
  • Gender: Male
Re: Triggers stopping after a win
« Reply #7 on: 05 May 2015, 22:36 »
MarkV,

Setting was:

Settings > General Options > Account Statement > Retrieve data that are not older than 1 days.  Now changed to 2 days. Thanks for the tip.

Larp,

thanks for the alternatives to using "Previous triggered event's status is settled".  I understand why they would work and I might try that idea if I don't get any joy over the next day or two.

Incidentally, I have a slightly different version of these triggers running on a Windows 7 machine which uses a user var called stake and the Place bet trigger uses stake as the amount.  I simplified the triggers by combining the stakes formula into the amount field for the place bet trigger and that is what I am trying to get working on this Windows 8 machine.

The Win 7 machine placed bets throughout the day without any intervention from me.  Even the log files logged activity beyond 17:10 unlike the Win 8 version.

I have un-installed and re-installed 8.1 and will kick it off tomorrow and leave it to its own devices (on the Win 8 machine).

Thanks for the input guys, much appreciated.

Wez

  • All members
  • Posts: 154
  • Gender: Male
Re: Triggers stopping after a win
« Reply #8 on: 08 May 2015, 19:55 »
Success at last ;D

I changed the settlement detection to Larp's suggestion of "balance is equal to funds".
I've also put in a settlement trigger which assumes the runner that traded at a last traded price of 1.02 is the winner.  Not guaranteed but good enough for my needs.

These triggers now run as I had first expected.  £28 up in test mode over the last 2 days - I won't be looking to retire just yet  ;D

Many thanks for those who offered advice and assistance - it was very much appreciated and did indeed help.

regards

Wez

 

Please note, BetFair is seems to be currently OFFLINE