Aleksandr Egorov: my question is if my EA is on the GBP chart and I want it to see a horizontal line from the EUR chart this does not work ?
Note the first parameter of the function
stringObjectName(
long chart_id, // идентификатор графикаint pos, // номер в списке объектов int sub_window=-1, // номер окна int type=-1// тип объекта
);
It is present in all functions of work with graphic objects.
Using the correct identifier you can easily get the object properties from any chart.
Функция использует синхронный вызов – это означает, что функция дожидается выполнения всех команд, которые были помещены в очередь графика перед её вызовом, и поэтому данная функция может быть затратной по времени. Нужно иметь это обстоятельство в виду...
Aleksandr Egorov: the long is the m5 and tg 0 current chart, but the string sumbol how? i need it on the pound from the chart of the euro or something i do not understand
One of the options: run a script on the chart with the line, which printsChartID, then you can access the line property from another chart. For example, if it is a horizontal line, then throughObjectGetDouble
One of the options: on the chart where the line is plotted, run a script that printsChartID, then you can access the property of the line from another chart. For example, if it is a horizontal line, then through ObjectGetDoubl thank you
There is another option: you just need to know the name of the graphical object and the type (you need the name to search through all graphs, and the type to find exactly the right object) ...
Variant #2: set name, type of object and in which window to search for it ("0" - in the main window). The search is performed in OnInit and if the object is found, we save the chart identifier to the m_obj_chart_id variable.
If I place market orders(TRADE_ACTION_DEAL) with specified Stop Loss and Take Profit levels, but the broker has a ban on setting orders with SL or TP, will the order be cancelled or set with zero SL and TP?
Variant #2: specify name, object type and in which window to search for it ("0" - in the main window). The search is performed in OnInit and if the object is found, we save the chart identifier to the m_obj_chart_id variable.
my question is if my EA is on the GBP chart and I want it to see a horizontal line from the EUR chart this does not work ?
Note the first parameter of the function
It is present in all functions of work with graphic objects.
Using the correct identifier you can easily get the object properties from any chart.
the long is the m5 and tg 0 current chart, but the string sumbol how? i need it on the pound from the chart of the euro or something i do not understand
No, no timeframes - you need a chart ID:ChartID
One of the options: run a script on the chart with the line, which printsChartID, then you can access the line property from another chart. For example, if it is a horizontal line, then throughObjectGetDouble
No, no timeframes - you need a chart ID:ChartID
One of the options: on the chart where the line is plotted, run a script that printsChartID, then you can access the property of the line from another chart. For example, if it is a horizontal line, then through ObjectGetDoubl thank you
thanks
thanks
There is another option: you just need to know the name of the graphical object and the type (you need the name to search through all graphs, and the type to find exactly the right object) ...
thanks
Variant #2: set name, type of object and in which window to search for it ("0" - in the main window). The search is performed in OnInit and if the object is found, we save the chart identifier to the m_obj_chart_id variable.
Variant #2: specify name, object type and in which window to search for it ("0" - in the main window). The search is performed in OnInit and if the object is found, we save the chart identifier to the m_obj_chart_id variable.
Thank you even more
Forum on Trading, Automated Trading Systems and Strategy Tests
FAQ from Beginners MQL5 MT5 MetaTrader 5
Vladimir Karputov, 2019.08.31 08:16
And your mistake is in the start price formation:
I recommend to make the starting price separately for Stop and separately for Limit pending orders.
Hello Vladimir!
Please help me modify the start price of the script below:
The script should place pending orders not based on Ask and Bid, but on the hight and low of the previous bar (candlestick).
Sincerely, Vladimir.