Good afternoon... Probably a simple question, but I can't figure out where to start. I need a script that draws a rectangle with a name containing the date and time of creation. Maybe someone has an example that I can fit to my task.
Good afternoon... Probably a simple question, but I can't figure out where to start. I need a script that draws a rectangle with a name containing the date and time of creation. Maybe someone has an example that I can fit to my task.
Good afternoon, does the number of decimal places in the indicator (in the separate window) depend on the _Digits of the tool? If so, how can I bypass it? The indicator gets fractional values, while it only draws integer ones on the scale.
VANDER: Hi. Does the number of decimal places in an indicator (in a separate window) depend on _Digits of a symbol? If so, how can you avoid it? The indicator produces fractional values, while it displays only integers on the scale.
Example indicator [data folder]\MQL5\Indicators\Examples\ATR.mq5
OnInit() -> set accuracy of displaying
//+------------------------------------------------------------------+//| Custom indicator initialization function |//+------------------------------------------------------------------+voidOnInit()
{
//--- check for input valueif(InpAtrPeriod<=0)
{
ExtPeriodATR=14;
printf("Incorrect input parameter InpAtrPeriod = %d. Indicator will use value %d for calculations.",InpAtrPeriod,ExtPeriodATR);
}
else ExtPeriodATR=InpAtrPeriod;
//--- indicator buffers mappingSetIndexBuffer(0,ExtATRBuffer,INDICATOR_DATA);
SetIndexBuffer(1,ExtTRBuffer,INDICATOR_CALCULATIONS);
//---IndicatorSetInteger(INDICATOR_DIGITS,_Digits);//--- sets first bar from what index will be drawn
Example #2 -> [data folder]\MQL5\Indicators\Examples\Custom Moving Average.mq5
here the accuracy is higher
//+------------------------------------------------------------------+//| Custom indicator initialization function |//+------------------------------------------------------------------+voidOnInit()
{
//--- indicator buffers mappingSetIndexBuffer(0,ExtLineBuffer,INDICATOR_DATA);
//--- set accuracyIndicatorSetInteger(INDICATOR_DIGITS,_Digits+1);
Example #3 -> [data folder]\MQL5\Indicators\Examples\ADX.mq5
there is always precision of two values - regardless of Digits()
//+------------------------------------------------------------------+//| Custom indicator initialization function |//+------------------------------------------------------------------+voidOnInit()
{
//--- check for input parametersif(InpPeriodADX>=100 || InpPeriodADX<=0)
{
ExtADXPeriod=14;
printf("Incorrect value for input variable Period_ADX=%d. Indicator will use value=%d for calculations.",InpPeriodADX,ExtADXPeriod);
}
else ExtADXPeriod=InpPeriodADX;
//---- indicator buffersSetIndexBuffer(0,ExtADXBuffer);
SetIndexBuffer(1,ExtPDIBuffer);
SetIndexBuffer(2,ExtNDIBuffer);
SetIndexBuffer(3,ExtPDBuffer,INDICATOR_CALCULATIONS);
SetIndexBuffer(4,ExtNDBuffer,INDICATOR_CALCULATIONS);
SetIndexBuffer(5,ExtTmpBuffer,INDICATOR_CALCULATIONS);
//--- indicator digitsIndicatorSetInteger(INDICATOR_DIGITS,2);
Все объекты, используемые в техническом анализе, имеют привязку на графиках по координатам цены и времени – трендовая линия, каналы, инструменты Фибоначчи и т.д. Но есть ряд вспомогательных объектов, предназначенных для улучшения интерфейса, которые имеют привязку к видимой всегда части графика (основное окно графика или подокна индикаторов...
Take theOBJ_RECTANGLE reference example as a basis,
but change this line
to this:
Use theOBJ_RECTANGLE reference example as a basis,
only change this line
to this:
Thank you! :) Got it...
Hi. Does the number of decimal places in an indicator (in a separate window) depend on _Digits of a symbol? If so, how can you avoid it? The indicator produces fractional values, while it displays only integers on the scale.
Example indicator [data folder]\MQL5\Indicators\Examples\ATR.mq5
OnInit() -> set accuracy of displaying
Example #2 -> [data folder]\MQL5\Indicators\Examples\Custom Moving Average.mq5
here the accuracy is higher
Example #3 -> [data folder]\MQL5\Indicators\Examples\ADX.mq5
there is always precision of two values - regardless of Digits()
Is it possible to access other charts in the strategy tester in visual mode (in multicurrency testing). For example:
If you launch this EA in the strategy tester, then the visualizer will open charts of EURUSD, GBPUSD, USDJPY, but
it will show that there is only 1 chart.
How do I know the size of the Label in terms of font size and text length? To position it relative to other elements
Gives 0
Is it possible to access other charts in the strategy tester in visual mode (in multicurrency testing). For example:
If you launch this EA in the strategy tester, the visualizer will open charts of EURUSD, GBPUSD, USDJPY, but
it will show that there is only 1 chart.
This is a problem with getting the renderer's window handles. And there's no way to beat it.
How do I know the size of the Label in terms of font size and text length? To position it relative to other elements
Gives 0