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)");

- www.mql5.com

- 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