md4RM: guys ... I searched the net... and couldn't find it ...
I need an idea how to make mql4 give me the price of a particular bar for a particular currency ... while on a different currency pair ...
help ... thanks in advance ...
i searched the site i had an idea look in the help on the site i gave an answer to the question in the help who needs more ideas look in the help you can look in the editor all the ideas there please on any other currency pair
double PERIOD=1.0;
double result=1.0;
int i=0;
while(result!=0.0)
{
if (iMA(NULL,0,PERIOD,0,MODE_SMA,PRICE_CLOSE,0) < A)
result=1;
if (iMA(NULL,0,PERIOD,0,MODE_SMA,PRICE_CLOSE,0) > A)
result=0;
PERIOD+=1;
i++;
}
res=OrderSend(Symbol(),OP_SELL,LotsOptimized(),Bid,3,0,0,"",MAGICMA,0,Red);
return;
Here PERIOD, as I understand it, will be searched starting from 1, but the upper limit is not specified. So, how can I specify that, for example, it will only search up to 20?
The main thing from string to int can be done, but they forgot to think of a way back.
Good day!
"... but they forgot to make it back."
Of course, everything is always the WORLD'S FIRST fault - the PLANNERS!
Who did they make this for?
string DoubleToStr( doublevalue, int digits)
Преобразование числового значения в текстовую строку, содержащую символьное представление числа в указанном формате точности.
Параметры:
value - Величина с плавающей точкой.
digits - Формат точности, число цифр после десятичной точки (0-8).
Пример:
stringvalue=DoubleToStr(1.28473418, 5);
// содержимое строки value - "1.28473"
You've already figured it out yourself)) You have operators nested in the while loop ending with a parenthesis, i.e. only the print operator works in the loop
Try it this way:
a>0 will not work, because the a<0 condition inside the operator will NOT be fulfilled. And when"a" becomes below zero, the loop will be terminated at all and the action I need in the operator will not be executed...
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
guys ... I searched the net... and couldn't find it ...
I need an idea how to make mql4 give me the price of a particular bar for a particular currency ... while on a different currency pair ...
help ... thanks in advance ...
There is a code:
Here PERIOD, as I understand it, will be searched starting from 1, but the upper limit is not specified. So, how can I specify that, for example, it will only search up to 20?double iClose( string symbol, int timeframe, int shift)
How to make it so that instead of "int timeframe" ... is the current period ...
How do you make the "int timeframe" ... is the current period ...
double iClose( string symbol, int timeframe, int shift)
How to make it so that instead of ""int timeframe" ... is the current period ...
Read to the end of the links you've been given (I repeat):
https://docs.mql4.com/ru/series/iopen
How about more complicated?
....
You already figured it out yourself)) The operators nested in the while loop end in parentheses, i.e. only the print operator works in the loop
Try it this way:
Hello!
Could you tell me how to convert int to string?
The main thing from string to int can be done, but they forgot to think of a way back.
Hello!
Could you tell me how to convert int to string?
The main thing from string to int can be done, but they forgot to think of a way back.
Good day!
"... but they forgot to make it back."
Of course, everything is always the WORLD'S FIRST fault - the PLANNERS!
Who did they make this for?
You've already figured it out yourself)) You have operators nested in the while loop ending with a parenthesis, i.e. only the print operator works in the loop
Try it this way:
a>0 will not work, because the a<0 condition inside the operator will NOT be fulfilled. And when"a" becomes below zero, the loop will be terminated at all and the action I need in the operator will not be executed...