Hi,
I need help to review and correct the code below. I'm using the TMA-StochEA to call MTF Stochastics custom indicator to use the NextHigher timeframe for entry.
Example below, my current tf is H1, but want to use H4 tf Stoch crossover for entry.
int start()
{
//if(PositionOpen()) return(0);
crossedup = false;
crosseddown = false;
for(int i = 0;i < 3;i++)
{
kline[i] = iCustom(Symbol(),PERIOD_H4,"#MTF-Stochastic-v2.1",NextHigherAuto,KPeriod,DPeriod,Slowing,MAMethod,PriceField,PRICE_CLOSE,i);
dline[i] = iCustom(Symbol(),PERIOD_H4,"#MTF-Stochastic-v2.1",NextHigherAuto,KPeriod,DPeriod,Slowing,MAMethod,PriceField,PRICE_CLOSE,i+1);
}
if ((kline[i] > dline[i])&& (kline[2] < dline[2]))
{
crossedup = true;
}
if ((kline[i] < dline[i]) && (kline[2] > dline[2]))
{
crosseddown = true;
}
return(0);
}
I need help to review and correct the code below. I'm using the TMA-StochEA to call MTF Stochastics custom indicator to use the NextHigher timeframe for entry.
Example below, my current tf is H1, but want to use H4 tf Stoch crossover for entry.
int start()
{
//if(PositionOpen()) return(0);
crossedup = false;
crosseddown = false;
for(int i = 0;i < 3;i++)
{
kline[i] = iCustom(Symbol(),PERIOD_H4,"#MTF-Stochastic-v2.1",NextHigherAuto,KPeriod,DPeriod,Slowing,MAMethod,PriceField,PRICE_CLOSE,i);
dline[i] = iCustom(Symbol(),PERIOD_H4,"#MTF-Stochastic-v2.1",NextHigherAuto,KPeriod,DPeriod,Slowing,MAMethod,PriceField,PRICE_CLOSE,i+1);
}
if ((kline[i] > dline[i])&& (kline[2] < dline[2]))
{
crossedup = true;
}
if ((kline[i] < dline[i]) && (kline[2] > dline[2]))
{
crosseddown = true;
}
return(0);
}
Attached File(s)
TMA_Stoch EA.mq4
36 KB
|
207 downloads
#MTF-Stochastic-v2.1.mq4
9 KB
|
218 downloads