rrsch: have an indicator where I'd like to be able to turn one set of lines on and off. I don't seem to be able to use variables to do this. Is there something I'm missing, or some other way to do this?
The Drawing style is an integer value, not a string!
input int dispRF1 = DRAW_LINE; // DRAW_NONE or DRAW_LINE ... SetIndexBuffer(1, rngfilt1); SetIndexStyle(1, dispRF1); SetIndexLabel(1, "TRF rngfilt1");
Drawing Styles
Drawing shape styles for SetIndexStyle() function.
ID | Value | Description |
---|---|---|
DRAW_LINE | 0 | Drawing line |
DRAW_SECTION | 1 | Drawing sections |
DRAW_HISTOGRAM | 2 | Drawing histogram |
DRAW_ARROW | 3 | Drawing arrows (symbols) |
DRAW_ZIGZAG | 4 | Drawing sections between even and odd indicator buffers, 2 buffers of values |
DRAW_NONE | 12 | No drawing |
To facilitate your input and make it easier for the user selection, create an enumeration ...
enum EDrawType { E_DrawType_Line = DRAW_LINE, // Draw Line E_DrawType_None = DRAW_NONE // Draw None }; input EDrawType eDrawType = E_DrawType_Line; // Drawing Type ... SetIndexStyle( 1, (int) eDrawType );
Ah, I see. Thank you!
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi all.
I have an indicator where I'd like to be able to turn one set of lines on and off. I don't seem to be able to use variables to do this. Is there something I'm missing, or some other way to do this?