I have two (#contracts) charts of the same data, one at coarse resolution, one at finer resolution.
I have indicators on the two charts that I have been trying to correlate "by eye" so I wanted to combine them on a single chart window so I could put the two indicators on the same scale. On the window of the finer chart data, I replicated the coarser chart as invisible data, data2.
The problem:
However, the indicator from the original coarse chart and the same indicator on data2 of the combined chart do not match. The new data2 does not have as much history as the original coarse data, but I expected the indicators to match pretty closely. No such luck.
To keep this post shorter I reduced the problem down to a short piece of code that illustrates the problem:
This is the indicator running against the original coarse data:
Code: Select all
Inputs: Price((H+L+C)/3), Len(20);
Variables: atr(0), chg(0), momen(0);
chg = Price - Price[Len];
atr = AvgTrueRange(Len);
momen = chg/atr;
Plot100(momen,"momen");
Code: Select all
Inputs: Price((H+L+C)/3), Len(20);
Variables: chg(0), atr(0), momen(0);
chg = (Price - Price[Len]) Data2;
atr = AvgTrueRange(Len) Data2;
momen = chg/atr;
Plot100(momen,"momen");