CC
double val0_0=iCustom(NULL, 0, "SampleInd",13,0,0); // Returns the current position of the first line (i.e. number zero) double val1_0=iCustom(NULL, 0, "SampleInd",13,1,0); // Returns the current position of the second line (confusingly is number 1) double val0_1=iCustom(NULL, 0, "SampleInd",13,0,1); // Returns the last closed bar position of the first line double val1_1=iCustom(NULL, 0, "SampleInd",13,1,1); // Returns the last closed bar position of the second line
Good Luck
-BB-
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Need some quick guidance. I am trying to reference a custom indicator in an EA. When the indicator is one line, it is very easy and straight forward. However, if the indicator has multiple lines, I am not sure how to reference those individual lines.
If the indicator named SampleInd has line1 and line 2, how do I get the EA to know which line I want it to reference?
double val=iCustom(NULL, 0, "SampleInd",13,1,0);
Thanks!