
Create EA with Follow Line Scanner indicator (iCustom) (free download indicator)

0 – Buy Signal (arrow)1 – Sell Signal (arrow)2 – Line value (price)
- To use iCustom, you need to fill in all the parameters, because the indicator uses a scanner, so the parameters need to be entered appropriately to avoid conflicts. Below are the required and mandatory input parameters, you can change their default values as you like:
input int iMaxBarsBack = 10000;//Max Distance To Last Bar (0=All) input int ATRperiod = 5;//ATR Period input int BBperiod = 21;//Bollinger Bands Period input double BBdeviation = 1.00;//Bollinger Bands Deviation input bool UseATRfilter = true;//ATR Filter
c. iCustom:
MT4 Version 2.00:
double getValueFollowLine(string fSymbol, //Symbol (fill _Symbol to use symbol current) ENUM_TIMEFRAMES Timeframe, //Timeframe (fill PERIOD_CURRENT to use current timeframe) int Index, //index buffer (see section a) int Shift //Shift (usually = 1 to get the previous bar value) ) { string indicatorCustomName = "Market\\Follow Line MT4 with Scanner";//Path indicator return iCustom(fSymbol, Timeframe, indicatorCustomName, iMaxBarsBack, ATRperiod, BBperiod, BBdeviation, UseATRfilter, true, "", 1, 1, 233, clrNONE, 234, clrNONE, "", false, false, false, false, false, false, "", "", false, "", 0, 0, "", false, 0, 0, 0, false, 0, 0, 0, clrNONE, clrNONE, clrNONE, clrNONE, clrNONE, "", 0, 0, Index, Shift); }
MT5 Version 2.00:
double getValueFollowLine(string fSymbol, //Symbol (fill _Symbol to use symbol current) ENUM_TIMEFRAMES Timeframe, //Timeframe (fill PERIOD_CURRENT to use current timeframe) int Index, //index buffer (see section a) int Shift //Shift (usually = 1 to get the previous bar value) ) { string indicatorCustomName = "Market\\Follow Line MT5 with Scanner";//Path indicator int handle = iCustom(fSymbol, Timeframe, indicatorCustomName, iMaxBarsBack, ATRperiod, BBperiod, BBdeviation, UseATRfilter, true, "", 233, clrNONE, 234, clrNONE, "", false, false, false, false, false, false, "", "", false, "", 0, 0, "", false, 0, 0, 0, false, 0, 0, 0, clrNONE, clrNONE, clrNONE, clrNONE, clrNONE, "", 0, 0); if(handle < 0) return(EMPTY_VALUE); else { double buf[]; if(CopyBuffer(handle, Index, Shift, 1, buf) > 0) return(buf[0]); } return EMPTY_VALUE; }
d. Use getValueFollowLine function for EA
You use the getValueFollowLine function to get the value needed to use for the EA.
To confirm that the buffer has a value, you need to compare it with EMPTY_VALUE.
Here are some examples to confirm that the previous bar buffers (shift = 1) have a value:
0 – Buy Signal (arrow)
bool buySignal = getValueFollowLine(_Symbol, PERIOD_CURRENT, 0, 1) != EMPTY_VALUE;
1 – Sell Signal (arrow)
bool sellSignal = getValueFollowLine(_Symbol, PERIOD_CURRENT, 1, 1) != EMPTY_VALUE;
2 – Line value (price)
double priceLine = getValueFollowLine(_Symbol, PERIOD_CURRENT, 2, 1);
Hopefully this article can help you more easily automate signals from the Follow Line Scanner indicator into EA.
You can free download the indicator at:
MT5 version at: Follow Line MT5 with Scanner
MT4 version at: Follow Line MT4 with Scanner