Just read the StatusCheck Module. I think there's a little bloop with no consequence for you but if use in another way it could be :
Code: Select all
bool StatusCheck(string symbol, int timeframe, int period, int period1, int mashift, int method, int applied, int type, int shift)
{
//Idea from Andy (MrLong). Many thanks again, Andy
//Check the moving averages are widening - the direction does not matter yet
if (type == OP_BUY)
{
if (iMA(symbol, timeframe, period, mashift, method, applied, shift) > iMA(symbol, timeframe, period1, mashift, method, applied, shift) &&
iMA(symbol, timeframe, period, mashift, method, applied, shift) > iMA(symbol, timeframe, period, mashift, method, applied, 1) &&
iMA(symbol, timeframe, period1, mashift, method, applied, shift) > iMA(symbol, timeframe, period1, mashift, method, applied, 1))
return(true);
else return(false);
}// (type == OP_BUY)
if (type == OP_SELL)
{
if (iMA(symbol, timeframe, period, mashift, method, applied, shift) < iMA(symbol, timeframe, period1, mashift, method, applied, shift) &&
iMA(symbol, timeframe, period, mashift, method, applied, shift) < iMA(symbol, timeframe, period, mashift, method, applied, 1) &&
iMA(symbol, timeframe, period1, mashift, method, applied, shift) < iMA(symbol, timeframe, period1, mashift, method, applied, 1))
return(true);
else return(false);
}//(type == OP_SELL)
}//StatusCheck(string symbol, int timeframe, int period, int period1, int mashift, int method, int applied, int type,