And another question: is a=a+5 allowed in code? Will the variable a count correctly? Or should I first assign the value of a to another variable, increment it, and then assign the resulting value to the variable a? i.e. b=a; a=b+5?
Ellie: And another question: is a=a+5 allowed in code? Will the variable a count correctly? Or should I first assign the value of a to another variable, increment it, and then assign the resulting value to the variable a? i.e. b=a; a=b+5?
#property strictint A = 10; // начальное значение АvoidOnStart()
{
//---
A = A + 5; // увеличение А на 5 и присвоение А результата, A = 10 + 5 = 15
A += 5; // то же самое, А увеличивается на 5, А = 15
A = A - 5: // уменьшение А на 5 и присвоение А результата, A = 10 - 5 = 5
A -= 5; // то же самое, А уменьшено на 5, А = 5
A = A * 5; // умножение А на 5 и присвоение А результата, A = 10 * 5 = 50
A *= 5; // то же самое, А умножено на 5, А = 50
A = A / 5; // деление А на 5 и присвоение А результата, A = 10 / 5 = 2
A /= 5; // то же самое, А поделено на 5, А = 2
}
Currently the function is linked to the current chart (double High[]). How can I modify the function in order to receive prices of different timeframes High_Lim(PERIOD_H4,10,1) High_Lim(PERIOD_M15,10,1)?
If anyone needs, here is an example of how to get the maximum bar prices of different timeframes.
//+------------------------------------------------------------------+//| Expert tick function |//+------------------------------------------------------------------+voidOnTick()
{
//---Print("::::::::::::::::::::::::: High_Lim(PERIOD_H1,10,1) = ", High_Lim(PERIOD_H1,10,1));
Print("::::::::::::::::::::::::: High_Lim(PERIOD_H4,10,1) = ", High_Lim(PERIOD_H4,10,1));
}
//+----------------------------------------------------------------------------+//| Autors : Nauris Zukas (abeiks) |//+----------------------------------------------------------------------------+double High_Lim(ENUM_TIMEFRAMES GrafPeriod, int Bari_atp, int Bari_shift)
{double HighLim = iHigh(NULL, GrafPeriod,iHighest(NULL,GrafPeriod,MODE_HIGH,Bari_atp,Bari_shift));
return(HighLim);
}
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.
Can you tell me how to make a manual input request from the script?
#property script_show_inputs.
And another question: is a=a+5 allowed in code? Will the variable a count correctly? Or should I first assign the value of a to another variable, increment it, and then assign the resulting value to the variable a? i.e. b=a; a=b+5?
a=a+5 translates into Russian as: "a" will now equal "a+5". In short you can :)
What could the error mean and where can I find a description of it?
Thank you in advance.
Expert Advisor compiles normally.
When profiling, I get an error in "Journal" tab: MT4 Profiling - loading of xxXXXXXxx failed
When I attach it to a chart no visible changes occur, it says "xxXXXXXxx is not expert and cannot be executed" in the "Journal" tab
Hello!
Currently the function is linked to the current chart (double High[]). How can I modify the function in order to receive prices of different timeframes High_Lim(PERIOD_H4,10,1) High_Lim(PERIOD_M15,10,1)?
If anyone needs, here is an example of how to get the maximum bar prices of different timeframes.