I want to make a button on the chart so that I can run the script by pressing the button, with the parameter taken from the indicator
You write the code of the button in the indicator code and integrate the script code as a function in the indicator code. Press the button - call the function, in which you pass the indicator parameter.
If the problem is in creating the button itself, here it is:
Thanks, I think I've got the button figured out, but I haven't figured out how to attach the script. The script is at C:\Users\...\MQL4\Scripts\Order.ex4
Another question. I use a small tablet on Windows without a mouse, the buttons on the graph is a convenient solution for me. Is it possible to have the keyboard command Ctrl+F5 executed when pressing the button on the graph, it would be more convenient for me to view the following profile.
Thanks, I think I've figured out the button, but I haven't figured out how to attach the script. The script is located at C:\Users\...\MQL4\Scripts\Order.ex4
Assign a shortcut to the script and simulate it using WinAPI. But I haven't done anything like that inMQL programs. So try googling"SendInput User32.dll WinAPI".
I am struggling with one question. Could you please tell me how to solve it?
The idea is the following: I draw a line at the previous maximum of the candle. I want the line to be shifted depending on the previous maximum.
voidOnTick()
{
//---double o1 = iOpen(Symbol(),Period(),1);
double h1 = iHigh(Symbol(),Period(),1);
double l1 = iLow(Symbol(),Period(),1);
double c1 = iClose(Symbol(),Period(),1);
double c0 = iClose(Symbol(),Period(),0);
double rt = 0;
double rs1 = 0;
rt=MathAbs(c1-o1)/_Point; //размер тела свечи
rs1=MathAbs(h1-c1)/_Point;// размер верхней тени свечиif (rs1>=rt) // условие для построения уровней (если верхняя тень предыдущей свечи, больше, или равна телу этой же всечи, то...
{
double PRH=iHigh(Symbol(),_Period,1); // то это будет максимумObjectCreate(0,"HL",OBJ_HLINE,0,_Period,PRH); // и строим по этому максимуму, горизонтальную линиюComment("ЦЕНА МАКС =======",PRH,"\n"); // комментарий пред. максимума
}
}
При создании пользовательского индикатора можно указать один из 18 типов графического построения (способа отображения на главном окне графика или в подокне графика), значения которых указаны в перечислении ENUM_DRAW_TYPE. В зависимости от стиля рисования, может потребоваться от одного до четырех буферов значений (отмеченных как INDICATOR_DATA...
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.
@Artyom Trishkin
Can you give me some business tips?
I can give you a lot of different information about turkeys.
For starters, it's a pheasant bird. It's dietary meat. I feed it to my cat. He says it's delicious...
Can you give me a clue as to the point?
And to the point, why would you want to run the script from an indicator?
As for the point, who told you to be so stupid as to run scripts from an indicator? :)
And most importantly, why?
I want to make a button on the chart so that I can run a script by pressing a button with a parameter taken from the indicator
I want to make a button on the chart so that I can run the script by pressing the button, with the parameter taken from the indicator
You write the code of the button in the indicator code and integrate the script code as a function in the indicator code. Press the button - call the function, in which you pass the indicator parameter.
I want to make a button on the chart, so that I can run the script by pressing the button, with the parameter taken from the indicator
If the problem is in creating the button itself, here it is:
If the problem is in creating the button itself, here it is:
Thanks, I think I've got the button figured out, but I haven't figured out how to attach the script. The script is at C:\Users\...\MQL4\Scripts\Order.ex4
Thanks, I think I've figured out the button, but I haven't figured out how to attach the script. The script is located at C:\Users\...\MQL4\Scripts\Order.ex4
Assign a shortcut to the script and simulate it using WinAPI. But I haven't done anything like that inMQL programs. So try googling"SendInput User32.dll WinAPI".
Good afternoon!
I am struggling with one question. Could you please tell me how to solve it?
The idea is the following: I draw a line at the previous maximum of the candle. I want the line to be shifted depending on the previous maximum.
Good afternoon!
I am struggling with one question. Please tell me how to solve it.
The idea is the following: I draw a line at the previous maximum of the candle. I want the line to be shifted depending on the previous maximum.