Author Topic: trigger executed "once per market"  (Read 1652 times)

Tags:
  • All members
  • Posts: 211
trigger executed "once per market"
« on: 16 Feb 2016, 19:56 »
Hi,


I am trying to develop a trigger but due to my lack of knowledges with MFP i´ve been facing some dificulties.


A problem that i am having is that even if i have the trigger settled to be executed "once per market", sometimes (not always) it is executed twice (one a few seconds after the other) without the conditions to close and repeat have been fullfiled (it´s like the trigger didn´t assume it placed a bet before).

Someone knows why it may be happening and how i can prevent it to happen?


Thanks

  • Moderator
  • Posts: 3597
*
Re: trigger executed "once per market"
« Reply #1 on: 16 Feb 2016, 20:28 »
Hi
It's difficult to tell without seeing your trigger. From your post it sounds like you are repeating a trigger, or a series of triggers.
Ideally you should have the triggers in a block, and close the block of triggers when conditions are met e.g. no unmatched bets etc.

First check the frequency of updating the list of bets in the settings. This should be faster than your trigger repeat rate.
e.g. if your bets are updated every 3 seconds, then your trigger repetition rate should be 4 seconds or slower. 

Please have a read of this article about repeating triggers and to understand how the Close Block works. It should be helpful to you.
http://marketfeederpro.com/learn/articles/how-to-repeat-actions-in-the-same-market/
 
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: 211
Re: trigger executed "once per market"
« Reply #2 on: 16 Feb 2016, 23:40 »
Hi MarkV,

I will try to make you a description.

It´s a block of triggers with a close block and 3 other triggers to place bets. The block of triggers is set to repeat : no more than 10 secs. the refresh rate of the data is 10 seconds and the update list of bets every 3 secs.

Both the close block and the other triggers have conditions demanding that there are no unmatched bets in the market, to be executed again.

More than 90% of the time the triggers place just a set of bets as it was supposed. Then it stops till all the bets are matched. When matched the close block trigger re-activates the trigger again and it should place a 2nd set of bets. So i don´t think the close block has a problem. The problem comes before, in the triggers that place the bets. I will try to explain better.

Sometimes the necessary conditions are fullfilled and the bets should be imediatly placed, but, for some reason apparently the MFP keeps processing the operation. As the operation isn´t finished another repetion of the trigger starts and as there are still no unmatched bets. The same trigger places a 2nd and equal set of bets.

The block is set to repeat : no more than 10 secs, but i noticed that depending of the moment my triggers are repeated once each 1 to 10 secs (i don´t know why it varies). As i have a repeat block i think i can´t use a execute no more often than x secs. So how do i change the rate my bets are updated?

Thanks

  • Moderator
  • Posts: 3597
*
Re: trigger executed "once per market"
« Reply #3 on: 24 Feb 2016, 20:07 »
Hi
The Close Block conditions should stop any unwanted repetition of the block, which makes me think they are not comprehensive enough to handle all situations.

A few more things you can look at:

Check Close Block trigger is set to once per market
Betting triggers are set to once per market
Betting triggers selections are set to first matching selection, and your betting trigger conditions specify the selection
Try adding a time delay to the Close Block trigger:
and selections trigger expression now_time is equal or greater than bm_backtime + (mf_second*20)

the above condition will delay close block by 20 seconds after the last back bet was matched, the idea is to wait at least a couple of refreshes to ensure all the bets are fully updated etc. You can adjust the 20.
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: 211
Re: trigger executed "once per market"
« Reply #4 on: 25 Feb 2016, 20:07 »
Hi MarkV,


As expected you were right. I was making a wrong assumption about the way the close block works. It´s the first time i use it.

Great tip the one about the delay, althought i think i couldn´t use the bm_backtime. It would give the time that the last matched back bet was placed. I think i need to know the time the last bet (back or not was placed). Only that way can avoid the trigger to place a 2nd bet right after placing a 1st one. 

For that, i made an user variable created when the bet is placed (MyVar=now_time) and then i used the condition: and selections trigger expression now_time is equal or greater than MyVar + (mf_second*30).

With that and a "Cancel all" trigger for eventual problems, i´ve managed to remedy the efects.

However the main reason of the problem remains: I still can´t establish the distance in seconds between 2 consecutive refreshes of a trigger.

I will study it better and try to find a solution, if i can´t, i will create another post asking for help.


Thanks

  • Moderator
  • Posts: 3597
*
Re: trigger executed "once per market"
« Reply #5 on: 25 Feb 2016, 21:10 »
Hi
It's great that you are learning  :)

Try repeating the block at no more often than 5 sec. The 10 sec block repeat and 10 sec refresh may at some point make 20! The 5 sec block repeat also is fine if your bets are updated every 3 sec.

Yes feel free to ask.
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