Author Topic: Email balance at a set time...  (Read 10568 times)

Tags:
  • All members
  • Posts: 15
Email balance at a set time...
« on: 04 Dec 2013, 22:54 »
I'm trying to set up a trigger to email me the account balance at the end of the day, or say at a set time, like 11pm.

I added a block and set an email text trigger with the formula

IF(test_mode=0,balance,test_balance)

and then a trigger condition of

Global Current Time is equal to 11:00 PM

But this isn't working.

I know email to be working as I had originally set an update in settings to email after each event, so I figure this is some error with my trigger.

Suggestions welcome, Many thanks, James

  • Moderator
  • Posts: 3597
*
Re: Email balance at a set time...
« Reply #1 on: 04 Dec 2013, 23:18 »
Hi
Please try the attached trigger file.
In the constants set the times between which you want the email to be sent.
You should be monitoring at least 1 market for the trigger to work.

I think the problem with your condition was "equal to". You are very unlikely to catch 11:00 PM precisely, so it is best to use between x and y.
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: 15
Re: Email balance at a set time...
« Reply #2 on: 05 Dec 2013, 23:21 »
Thanks Mark, makes sense, all setup, so lets see how it does. Much appreciated James

  • All members
  • Posts: 15
Re: Email balance at a set time...
« Reply #3 on: 22 Dec 2013, 23:45 »
Hello Mark, me again!

I couldn't get this working - I am now wondering if it was because of the time of the trigger (set for 11pm) - when no markets are selected - would that be having an impact?

If so, is there another way of building the trigger that i'm am overlooking?

Here is what (in an ideal world) would happen - 1) every day send an email before the first race telling me the number of markets loaded for the day 2) after the last race send me an email with the account balance and days performance)

I'm sure these are possible, i'll set to building what I can over the next week while i have a little more time - any guidance along the way very much appreciated.

Thanks again, James

PS - perhaps a simple one... do I need to login every day? I left MF running for a few days, i had a load markets at 10.30 am loaded in settings, but on the second day this didn't load - couldn't find markets. My guess is that the markets I load are "Todays Card" - so perhaps I need to re-login to get the feed from betfair in again as the 2nd days markets will differ? - Many thanks again, James

  • Moderator
  • Posts: 3597
*
Re: Email balance at a set time...
« Reply #4 on: 24 Dec 2013, 20:14 »
Hi
There needs to be at least 1 market being refreshed at the time(s) the trigger(s) are set to execute.

A suggested example:
load 1x long-term market such a World Cup soccer Match Odds market.
Set the refresh rate on this market to 2700 (once every 45 mins)
So this market is always refreshing once every 45 mins through until June.

In the Constants for the email triggers set the start and end times for the emails to be sent to 1hr difference. This way the above refreshing market will refresh once during the 1hr timeslot for the email triggers.

I have modified the trigger file for your new requirements.
It will send 1 email with the balance information
It will send 1 email with the number of markets information
Set the start and end times for each of the emails in the Constants.

You will need to experiment and test the following:
I have set the triggers to Execute no more often than: 86400 seconds (once every 24hrs)
BUT… the FIRST repetition occurs 24 hours after the trigger is started.
I tested the triggers by changing the 86400 to 10. Be careful if you do this because the triggers will send 2 emails every 10secs.

Amended trigger file is attached.

You should be able to use the Scheduler and a Locator Template to load the markets you want at a specific time each day. Make sure your computer does not go to standby or sleep or power saving mode because this will stop the program from working.
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: 15
Re: Email balance at a set time...
« Reply #5 on: 31 Dec 2013, 01:07 »
Thank you very much for the clear & useful reply Mark, all set up to try tomorrow.

The only thing that I couldn't manage was setting up a long-term market with a refresh of 2700 seconds - It would seem there is a max of 1440 seconds = 24 minutes - does this seem correct?

Thanks again, James

  • Moderator
  • Posts: 3597
*
Re: Email balance at a set time...
« Reply #6 on: 31 Dec 2013, 08:54 »
The only thing that I couldn't manage was setting up a long-term market with a refresh of 2700 seconds - It would seem there is a max of 1440 seconds = 24 minutes - does this seem correct?
Hi
You should be able to set the default refresh rate through the settings:
Settings > Monitoring Options > Market Refresh > Default refresh rate before the off (Idle refresh).
This will set the refresh rate for all markets, and you can adjust this for specific markets using triggers.

or you could use a trigger to set the refresh rate for just the Match Odds market
example attached
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: 15
Re: Email balance at a set time...
« Reply #7 on: 12 Jan 2014, 00:08 »
Thanks Mark, I’ve been trying to get this going for the last week, but I still am not successful!

Trigger attached for ref – in one block there are three triggers.

1 to set a refresh rate for a long-term market. 2nd for triggering the number of races loaded. 3rd for triggering the balance.

I am wondering if its something to do with having to restart MF daily – and therefore not allowing enough time for the once every 86400 secs to trigger?

I'll try reducing the time next and see if that makes a difference. Open to suggestions if you can see anything I have mistakenly put in! Thanks, James

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: Email balance at a set time...
« Reply #8 on: 12 Jan 2014, 06:40 »
hi
i have looked at your trigger constants and your values are not correct.
you have the times set at
22.30
24.00
10.00
10.30
they should be
22:30
24:30
10:00
10:30
all time coditions have to have   :  between the hours, minutes and seconds
sorry i cannot test your treigger


mcbee
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: Email balance at a set time...
« Reply #9 on: 12 Jan 2014, 09:33 »
Hi
I think mcbee means 23.30 above.

If as you say, you restart the program every day, the trigger will not work. It was meant to have 1 long term market permanently refreshing at a slow rate 24/7.

I will work on another way and post it later today.

Could you let me know please if you are deleting the markets when they are settled, using the setting:
Settings > General Options > Market Settings > Delete settled events automatically? 
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.

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: Email balance at a set time...
« Reply #10 on: 12 Jan 2014, 10:37 »
hi
Quote
I think mcbee means 23.30 above.
i took the values from the last trigger constants
the times must be seperated with  : 
if the bot is set to restart every day, then it needs to be set to monitor events 1440 before the start time in the monitoring options.
then triggers to alter the refresh times just before it is time to place the bets.
that way every time the bot restarts, it will be monitoring markets.


mcbee
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: Email balance at a set time...
« Reply #11 on: 12 Jan 2014, 10:50 »
Thanks mcbee
I was thinking of sending the evening email when there is 1 market left (market_num) in My Markets. That way there will not be any need for a long term market. Do you think that is feasible, or would you suggest another way for the balance email at the end of the day?
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.

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: Email balance at a set time...
« Reply #12 on: 12 Jan 2014, 11:17 »
hi
the only problem been, sometimes the market stops refreshing before it is settled, so you need an extra market to give the last betting market chance to be settled by betfair, taking photo finnish and stewards enquiry in to account.

mcbee
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: Email balance at a set time...
« Reply #13 on: 12 Jan 2014, 11:21 »
Hi
Thank you mcbee
Please try the attached trigger file.
It has the corrections and refresh rate triggers mcbee suggested.

There are 2 new constants you can set:
market refresh rate on market loading (currently set to 4mins)
market refresh rate change to at 5mins before off (currently set to 2secs)

In the settings you should have this setting set:
Settings > Monitoring Options > Market Refresh > Start monitoring events at 1440 mins before the beginning

In this trigger no need to load a long term market and the relating trigger has been disabled.
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: Email balance at a set time...
« Reply #14 on: 12 Jan 2014, 14:44 »
Hi
I have done some more testing on this, and unless I am mistaken, a constant cannot  contain a value for Global Time, and then use the constant in the condition.

I have changed the trigger file and put the actual times in the condition, and tided up the rest of the trigger.

I tested the trigger using changed times, and it works OK.

You need to have this setting set:
Settings > Monitoring Options > Market Refresh > Start monitoring events at 1440 mins before the beginning.

You should also have at least 1 market loaded (for example, for the next day)
and the program needs to be running at 10am and 10pm

It will send the markets info at around 10:05
It will send the balance info at around 22:30

-------
mcbee - please could you check I am not mistaken:
we cannot use a constant for a Global Time condition? Thanks.
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