Hello World,
I want to do some kind of
#define dMACDMain 0
.
.
.
#property indicator_label__dMACDMain+1__ "MACD Main (0)"
.
.
.
SetIndexBuffer(dMACDMain, MACDMain, INDICATOR_DATA);
to get rid of silly errors, where these numbers get confused...
So preprocessor should use dMACDMain, add 1 and replace to #property indicator_label1 "MACD Main (0)". If possible, what syntax should I use?
Many thanks
Hello World,
I want to do some kind of
#define dMACDMain 0
.
.
.
#property indicator_label__dMACDMain+1__ "MACD Main (0)"
.
.
.
SetIndexBuffer(dMACDMain, MACDMain, INDICATOR_DATA);
to get rid of silly errors, where these numbers get confused...
So preprocessor should use dMACDMain, add 1 and replace to #property indicator_label1 "MACD Main (0)". If possible, what syntax should I use?
Many thanks
An alternative is to use PlotSet... functions instead of #property.
In your example, for the label you can call:
PlotIndexSetString(0, PLOT_LABEL, "MACD Main (0)");
![Documentation on MQL5: Constants, Enumerations and Structures / Indicator Constants / Drawing Styles Documentation on MQL5: Constants, Enumerations and Structures / Indicator Constants / Drawing Styles](https://c.mql5.com/36/50/documentation-on-mql5-constants__23.png)
- www.mql5.com
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello World,
I want to do some kind of
#define dMACDMain 0
.
.
.
#property indicator_label__dMACDMain+1__ "MACD Main (0)"
.
.
.
SetIndexBuffer(dMACDMain, MACDMain, INDICATOR_DATA);
to get rid of silly errors, where these numbers get confused...
So preprocessor should use dMACDMain, add 1 and replace to #property indicator_label1 "MACD Main (0)". If possible, what syntax should I use?
Many thanks