PureBytes Links
Trading Reference Links
|
After posting my question on how to compare the relative strength or
weakness of two securites, it occurred to me that by charting two
securities in one graph as data1 and data2, one could apply a favorite
indicator to both securities and then compare them. To facilitate the
comparison, it would be nice to also measure the difference between the
indicators.
To chart the differences between indicators, one must rewrite the
indicator so it operates separately on data1 and data2 and then calculates
the difference between the two. But this isn't very difficult. Here is an
example which plots the Percent R's of data1 and data2, their difference
and its moving average.
{ RelPercentR -- compares Percent R of data1 and data2 }
{ June 4, 2001, Sanford Morton }
Inputs: PRlength(0), AVlength(0);
Variables: PR1(0), PR2(0), diff(0);
PR1 = PercentR(PRlength) of Data1;
PR2 = PercentR(PRlength) of Data2;
diff = PR1 - PR2;
Plot1(PR1, "PR1");
Plot2(PR2, "PR2");
Plot3(diff, "Diff");
Plot4( xaverage(diff, AVlength), "AvDiff" );
The difference is intended to measure the relative strength of two
correlated securities, by measuring the amount of pullbacks in each. When
the difference and its average is positive, data1 has tended to retrace
less than data2, or to move up faster than data2. Or so I imagine.
So far, I've tried it on ESM1 and $TICK on 5-minute bars, though it might
also be applied to a market leader and follower, or to a stock and
industry or sector index. I haven't tested it yet in any systematic way.
I presume this tactic could be applied to most other indicators as well.
Regards,
Sandy Morton
|