Author Topic: Condition evaluates to false, when it should be true  (Read 2687 times)

Tags:
  • All members
  • Posts: 314
Hi,

As per the subject, I am using a trigger, and one condition in that trigger, is to check if a selections name is contained in a file, after which, it will proceed to do the rest...

At the start of a race, I look to see if my selection fits a criteria, and if it does, a lay at SP is placed, and an entry is made into a text file, which is ["sel_name"]

Once the race starts, another trigger will then check to see if the selections name is in the file above. If so, then it will check to see if the actual_sp is outside a range I set. If these conditions evaluate to true, then it will place a back bet, at actual_sp, using a value I set.

Simple concept, problem is, itrs failing at the first point. See image...

I have taken a screenshot, which shows the trigger log, and the 2 entries that are in the file, are not being found, and it is clear that these entries are there, and I have no idea why the condition is FALSE.

Can anybody help please?

Thanks.

Mark.

  • All members
  • Posts: 314
Re: Condition evaluates to false, when it should be true
« Reply #1 on: 05 Jun 2018, 17:55 »
hmmm, interesting,

I ONLY changed the name of the files that the trigger was using, and that seems to have fixed it.

the original file name was ATM_WTRPR02.txt, new file name is V2.txt

I am absolutely clueless as to why that fixed it...

does ATM_ exist in the MFP code? I did a search of the manual and it wasn't in there...

Any ideas?

Thanks

Mark.

  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: Condition evaluates to false, when it should be true
« Reply #2 on: 06 Jun 2018, 07:34 »
I think the difference is that you removed the first line from the file (the "HorseRacing...").
I don't think it was parsed correctly.
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: Condition evaluates to false, when it should be true
« Reply #3 on: 06 Jun 2018, 11:48 »
Hi Oxa,

Thanks for the response, and advice of error..

OK, to try and resolve this, I have a number of triggers, and at the start of monitoring each race, I write an entry into a text file, using [market_name]. Then, if there are any selections that qualify, the triggers first action is to place an SP bet, the next action is to write an entry into the above text file, which uses ["sel_name"]. That's the end of that trigger. Once in play, the next trigger will query the above text file, for any selections which are outside the allowable odds, and place a back bet.

Its very simple, but, as per my message for help yesterday, the trigger was not seeing the entries in the text file.

So, from the above, does that mean I should use ["market_name"]?

The only text file I write from my end, is the selection file, the rest is done by MFP, and the file generally starts with:

"Wednesday 06/06/2018"
"Horses in file : 68"
"UTTOXETER 13:40"
"Bring Back Charlie"
"UTTOXETER 13:40"
"Friary Gold"
"WOLVERHAMPTON 13:50"
"Absolutely Awesome"
"WOLVERHAMPTON 13:50"
Fareeq

I place speech marks around selections names that contain spaces.

I am still a little unsure about this, because, if I were to write one of the selections above as : [sel_name] = AbsolutelyAwesome, if I were to check if the selections name is contained in the file, will MFP recognize it, or does it have to be "Absolutely Awesome" ?


Do you think that it is simply changing [market_name] to ["market_name"] is the solution?

I have a different thought to what you answered, in that, when I copied the existing ATM_ file, to V2, and changed the references in the trigger to point to V2, and NO OTHER CHANGES, this fixed it.

As a developer, I am sure you can understand why I have to find these things out. Yes, it fixed the problem, but the difficult part for me is not understanding why this action fixed it.


  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: Condition evaluates to false, when it should be true
« Reply #4 on: 08 Jun 2018, 09:52 »
Why do you need the market name in the first place? Do you think the same horse will be running on the same day in several races?
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: Condition evaluates to false, when it should be true
« Reply #5 on: 10 Jun 2018, 18:46 »
Hi Oxa,

Sorry for the delay.

To be honest, I am not going to continue with this issue, it does seem that there are some problems when I execute a trigger, using a filename to get selections, but, just by changing the filename, that seems to fix it, so, I will just have to look at doing that in the future. Its a real head twister, and probably anybody reading this would think I am some crackpot posting these questions, because reading through it myself, I would probably think the same.

As for your question, I always try things out by writing to log files, and if an entry qualifies, and a value is written in the text file, I always put in the market name, so when I open the text file, I can see the time of the race, by looking at the market name entry. MFP doesn't offer a market time in HH:mm format, so I cant just write the time, as an entry

Mark.

  • Moderator
  • Posts: 3597
*
Re: Condition evaluates to false, when it should be true
« Reply #6 on: 11 Jun 2018, 07:13 »
Hi
just in case it helps the market scheduled event start variable in HH:mm is 
event_start_timestr
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: Condition evaluates to false, when it should be true
« Reply #7 on: 11 Jun 2018, 09:08 »
Hi MarkV,

Thanks for that tip. Is that in the manual? If so, I am incredibly sorry for whining on about the time. I do remember quite a while back, asking how I got the date/time.

I have just looked through the chm file for the first time, and it is in there.

Thanks again

Mark.

 

Please note, BetFair is seems to be currently OFFLINE