Questions from Beginners MQL5 MT5 MetaTrader 5 - page 392

 
gammaray:

I'm not sure exactly, as I'm still a beginner myself. But it seems that there is a command Comment, which displays any information in the upper left corner of the EA chart. The volume of lots can be calculated in the cycle like this:

int totalOrders = OrdersTotal();

double totalLots = 0; 

for(int i=0; i<totalOrders; i++)

    if ( (OrderSelect(i, SELECT_BY_POS)) && (OrderMagicNumber() == myMagicNumber) )

        totalLots += OrderLots();

Comment("totalLots=", totalLots); 

This is a common code for all trades. For buy and sell, you create separate variables and make a switch using OrderType()

This code should be inserted at the end?

 
gives an error
 
Kira27:
The functions are not user-defined. If you don't mind my asking, what language should you use to write the mt4 terminal software?
In mql4
 
smetantn1980:

It depends on where in the EA you want to get information. If after running on the current tick/bar (another question is how your EA works), then at the end of OnTick (or start, or maybe whatever else you have there) and vice versa. It's difficult to give advice without the Expert Advisor's source code.

In general, you have to do some digging yourself, if such questions arise

 

Hi, can you tell me how to implement the opening of differently directed orders in a trading robot on the tops of candlesticks?

 

How do i know what i am doing here?

Can you please tell me why I opened 2 accounts (cent) at Alpari (demo and real) - demo is working, while the real is silent for the second day. I am not trying to open orders here.)

Ilan Ilan 1.6 Dynamic_e-Trall_CDD

Can someone tell me what the problem is?

My e-mail: reka.nik.nik@mail.ru

Maybe there will be an offer on the robot for Alpari. Consider ))))

 
NikNikReka:

How do i know what i am doing here?

Can you please tell me why I opened 2 accounts (cent) at Alpari (demo and real) - demo is working, while the real is silent for the second day. I am not going to open a single order.)

Ilan Ilan 1.6 Dynamic_e-Trall_CDD

Can someone tell me what the problem is?

My e-mail: reka.nik.nik@mail.ru

Maybe there will be an offer on the robot for Alpari. Consider ))))

Alpari has 4-digit quotes on cent accounts and 5-digit quotes on demo accounts. Maybe your Expert Advisor cannot automatically adjust its parameters to the different digits of the quotes.
 

Hello, is there something similar in MQL5 "Only "Useful functions from KimIV" ?

Только "Полезные функции от KimIV". - MQL4 форум
  • www.mql5.com
Только "Полезные функции от KimIV". - MQL4 форум
 
CopyTime - bar open time, what about bar close time ?
 
Nauris:
CopyTime - bar open time, but how to set bar close time ?
The open time of the current bar will be the same as the close time of the previous bar.
Reason: