Need help how to show an account situation every 25st of the month

 

Hello,

Anyone can help with programming a simple code to show an account situation every 25st of the month?

I wish to compeer actual month to previous one to show the balance on the journal at the date.

The problem is with week-end and day off, I cannot get the journal to skip dose days and wrights message the day after.

There is what I have now but do not show good result:

// Account Info
//---
int situationDay;
int month = TimeMonth(TimeCurrent());
int day = TimeDay(TimeCurrent());

int result;

if(IsConnected()==true && Day()==25 && Hour()>=23 && Minute()==00) situationDay=true;
else
if(IsConnected()==true && Day()==26 && Hour()>=23 && Minute()==00 && result==-1) situationDay=true;
else
if(IsConnected()==true && Day()==27 && Hour()>=23 && Minute()==00 && result==-1) situationDay=true;

if(situationDay ==true)
result = 1;
else
result = -1;

if(result==1) Print("Month:",month,"Day:", day,"AccountEquity=$", NormalizeDouble(AccountEquity( ),2));

….

Then I will need to compeer the last month to this one to find the resulting balance !!! (may need help there too !)

Thanks.

Yvel13
 
Why do you need this for some type of reporting? We are working on a tool that will calculate 13 column performance results from MQL statements. This would include monthly balance. If you like you can email me about it....
 
eliteeservices:
Why do you need this for some type of reporting? We are working on a tool that will calculate 13 column performance results from MQL statements. This would include monthly balance. If you like you can email me about it....

Hello,

Thanks for your reply,

I just need to set a code in my EA so the balance of Account History can show up at the date in the journal. The same way we doing it manually on the terminal with “Save as Report”.

The purpose of it is to calculate the loss/profit from one month to the next and have it send to e-mail or Excel files for record.

I’m not so good in programming as I’m doing it for hobby and this setting is giving me a problem. How to show the result only once at the date in the journal and been able to skip the date to next day when it's a the day off, than compare one month to the next?

I will appreciate your help.

Yvel13.

 
You can make the script for report and launch it just once a month.
 
Roger:
You can make the script for report and launch it just once a month.

All right,

I figure I can wright the script but I still don't understand how to attach it to my EA and how sending the order from the EA to the script .

Maybe as simple as: if(Day()>=25) {.....script.....} ?????

Can you show me a brief example or where to find information. The manual don't said anything about that and I'm still learning,

Thanks.

Reason: