Questions from Beginners MQL5 MT5 MetaTrader 5 - page 993

 
I'm a newbie... or rather an oldbie with 5 years of holiday)
help me register an account...
how to choose a broker...?
there is no program from now?
 
Юлия Николаева:
I'm a newbie... or rather an oldbie with 5 years of holiday)
help me register an account...
how to choose a broker...?
there is no program now?
The answer will be seen as an advertisement or discussion of a broker. So the answer can only be in the PM.
 
Alexey Viktorov:
Replying to you will be seen as advertising or discussion of the broker. So the answer can only be in a private message.
Well, at least write in private - what to do?
 
Registered at meta...-bse, it won't let me into my account on my laptop, on my phone it won't let me top up where the plus sign in "trade" is
 

good day I know it is not on the topic, but nevertheless

i open a long position in MT5 terminal, on the next day the broker calculates points to swap and moves the order to close the day. what should i call it correctly? and is it possible to do as it was with MT4
Совершение сделок - Торговые операции - MetaTrader 5
Совершение сделок - Торговые операции - MetaTrader 5
  • www.metatrader5.com
Торговая деятельность в платформе связана с формированием и отсылкой рыночных и отложенных ордеров для исполнения брокером, а также с управлением текущими позициями путем их модификации или закрытия. Платформа позволяет удобно просматривать торговую историю на счете, настраивать оповещения о событиях на рынке и многое другое. Открытие позиций...
 

Hello fellow programmers. Help me make an integer but without warning possible loss of data due to type conversion

int Candle = (iClose(_Symbol,PERIOD_H1,1) - iOpen(_Symbol,PERIOD_H1,1)) / _Point; 
if(Candle < 0){Candle = Candle * -1;}

This construction works perfectly and the output is always a positive integer. But when compiling it, MQL5 shows a possible loss of data due to type conversion warning. Since I have a lot of similar constructs in my code, I am "fed up" with these warnings.

I even did the following

double Candle = (iClose(_Symbol,PERIOD_H1,1) - iOpen(_Symbol,PERIOD_H1,1)) / _Point;
if(Candle < 0){Candle = Candle * -1;}
string Candle2 =  DoubleToString(Candle, 0);
int Candle3 = StringToInteger(Candle2);

But still this warning shows possible loss of data due to type conversion. How to convert a number to int type without these warnings?

 
Kolya32:

Hello fellow programmers. Help me make an integer but without warning possible loss of data due to type conversion

This construction works perfectly and the output is always a positive integer. But when compiling it, MQL5 shows a possible loss of data due to type conversion warning. Since I have a lot of similar constructs in my code, I am "fed up" with these warnings.

I even did this

But still this warning warns you of possible loss of data due to type conversion. HOW CAN I REPRESENT a NUMBER into int type without these warnings?

Like this

int Candle = (int)((iClose(_Symbol,PERIOD_H1,1) - iOpen(_Symbol,PERIOD_H1,1)) / _Point);
 
Kolya32:

Hello fellow programmers. Help me make an integer but without warning possible loss of data due to type conversion

This construction works perfectly and the output is always a positive integer. But when compiling it, MQL5 shows a possible loss of data due to type conversion warning. Since I have a lot of similar constructs in my code, I am "fed up" with these warnings.

I even did the following

But still this warning shows possible loss of data due to type conversion. How to convert a number to int type without these warnings?

int Candle = int((iClose(_Symbol,PERIOD_H1,1) - iOpen(_Symbol,PERIOD_H1,1)) / _Point); 
 
Vitaly Muzichenko:
int Candle = (int)((iClose(_Symbol,PERIOD_H1,1) - iOpen(_Symbol,PERIOD_H1,1)) / _Point);

Thank you very much. There were 20 warnings and now there are none. It's not even familiar)))

 
Artyom Trishkin:
int Candle = int((iClose(_Symbol,PERIOD_H1,1) - iOpen(_Symbol,PERIOD_H1,1)) / _Point); 
Thank you too. That works too)
Reason: