iCustom Issue

 

Hi folks,

i'm working on an EA based on an indicator using 7 different internal indicators each one named FL1,FL2, ...  so i use ICustom fxn 

The issue is that one indicator (FL2) using 8 different lines (as indicated in attachment) all of them have the same name and value and when i use ICustom it refers me to the first line in FL2 while i need to use The last (thick) line

can anyone help ?

  double FL2_Upper = iCustom(Symbol(),PERIOD_CURRENT,"FL2",1,1);
  double FL2_Lower = iCustom(Symbol(),PERIOD_CURRENT,"FL2",2,1);


 

 

It looks to me that you have multiple instances of the same indicator added to the chart, all with different settings.

So, you need to look at the settings for each of those instances and then make multiple iCustom calls with those settings.

 
  1. double FL2_Upper = iCustom(Symbol(),PERIOD_CURRENT,"FL2",1,1);
    This calls the indicator with default inputs. If you want to look at the others you must pass their inputs.
  2. You should write a self documenting function instead of calling iCustom directly, see Detailed explanation of iCustom - MQL4 forum
 

Thnx honest_knave & whroeder1.

Both of you are right

I modified the code and it worked :D

  double FL2_Upper = iCustom(Symbol(),PERIOD_CURRENT,"FL2","All tf",63,0,5,1,1);
  double FL2_Lower = iCustom(Symbol(),PERIOD_CURRENT,"FL2","All tf",63,0,5,2,1);
 
Comments that do not relate to this topic, have been moved to "Off Topic Posts".
 
I am looking for the sourcecode for FL2 . Please share with me... I am not a developer and have to hire someone to make alerts for price at the bands. Currently.  THANKS.
 
Remember indexes start at zero
  double FL2_Upper = iCustom(Symbol(),PERIOD_CURRENT,"FL2","All tf",63,0,5,1,1); // Does FL2 have three
  double FL2_Lower = iCustom(Symbol(),PERIOD_CURRENT,"FL2","All tf",63,0,5,2,1); // or more buffers?
 

Thank you. This is all the code required for the FL2? I am no writer.

Reason: