See pic
Here is the code that I am calling from an external file that I include in my strategy
publicclass MFTradeClass : Strategy
{
publicbool MFIndicatorSwing (IDataSeries dataSeries, bool direction, int strength)
{
bool retval = false;
if (Swing(dataSeries, strength).SwingLowBar(1, 1, 4) != 0)
{
retval = true; // ok, we found a swing point
}
return (retval);
}
}
}
Then I call this from onbarupdate with:
// setup the new MFTradeClass and start using the methods and things in there.
MFTradeClass mytrade = new MFTradeClass();
// check for a CCI swinglow last bar
if (mytrade.MFIndicatorSwing (CCI(cCIPeriod), true, 1))
{
Print("Found a CCI SwingLow on bar: ");
}
What is going wrong?

Comment