Questions from Beginners MQL5 MT5 MetaTrader 5 - page 726

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
Have a variable for example :
double NLb=0,NLs=0;
How do I send it to another terminal?
from mt4 to mt4 , mt4 to mt5 ,
I have an idea I want to try
Have a variable for example :
double NLb=0,NLs=0;
How do I send it to another terminal?
from mt4 to mt4 , mt4 to mt5 ,
I have an idea I want to try
How do I send it to a public folder?
double NLb=0,NLs=0;
and how do I get it out of an EA or indicator in another terminal?How do I send it to the public folder?
double NLb=0,NLs=0;
and then how to get it out of an EA or indicator of another terminal?It's easy.
You need to create a file, a text file can be created,
The file will be located in COMMON_PATH.
You overwrite the file with the data.
On the other terminal, it's the same, but instead of SHAREWRITE you put SHAREREAD
https://www.mql5.com/ru/docs/files/fileopen
Start by reading the help, it's all there.
If you don't have the skills to do it. Contact Freelance.
By the way, I also found some standard classes
https://www.mql5.com/ru/docs/standardlibrary/fileoperations
Hello all.
I am a beginner in this field and to me it seems unreal to write any advisors, scripts etc.
Could you, as an experienced user, please advise me what to start working with first, what literature to pay attention to, etc.
I just can't describe in detail what I want to learn, because I know very little about this field.
Thank you in advance!
Start with the simplest scripts and go through them with a debugger to understand the programming language itself. Learn if, for, switch, do statements, function calls with parameters passed. All of this under the debugger.
Then write here again ))
Can you tell me how to select an object when it is created, so that it doesn't lose its selection and doesn't select itself when the user deselects it. It was easy in the fourth, but it doesn't work in the fifth.
It used to be, and it worked just fine:
if(ObjectFind(chart_ID,nm)!=0) {
ObjectCreate(chart_ID,nm,OBJ_HLINE,0,0,0);
ObjectSetInteger(chart_ID,nm,OBJPROP_SELECTED,sel);
...
}
ObjectSetDouble(chart_ID,nm,OBJPROP_PRICE,p);
}
As you can see, when creating, we can select or not select the object being created at once and it will not change anymore and there will be no reference to it, but it doesn't work in the fifth one, it creates it without selection.
How to make mql5 so that the object can be selected at creation and then manually manage it when needed - to select/not to select
Can you tell me how to select an object when it's created, so that it doesn't lose its selection and doesn't select itself when the user deselects it. It was easy in the fourth, but it doesn't work in the fifth.
It used to be, and it worked just fine:
if(ObjectFind(chart_ID,nm)!=0) {
ObjectCreate(chart_ID,nm,OBJ_HLINE,0,0,0);
ObjectSetInteger(chart_ID,nm,OBJPROP_SELECTED,sel);
...
}
ObjectSetDouble(chart_ID,nm,OBJPROP_PRICE,p);
}
As you can see, when creating, we can select or not select the object being created at once and it will not change anymore and there will be no reference to it, but it doesn't work in the fifth one, it creates it without selection.
How can I make mql5 create an object so that it could be selected and then manipulated manually when necessary - to select/not select an object?
Do the following:
//--- при создании графического объекта функцией ObjectCreate, по умолчанию объект
//--- нельзя выделить и перемещать. Внутри же этого метода параметр selection
//--- по умолчанию равен true, что позволяет выделять и перемещать этот объект
ObjectSetInteger(chart_ID,name,OBJPROP_SELECTABLE,selection);
ObjectSetInteger(chart_ID,name,OBJPROP_SELECTED,selection);
"selection" here should be "true".