SuhanovDM94 create an indicator that will read a file with USDTRY quotes from shared memory, then calculate the spread and draw it on this "single" chart as a regular line. I haven't thought of anything better yet. Thanks for the tips, everyone!)
Данная статья знакомит с реализацией межпроцессного взаимодействия между терминалами MetaTrader 5 посредством именованных каналов (named pipes). Предложен класс CNamedPipes, реализующий возможность использования именованных каналов. Рассмотрен тиковый индикатор для тестирования связи между двумя клиентскими терминалами MetaTrader 5 и измерения общей пропускной способности системы. Представленный метод взаимодействия оказался пригодным для отправки котировок в реальном времени.
Перед многими разработчиками встает одинаковая проблема - как пробиться в песочницу торгового терминала без применения небезопасных DLL. Одним из простых и безопасных методов является использование стандартных именованных каналов (Named Pipes), которые работают как обычные файловые операции. Они позволяют организовать межпроцессорное клиент-серверное взаимодействие между программами. Посмотрите практические примеры на C++ и MQL5 в виде сервера, клиента, обмен данными между ними и замер производительности.
Good afternoon programmers! Please help me with a script. I need the script to draw a multitude of vertical lines on the chart for a list of dates. That is, for example: I enter in the body of the code, a list of 100 dates for example, and the script just draws a vertical line for each date.
I started to try something here, but somehow it turns out to be very cumbersome, and it is only one line.
#property strict//--- описание#property description"Скрипт строит графический объект \"Вертикальная линия\"."#property description"Дата точки привязки задается в процентах от ширины"#property description"окна графика в барах."//--- покажем окно входных параметров при запуске скрипта#property script_show_inputs//--- входные параметры скриптаinputstring InpName="VLine"; // Имя линииinputint InpDate=25; // Дата линии в %inputcolor InpColor=clrRed; // Цвет линииinputENUM_LINE_STYLE InpStyle=STYLE_DASH; // Стиль линииinputint InpWidth=3; // Толщина линииinputbool InpBack=false; // Линия на заднем планеinputbool InpSelection=true; // Выделить для перемещенийinputbool InpHidden=true; // Скрыт в списке объектов//+------------------------------------------------------------------+//| Создает вертикальную линию |//+------------------------------------------------------------------+bool VLineCreate(constlong chart_ID=0, // ID графикаconststring name="VLine", // имя линииconstint sub_window=0, // номер подокнаdatetime time=0, // время линииconstcolor clr=clrRed, // цвет линииconstENUM_LINE_STYLE style=STYLE_SOLID, // стиль линииconstint width=1, // толщина линииconstbool back=false, // на заднем планеconstbool selection=true, // выделить для перемещенийconstbool hidden=true) // скрыт в списке объектов
{
//--- если время линии не задано, то проводим ее через последний бар
time=TimeCurrent();
ObjectCreate(chart_ID,name,OBJ_VLINE,sub_window,time,0);
//--- установим цвет линииObjectSetInteger(chart_ID,name,OBJPROP_COLOR,clr);
//--- установим стиль отображения линииObjectSetInteger(chart_ID,name,OBJPROP_STYLE,style);
//--- установим толщину линииObjectSetInteger(chart_ID,name,OBJPROP_WIDTH,width);
//--- отобразим на переднем (false) или заднем (true) планеObjectSetInteger(chart_ID,name,OBJPROP_BACK,back);
//--- включим (true) или отключим (false) режим перемещения линии мышью//--- при создании графического объекта функцией ObjectCreate, по умолчанию объект//--- нельзя выделить и перемещать. Внутри же этого метода параметр selection//--- по умолчанию равен true, что позволяет выделять и перемещать этот объектObjectSetInteger(chart_ID,name,OBJPROP_SELECTABLE,selection);
ObjectSetInteger(chart_ID,name,OBJPROP_SELECTED,selection);
return(true);
}
//+------------------------------------------------------------------+//| Script program start function |//+------------------------------------------------------------------+voidOnStart()
{
datetime time=TimeCurrent();
//--- создадим вертикальную линию
VLineCreate(0,InpName,0,time,InpColor,InpStyle,InpWidth,InpBack,
InpSelection,InpHidden);
return;
}
Good afternoon programmers! Please help me with a script. I need the script to draw a multitude of vertical lines on the chart for a list of dates. That is, for example: I enter in the body of the code, a list of 100 dates for example, and the script just draws a vertical line for each date.
I started to try something here, but somehow it turns out to be very cumbersome, and it is only one line.
The date in string through the separator.
Then split this string into an array.
Then loop through the array at each iteration by calling
You don't need to convert anything to string to draw a line.
You have described the task, but you have not described it completely, so people have to guess.
How are you going to record 100 dates?
Are you going to write them in the body of the script?
or will you enter them manually when launching the Expert Advisor?
I checked. The second case is good, but it is not suitable because of the need to enter each date into the window manually, which is time-consuming. It should be simple... "ctrl-c, ctrl-v".
In the first case, for some reason it does not draw 3 lines, but only one, on the most recent candle. Why, it is not clear yet, I'm looking into it.
Checked. The second case is good, but it is not suitable because of the need to enter each date into the window manually, time-consuming. It should be simple... "ctrl-c, ctrl-v."
In the first case, for some reason it does not draw 3 lines, but only one, on the most recent candle. Why, it is not clear yet, I'm looking into it.
The line name should be unique. I missed this point
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.
Read: https://www.mql5.com/ru/articles/115
And also: https://www.mql5.com/ru/articles/503
Good afternoon!
Could you please tell me why forward testing is necessary?
Good afternoon programmers! Please help me with a script. I need the script to draw a multitude of vertical lines on the chart for a list of dates. That is, for example: I enter in the body of the code, a list of 100 dates for example, and the script just draws a vertical line for each date.
I started to try something here, but somehow it turns out to be very cumbersome, and it is only one line.
Good afternoon programmers! Please help me with a script. I need the script to draw a multitude of vertical lines on the chart for a list of dates. That is, for example: I enter in the body of the code, a list of 100 dates for example, and the script just draws a vertical line for each date.
I started to try something here, but somehow it turns out to be very cumbersome, and it is only one line.
The date in string through the separator.
Then split this string into an array.
Then loop through the array at each iteration by calling
Thank you. Since I'm a very superficial programmer. I'll start asking in order.
"Put the date in string with a delimiter."
Use " string TimeToString( ""
????
????
You don't need to convert anything to string to draw a line.
You described the problem, but you didn't describe it completely, so people have to figure it out.
How are you going to record 100 dates?
Are you going to write them in the body of the script?
Or will you enter them manually when launching the Expert Advisor?
You don't need to convert anything to string to draw a line.
You have described the task, but you have not described it completely, so people have to guess.
How are you going to record 100 dates?
Are you going to write them in the body of the script?
or will you enter them manually when launching the Expert Advisor?
I checked. The second case is good, but it is not suitable because of the need to enter each date into the window manually, which is time-consuming. It should be simple... "ctrl-c, ctrl-v".
In the first case, for some reason it does not draw 3 lines, but only one, on the most recent candle. Why, it is not clear yet, I'm looking into it.
Checked. The second case is good, but it is not suitable because of the need to enter each date into the window manually, time-consuming. It should be simple... "ctrl-c, ctrl-v."
In the first case, for some reason it does not draw 3 lines, but only one, on the most recent candle. Why, it is not clear yet, I'm looking into it.
The line name should be unique. I missed this point