And I get error everywhere , when I compare close[0] and value of SMA() indicator.
What can be a problem?
The weird is that when I am using indicator - everything is fine.!
But when I try to export I get error in log file.
private bool current_trend_filter(AkSignalType signal_type)
{
bool result = true;
switch (signal_type) {
case AkSignalType.Buy:
if (Close[0] < SMA(SlowSMAPeriod)[0])
result = false;
break;
case AkSignalType.Sell:
if (Close[0] > SMA(SlowSMAPeriod)[0])
result = false;
break;
}
return result;
}

Comment