parameters in iCustom function

 

Hi all, I'm using the attached indicator in this way

iCustom(Symbol(),PERIOD_H4,"D",1,0) // for the upper band
iCustom(Symbol(),PERIOD_H4,"D",0,0) // for the middle band
iCustom(Symbol(),PERIOD_H4,"D",2,0) // for the lower band

The values I obtain are correct (with default parameters value), but I'm not sure this is the right way to proceed.

Is it better to write all the parameters in the iCustom function?

Thank you

<ex4 file deleted>

 
  1. No parameters are the same as just the default ones — no difference.
    You should encapsulate your iCustom calls to make your code self-documenting.
              Detailed explanation of iCustom - MQL4 programming forum

  2. iCustom(Symbol(),PERIOD_H4,"D",1,0)
    On MT4: Unless the current chart is that specific pair/ TF referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
              Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 #26 № 4
Reason: