To make use of the Comply with Line Scanner indicator (ver.2.00 – free obtain on the finish of the article) for EA, you possibly can see the directions beneath:
a. The buffers within the indicator and their indexes:
0 – Purchase Sign (arrow)
1 – Promote Sign (arrow)
b. Required enter parameters:
– To make use of iCustom, you should fill in all of the parameters, as a result of the indicator makes use of a scanner, so the parameters must be entered appropriately to keep away from conflicts. Under are the required and necessary enter parameters, you possibly can change their default values as you want:
enter int iMaxBarsBack = 10000; enter int ATRperiod = 5; enter int BBperiod = 21; enter double BBdeviation = 1.00; enter bool UseATRfilter = true;
c. iCustom:
MT4 Model 2.00:
double getValueFollowLine(string fSymbol, ENUM_TIMEFRAMES Timeframe, int Index, int Shift ) { string indicatorCustomName = "MarketComply with Line MT4 with Scanner"; 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 Model 2.00:
double getValueFollowLine(string fSymbol, ENUM_TIMEFRAMES Timeframe, int Index, int Shift ) { string indicatorCustomName = "MarketComply with Line MT5 with Scanner"; int deal with = 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(deal with < 0) return(EMPTY_VALUE); else { double buf[]; if(CopyBuffer(deal with, Index, Shift, 1, buf) > 0) return(buf[0]); } return EMPTY_VALUE; }
d. Use getValueFollowLine operate for EA
You utilize the getValueFollowLine operate to get the worth wanted to make use of for the EA.
To substantiate that the buffer has a worth, you should evaluate it with EMPTY_VALUE.
Listed below are some examples to verify that the earlier bar buffers (shift = 1) have a worth:
0 – Purchase Sign (arrow)
bool buySignal = getValueFollowLine(_Symbol, PERIOD_CURRENT, 0, 1) != EMPTY_VALUE;
1 – Promote Sign (arrow)
bool sellSignal = getValueFollowLine(_Symbol, PERIOD_CURRENT, 1, 1) != EMPTY_VALUE;
Hopefully this text may help you extra simply automate alerts from the Comply with Line Scanner indicator into EA.
You’ll be able to free obtain the indicator at: