Author Topic: After the event  (Read 3086 times)

Tags:
  • All members
  • Posts: 314
After the event
« on: 11 Sep 2019, 22:17 »
OK, the answer to this is probably no, but here goes... I am looking for suggestions, if the below is not possible...

I have a trigger that runs when the market is settled. It writes text to a file, to produce ["sel_name"],[actual_sp],[sel_place], for all selections in the race.

Occasionally, and sometimes frequently, no entries are written to the file at settle time.

Well and truly after the event has finished, when I look at the User Variables, and try the above variables, I get their respective values, e.g ["s_1_sel_name"], [s_1_actual_sp], [s_1_sel_place]

So, given that I can ask for these values through the User Variables, is there any way that I can get them through a trigger? Or maybe some other way to log them?

I am not sure what causes MFP to fail to log these values sometimes, because most of the time, they are logged fine - and I just don't know how to get round this.

Is it possible - or somehow get these values using a different way?

Thanks

  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: After the event
« Reply #1 on: 12 Sep 2019, 12:59 »
Hello!

If you set a trigger to write these values into a text file in a settled market, then the only case in which the trigger won't do this (unless, of course, its conditions are not met) is if the market was never settled, i.e. if its winner has not been established.

If this is not the case, then look into the log of that trigger for that particular market.
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

Присоединяйтесь к официальному Telegram-каналу!

  • All members
  • Posts: 314
Re: After the event
« Reply #2 on: 13 Sep 2019, 10:50 »
Hello Oxa,

I can tell you that this will not get resolved. I will say without any doubts in my mind, that the writing of the text into the file, will occasionally fail. It works most of the time, but, on occasions, it will fail a few times in the day. I would say 99% of the time it is fine

There are NO conditions set in the trigger, it is a very simple write to text file action, values being horse name, its BSP value, and its win status, using the details outlined above.

This can only be my opinion, but if something works one or more times, with success, then, if it fails at other times, then there must be something wrong elsewhere. Granted if I had added in some exotic instruction within the trigger, we could easily blame this, but, given I set no conditions, and only use the available action to write the race results to a text file, then I am 100% certain there is no fault in the trigger. It writes a file, once the market has settled, and records the details mentioned, for each selection. There is no evidence available within the trigger logs, because nothing has actually happened at the market settle time, as as a result, nothing in the log.

Possibly, but unlikely, it could be some internet connection issue, but in my, perhaps, naive expectation, MFP has dealt with that issue, which I believe is a basic expectation - and, if this is not the case, you should think about putting this in.

Unfortunately, you have seemed to have dismissed this with "This will write to the textfile" - whereas in fact, it doesn't always do this, hence my opening statement that this won't get resolved.

I am not able to run your code in debug mode to detect any issue, but it definitely does fail sometimes.

here is the action..
write to a file
Text ["sel_name"],[actual_sp],[sel_place]  File path c:\mypath\myfile.csv

Options...
Selections  All Matching Selections
Markets  Win Markets                  Market Status  Settled
Execute  once per market

NO conditions

  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: After the event
« Reply #3 on: 13 Sep 2019, 10:54 »
Like I said, the market could be left unsettled.
Some other process could be writing to that file at the moment (quite possibly MF Pro itself).
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

Присоединяйтесь к официальному Telegram-каналу!

  • All members
  • Posts: 314
Re: After the event
« Reply #4 on: 13 Sep 2019, 11:43 »
So, why has that issue not been dealt with?

There are existing functionality, in probably most coding environments, which can deal with this, at the highest level, if(file is open){wait until close;} OR, throw an exception - with message. It's not rocket science. I think MF uses .NET framework, and I can tell you there are lots of ways to check this status using .NET.

I highly doubt the unsettled status response you gave, because if that is the case, then how has MF decided to write to a file when the market has not settled? The condition here being market event has settled. Does Betfair give MF a false response indicating it has settled, when in fact it hasn't? If that it true, then we are in a whole heap of trouble, so I would have to conclude this is unlikely.

I can only express opinion here, but as a tech savvy user, I am trying to provide feedback, and from my high level point of view, something is going wrong. The problem is, it does not happen all the time, so we cannot directly trace it, and it may be another 5 days before it happens again, but it does happen. I have no ability to fix this, and hopefully my feedback will prompt the developers to investigate.

  • Moderator
  • Posts: 3597
*
Re: After the event
« Reply #5 on: 13 Sep 2019, 15:17 »
Hi
I would suggest adding a separate trigger (not another trigger action to your write to file trigger) to write the same data to the action log. This should help a bit in troubleshooting if the problem occurs and you can look to see if the data was written to the program log and also check the trigger logs for any reason why either trigger did not execute.

This should also be of some help with what you ask in your first post as an alternative way to log the data. Program log information can be saved to a text file.    
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.

  • Moderator
  • Posts: 3597
*
Re: After the event
« Reply #6 on: 13 Sep 2019, 19:28 »
Hi again
Been doing some further testing and reading on this. There are occurrences when markets may remain suspended for a considerable length of time, sometimes days, for a variety of reasons e.g. photo, stewards, voiding, loss of feed etc. Betfair cover these in their T&Cs, Market Rules and Regs. and Market Information.

It may be the suspended status has not been lifted by Betfair even though the market winner and places are determined. This could be the case where indicated in your first post, you can get the values by looking in user variables, but the write to file trigger has not fired because it is waiting for settled status.

I think it may be worth trying the following in your write to file trigger:
change market status to: all markets
add this one condition: at least one selections trigger expression sel_place is greater 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: 314
Re: After the event
« Reply #7 on: 14 Sep 2019, 10:21 »
MarkV,

Many thanks for your detailed response, I really appreciate it!

BUT, as is always the case with me, I still have questions...

You have advised that I use 'All Markets' - when I looked at doing this, I initially thought about the fact I have a different write to file trigger for each of win and place, and so I decided to check in the conditions if I could get to choose win or place. I found the condition Market's Number of Places, and for the place markets, I can choose where Number of Places > 1, then came the stumbler, and I am not sure if there is a Number of Places = 1 for the win market?

So, at this point, would I set the action log trigger, for the Win trigger action log (Using All Markets as the qualifier) to Number of places < 2, or Number of Places = 1,or, Number of places = 0 - or does the win market not offer the ability to query Number of places?

Thanks again

  • Moderator
  • Posts: 3597
*
Re: After the event
« Reply #8 on: 14 Sep 2019, 10:34 »
Hi
for Win markets use condition:
markets betting code is Win(Horse Racing & Greyhound)

for Place markets use condition:
markets betting code is Place(Horse Racing & Greyhound)

Win markets will only ever have 1 place, though there could be a joint 1st place in a dead heat.
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.

 

Please note, BetFair is seems to be currently OFFLINE