Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1503

 

I would appreciate if you could write code (function) like this: accountbalance() for the start of the day at 1:00 am for example, andaccountbalance() for the end of the day at11:00 pm.

Seems simple but I can't find it.

...or...

Profit/loss of all trades for today

 
Порт-моне тв:

I would appreciate if you could write code (function) like this: accountbalance() for the start of the day at 1:00 am for example, andaccountbalance() for the end of the day at11:00 pm.

Seems simple but I can't find it.

...or...

Profit/loss sum of all trades for today

Look in kodobeys for keyword equity - variants of indicators by different authors, which show account balance/equity. Choose to your liking

 
Maxim Kuznetsov:

in kodobase look up equity in the keyword equity - variants of indicators from different authors, showing account balance/equity. Choose to your liking.

what is kodobeise?

 
Порт-моне тв:

what's a kodobeise?

I don't even know how to describe it culturally...:-)



it's a section of the site

 
Maxim Kuznetsov:

I don't even know how to describe it culturally...:-)



the section of the site is like this

I need a fixed balance at the beginning of the day and not floating funds, please give me your feedback

 

Here it is, but it gives an error, help me fix it

  datetime TimeCheck_sb = StrToTime("1:00");
  if(TimeCurrent()==TimeCheck_sb)
     {
      AccountBalance() = sb1;
     }

error

'AccountBalance' - l-value required 
'=' - l-value required


 
Порт-моне тв:

Here it is, but it gives an error, help me fix it.

Here's what you need.

i-Profit
i-Profit
  • www.mql5.com
Индикатор прибыли в пунктах и в валюте депозита.
 
Maxim Kuznetsov:

Of course I'm having a party tonight... so I've decided on

"never feed them after midnight". Don't use CXxx(standard library) in projects with a scope of more than half a year. The worst thing that could be done with MQL5 in it

Is it that bad ?

 
Good afternoon. Can you please tell me if it is possible to force the Calculate event in the indicator by pressing the button on the chart, which is handled by OnChartEvent?
 

Tatiana, by pressing the button you create an event in OnChartEvent, and solve all your problems there. There is no need to call functions that are not designed for this.

void OnChartEvent(...)
   {
   if(НажатиеНаКнопку) Myfunc();
   }

int OnCalculate (...)
   {
   Myfunc();
   }

void Myfunc()
   {
   
   }