P.S. How do you shift 15 bars from the right edge programmatically?
How about this?
//+------------------------------------------------------------------+//| Функция включает/выключает режим отображения ценового графика с |//| отступом от правого края. |//+------------------------------------------------------------------+bool ChartShiftSet(constbool value,constlong chart_ID=0)
{
//--- сбросим значение ошибкиResetLastError();
//--- установим значение свойстваif(!ChartSetInteger(chart_ID,CHART_SHIFT,0,value))
{
//--- выведем сообщение об ошибке в журнал "Эксперты"Print(__FUNCTION__+", Error Code = ",GetLastError());
return(false);
}
//--- успешное выполнениеreturn(true);
}
Примеры работы с графиком - Константы графиков - Константы, перечисления и структуры - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
When you drag the marker with your hands, it rests before reaching the right edge quite a bit - this is a fundamentally wrong limitation of the terminal!
When you press the button, the outermost bar almost sticks to the right edge, so the information value of the chart is lost.
You should press the button without reaching 15-20 bars and not perform this operation every time a new bar appears. Compress only once.
P.S. Why such a restriction and so much empty space?
When you drag the marker with your hands, it rests before reaching the right edge quite a lot - this is a fundamentally wrong limitation of the terminal!
When you press the button, the outermost bar almost sticks to the right edge, so the information value of the chart is lost.
You should press the button without reaching 15-20 bars and not perform this operation every time a new bar appears. Compress only once.
Percentage
//+------------------------------------------------------------------+ //| Функция устанавливает размер отступа нулевого бара от правого | //| края графика в процентах (от 10% до 50%). Для включения режима | //| отступа, нужно установить значение свойства CHART_SHIFT равным | //| true. | //+------------------------------------------------------------------+ bool ChartShiftSizeSet(constdouble value,constlong chart_ID=0)
{
//--- сбросим значение ошибки ResetLastError();
//--- установим значение свойства if(!ChartSetDouble(chart_ID,CHART_SHIFT_SIZE,value))
{
//--- выведем сообщение об ошибке в журнал "Эксперты" Print(__FUNCTION__+", Error Code = ",GetLastError());
return(false);
}
//--- успешное выполнение return(true);
}
Good afternoon everyone. I have 20 tools open and need to load the same template on all of them. Is it possible to automate this with a script? If so, can you please share the code on how to do it?
Good afternoon everyone. I have 20 tools open and need to load the same template on all of them. Is it possible to automate this with a script? If so, please share the code how to do it?
make a script - go through the charts one by one ( ChartFirst(), ChartNext() ) and apply the required template ( ChartApplyTemplate() ) to them
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.
There is such a thing on the graphic
I've seen it done in any colour, if I'm not mistaken.
How?
F8 and.
But this is also the colour of the grid, so uncheck
F8 and
But this is also the colour of the grid, so uncheck
Got it, thanks!
The grid is needed, too bad it's not separated.
P.S. How do you shift 15 bars from the right-hand edge programmatically?Got it, thanks!
The grid is needed, too bad it's not divided.
P.S. How do you shift 15 bars from the right edge programmatically?How about this?
How about this?
Yes, but that's pushing the button away
When you drag the marker with your hands, it rests before reaching the right edge quite a bit - this is a fundamentally wrong limitation of the terminal!
When you press the button, the outermost bar almost sticks to the right edge, so the information value of the chart is lost.
You should press the button without reaching 15-20 bars and not perform this operation every time a new bar appears. Compress only once.
P.S. Why such a restriction and so much empty space?
Yes, but it's pushing the button away.
When you drag the marker with your hands, it rests before reaching the right edge quite a lot - this is a fundamentally wrong limitation of the terminal!
When you press the button, the outermost bar almost sticks to the right edge, so the information value of the chart is lost.
You should press the button without reaching 15-20 bars and not perform this operation every time a new bar appears. Compress only once.
Percentage
Percentage
Works, but the minimum is an indentation that can be set by hand and at least
Visually, it's about a 10% minimum. Why doesn't 5% work
Works, but the minimum is an indentation that can be set by hand and at least
Yes, no less than 10% of the window.
Yes, at least 10% of the window.
So it turns out badly.
Good afternoon everyone. I have 20 tools open and need to load the same template on all of them. Is it possible to automate this with a script? If so, can you please share the code on how to do it?
Good afternoon everyone. I have 20 tools open and need to load the same template on all of them. Is it possible to automate this with a script? If so, please share the code how to do it?
make a script - go through the charts one by one ( ChartFirst(), ChartNext() ) and apply the required template ( ChartApplyTemplate() ) to them
You can check it out here :https://www.mql5.com/ru/blogs/post/747636 or customize it