I'm testing a strategy but facing a tricky issue, the strategy is based on renko bars crossover, it's more scalping strategy. I want to apply to it a long trend filter using Gaussian filter or DEMA (doesn't matter the indicator as it have the same weird behaviour) the issue is that filter rendering is completely different than the one taken alone (gaussian filter hidden in te picture)
In the script besides main data serie (renko), I add 60 minutes data serie, i use this second data serie as input to the filtering MA
AddDataSeries(Data.BarsPeriodType.Minute, 60);
...
// USE BarsArray[1] to get the secondary dataseries
AuDema1 = AuDEMA(BarsArray[1], 100);
AuDema1.Plots[0].Brush = Brushes.DeepSkyBlue;
AuDema1.Plots[1].Brush = Brushes.Transparent;
AddChartIndicator(AuDema1);
and than using the trend data to filter...
if (BarsInProgress == 1)
{
if (AuDema1.Trend[0] ==1)
currentTrend = true;
else
currentTrend = false;
}
the issue as you can see, even if I use equidistant time axies and even with different types (replace renko by 15 min candlesticks) the indicator caluted value seems always wrong except if the main datasherie match the secondary dataserie which make the second one useless
What could be the reason for this mismatch
Thanks for your help
Comment