Dear Coders, currently I am writing my EA and confused with calling custom indicators. I am going to take mrtools' TrendScalp indicator as an example.
The first question is, if the indicator has MTF, I want to call the indicator's higher timeframe value, for example calling 30 minutes value for trading 5 minutes candle, for which "Time Frame" I should enter PERIOD_M30? iCustom's int timeFrame or MTF indicator's TimeFrame or both?
Code: Select all
// 1
double value=iCustom(Symbol(),PERIOD_M30,"Trend - scalp 1.01(mtf + arrows + alerts).ex4",
PERIOD_CURRENT,/*the rest of custom indicator parameters*/,bufferNumber,shift);
// 2
double value=iCustom(Symbol(),Period(),"Trend - scalp 1.01(mtf + arrows + alerts).ex4",
PERIOD_M30,/*the rest of custom indicator parameters*/,bufferNumber,shift);
// 3
double value=iCustom(Symbol(),PERIOD_M30,"Trend - scalp 1.01(mtf + arrows + alerts).ex4",
PERIOD_M30,/*the rest of custom indicator parameters*/,bufferNumber,shift);
The second question is, can I just only enter the yellow box parameters (shown as attached image) and ignore the rest like alert, arrows etc, shown as following:
Code: Select all
double value=iCustom(Symbol(),Period(),"Trend - scalp 1.01(mtf + arrows + alerts).ex4", // Symbol, period, and Trend Scalp indicator name
TimeFrame,Trend rigger factor bars,Upper level,Lower level,T3 period,T3 volume factor,T3 type, // Yellow box Trend Scalp indicator inputs and let the rest as default
0,1); // Buffer number and shift
I used to test it by writing a custom indicator to call another custom indicator. It only works when I call the MT4 build-in indicators, but it doesn't work when I call the indicators that I downloaded from this forum or somewhere else. I am not a professional Coders, so if dear professional coders can address my confusion, I would appreciate it. Thank you!