Author Topic: New Variables for last refresh times of markets, list of bets and funds  (Read 9778 times)

Tags:
  • Élite
  • Posts: 166
*
The only very annoying problem with MFP in version 6 is a delayed display of unmatched bets and funds. When I write a trigger which relies on an up to date list of bets, the trigger works fine with a few monitored markets. But when I add some more markets, or make the refresh rates of triggers and updates low, the updates of list of bets becomes too slow, 2 subsequent trigger runs have the same list of bets, the trigger does not see the new bets it sent to the market in previous run.

I tried very hard to find a value of markets and refresh rates to avoid this problem, but failed.

What do you think about the idea of 3 new variables for refresh rates?

last_fund_refresh: a general variable for time of last fund refresh

last_market_refresh: a market variable for time of market refresh

last_bet_refresh: a market variable for time of bet refresh

The time in this variables is when data was visible for triggers.


Then I can build a block at the end of trigger file, setting user variables

i.e. previous_fund_refresh, previous_market_refresh und previous_bet_refresh

and use a condition like

and not previous_bet_refresh=last_bet_refresh to avoid trigger operation on an old list of bets.

Or simply use a condition like

and now_time - last_bet_refresh = idle_rate

I promise: I will buy a second MFP licence if the delay problem is fixed!!!

  • Administrator
  • Posts: 8818
  • Gender: Female
*
Martin, I'm not sure how this problem is relevant only to version 6.0.  ???
The bets will not update frequently if you have a lot of markets, because in that case the requests may be limited by MF Pro. I.e. it could have updated bets every 3 sec, but because it has, say, 5 markets to refresh at a high rate, it has to skip the bets requests once in a while.

But it worked like this in previous versions as well.

However, I'll think on the variables you suggested!
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

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

  • Élite
  • Posts: 166
*
Oxa, thanks for your reply.

Martin, I'm not sure how this problem is relevant only to version 6.0.

Yes, this problem is relevant to 5 version, too. But Version 6 fixes many problems of previous version 5 an has many improvements, so the last remaining problem becomes more important than before. In Version 5 I permanetly supervised operation. With the new user variables in version 6 I can tag monitored markets and apply different trading rules depending on market parameters without any supervision.

markets to refresh at a high rate, it has to skip the bets requests once in a while.

And if I have the possebility to skip trigger actions in sync with skipped bet requests, the problem of double bets will never happen again. I hope it is not to difficult to add an additional variable to MFP.

  • Élite
  • Posts: 431
*
Martin,

I think your problem is similar to what I was trying to describe here:

http://community.marketfeederpro.com/suggestions-6/trigger-repeat-market-refresh/

What do you set your Update List of Bets Every x secs. set to ?

Ian

  • Élite
  • Posts: 166
*
Hi alfaman,

yes it is the same problem, unfortunately betfair API has different calls for market refresh and list of bets refresh, and the trigger execution logic depends on market refresh. (IMHO this is better than sync trigger with list of bets ). As it is possible to retrieve lists of bets at different rate as market refreshes, which is a very useful setting, it will happen occasionally that a trigger fires because of old list of bets.

With the suggested trigger variables, it will be possible to block trigger action because the trigger can check if list of bets is not up to date. I will block all triggers which depends on P/L and bets, i.e. where profit_loss, bu_laynum, bu_backnum,..... until list of bets is refreshed.

What do you set your Update List of Bets Every x secs. set to ?

I always update list of bets together with markets. Update of markets is 30s for trading and 90s for greenup. Market refresh is 20s.

  • Élite
  • Posts: 166
*
Oxa, what do you think about these variables for last refresh time? Is there a chance to get the new variables in a future release of MFP?

In the mean time, I did a workaround to stop sending same bets twice.

The idea is, to compute a "magic" number which depends on the bets, which are about to send into the market. If this "magic" number is the same as of the last bets sent into the market, action is skipped.

Magic number can be i.e. sum of stake*odd*odd of all bets which are about to send.

This needs 4 triggers and 2 user variables, so I use it only for greenup / stop loss when double bets are very annoying.


 

Please note, BetFair is seems to be currently OFFLINE