MQL4 Reference
Custom indicators
IndicatorDigits
| void IndicatorDigits( |
int digits) |
Sets precision format (the count of digits after decimal point) to visualize indicator values.
The symbol price preicision is used by default, the indicator being attached to this symbol chart.
Parameters:
| digits |
- |
Precision format, the count of digits after decimal point. |
Sample:
int init()
{
//---- 2 additional buffers are used for counting.
IndicatorBuffers(3);
//---- setting of drawing parameters
SetIndexStyle(0,DRAW_HISTOGRAM,STYLE_SOLID,3);
SetIndexDrawBegin(0,SignalSMA);
IndicatorDigits(Digits+2);
//---- 3 allocated buffers of an indicator
SetIndexBuffer(0,ind_buffer1);
SetIndexBuffer(1,ind_buffer2);
SetIndexBuffer(2,ind_buffer3);
//---- "short name" for DataWindow and indicator subwindow
IndicatorShortName("OsMA("+FastEMA+","+SlowEMA+","+SignalSMA+")");
//---- initialization done
return(0);
}
|
|
|