General rules and best pratices of the Forum. - General - MQL5 programming forum
Messages Editor

- 2015.01.07
- www.mql5.com
Thx for your help everybody !!
Until now, I think the only way out is creating the indicator myself with adding extra parameters for the colors, type and thickness.
Keep on posting !
Thx
Hi Alain an dear all,
I am currently working on exchanging und mixing data from several indicators ( https://www.mql5.com/de/articles/19 does not function, since I have a 64-bit machine and Alex provides only a exchng.dll for 32 bit).
My solution so far is, to outsource all the indicator calculation in a header(class).
/+------------------------------------------------------------------+ //| ATR.mq5 | //| Copyright 2009, MetaQuotes Software Corp. | //| http://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "2023, Kurt Beiersdörfer" #property link "kbeiersdoerfer@hotmail.com" #property description "universal Indicator" // Includes: #include <..\Include\Indicators1\IndikatorBerechnung.mqh> //--- indicator settings #property indicator_separate_window #property indicator_buffers 2 #property indicator_plots 1 //--- input parameters Perioden: input int InpPeriod1=14; // 1. period_input //--- input parameters Farbe: input color InpColor1 = clrBlueViolet; //--- input parameters Visability: input bool InpVisible = true; //--- indicator buffers double D_Buffer1[]; // 1. Data-Buffer double C_Buffer1[]; // 1. Calculate-Buffer // Klasseninstanz: CalcInd CalcART; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ void OnInit() { CalcART.Init_ATR(D_Buffer1,C_Buffer1,InpPeriod1, InpColor1); } //+------------------------------------------------------------------+ //| Average True Range | //+------------------------------------------------------------------+ int OnCalculate(const int rates_total,const int prev_calculated,const datetime &Time[],const double &Open[],const double &High[], const double &Low[],const double &Close[],const long &TickVolume[],const long &Volume[],const int &Spread[]) { const int ret_val_ART = CalcART.Berechne_ATR(rates_total,prev_calculated,Time,Open,High, Low,Close,TickVolume,Volume,Spread,InpPeriod1,D_Buffer1,C_Buffer1); return ret_val_ART; }
It would be very supportive for making the code more general and flexible, if the property declaration:
//--- indicator settings #property indicator_separate_window #property indicator_buffers 2 #property indicator_plots 1
could be made within a function.
On the page https://www.mql5.com/en/docs/customind/propertiesandfunctions, we can see, that these property setting are the only ones, which can nor be set by a function.

- www.mql5.com
Hi Alain an dear all,
I am currently working on exchanging und mixing data from several indicators ( https://www.mql5.com/de/articles/19 does not function, since I have a 64-bit machine and Alex provides only a exchng.dll for 32 bit).
My solution so far is, to outsource all the indicator calculation in a header(class).
It would be very supportive for making the code more general and flexible, if the property declaration:
could be made within a function.
On the page https://www.mql5.com/en/docs/customind/propertiesandfunctions, we can see, that these property setting are the only ones, which can nor be set by a function.
For sure it would be nice.
But we have to deal with that as it is I am afraid.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I can't find in the "help" of MT5 how I can change some properties of an added indicator using the "ChartIndicatorAdd" function.
For instance: I've added a standard exponential moving average using the code:
Now I would like to change the color of the EMA-curve and the thinkness of the line.
Is there a way to do this ?
thx for your help !!
Danny