You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Transferred from Write and earn in MQL5
Can you tell me how to modify i.e. change stop loss value in mql5. I already know how to do it on 4. I'm trying to modify my robot for 5 version and it got stuck.
Transferred from Write and earn in MQL5
Can you tell me how to modify i.e. change stop loss value in mql5. I already know how to do it on 4. I'm trying to modify my robot for 5 version and it got stuck.
The tester spits out a graph without the necessary indicators, such as stochastics, etc., so you have to add them later.
Use the required template, you can read about the templates in the Terminal Help section MetaTrader 5 → Working with Charts → Templates and Profiles:
There are several predefined template names in the terminal:
In order to create a template with the required parameters (or modify an existing one), set up the chart in a required manner and save the template under the required name using the corresponding command.
Can anyone suggest some examples, articles on the subject?
Global variables of the client terminal.
We should cover the topic. I haven't found any real examples in Help. I'm trying to figure out how to create such a variable. So far, I got errors on my variants.
May someone suggest an example, an article on the subject?
https://www.mql5.com/ru/docs/globals
Let's learn to read a manual, people have written the letters in words, and you ignore them.
GlobalVariableSet("variable_name",set_value)
Sets new valueof global variable. If the variable does not exist, the system creates a new global variable.
Thanks, that's it:
How could I, an unheated dummy, know about inverted commas?)
There is no example for mql5 Help))
The manual says that the name of a global variable is specified as a string, the quotes are a normal way to specify a string.
Read the rules, for they are rules.
You can set it this way:
{ // ...new bar
static datetime New_Time=0; // time of current bar
New_Bar=false; // no new bar
if(New_Time!=Time[0]) // compare time
{
New_Time=Time[0]; // time is now
New_Bar=true; // Caught new bar
}
} Everything
Here I modified it in mql5:
{ // ... new bar
static datetime New_Time=0; // Time of the current bar
New_Bar=false; // No new bar
MqlTick last_tick;//The prices of the last tick received
SymbolInfoTick(_Symbol,last_tick);//Fill structure last_tick with the prices of the current symbol.
if(New_Time!=last_tick.time) // Compare time
{
New_Time=last_tick.time; // Now the time is
New_Bar=true; // Caught a new bar
}
}But
I must be getting the new bar time wrong somehow.
But the New_Bar variable becomes true every tick.
I must be getting the new bar time wrong.
Because you take a new tick time each time, and of course it is not equal to the previous one.
And in the previous function you took the start time of the bar. So here too you should take the bar time, not the tick time.