multiple scales - indicators do not match

Questions about MultiCharts and user contributed studies.
RWDickinson
Posts: 43
Joined: 01 Dec 2008
Has thanked: 2 times
Been thanked: 2 times

multiple scales - indicators do not match

Postby RWDickinson » 23 Jan 2014

Background:
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");
The indicator running against the same series, data2 on the combined chart:

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");
The output from these two vary significantly from each other. Am I using the Data keywords incorrectly?

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: multiple scales - indicators do not match

Postby JoshM » 23 Jan 2014

Shouldn't this..

Code: Select all

chg = (Price - Price[Len]) Data2;
..be..

Code: Select all

chg = (Price Data(2) - Price[Len] Data(2));
?

(See the last example on this wiki page).

RWDickinson
Posts: 43
Joined: 01 Dec 2008
Has thanked: 2 times
Been thanked: 2 times

Re: multiple scales - indicators do not match

Postby RWDickinson » 31 Jan 2014

Thanks, JoshM, but I have now tried your suggestion and the two indicators still are nowhere close to matching. I have no idea how to proceed.

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: multiple scales - indicators do not match

Postby JoshM » 31 Jan 2014

Thanks, JoshM, but I have now tried your suggestion and the two indicators still are nowhere close to matching. I have no idea how to proceed.
Perhaps:

* Are both charts the same chart (chart type, bars back, periodicity, etc)?

* Are the MaxBarsBack for both indicators set to the same value?


Return to “MultiCharts”