logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
MS Support  
#1 Posted : Monday, February 17, 2025 11:12:09 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,971

Thanks: 94 times
Was thanked: 156 time(s) in 151 post(s)

Neil Jon Harrington’s article, “Revisualizing the ADX oscillator”, introduced a re-imagining of the ADX indicator. Here is the formula to add that indicator to MetaStock. 

Please note that the suggested colors are in comments and will not change the display.  MetaStock 19 will prompt you for the input values when you plot the indicator in your chart.  Click the Color/Style tab to set the color and tell MetaStock to display the indicator lines as histograms.  If you click the Defaults button at the bottom of that tab, you can save your settings as the default, so you do not have to adjust the line style or colors when you add the indicator to other charts.

Dynamic ADX Histogram:

Code:
{aka. Harrington ADX Oscillator}
pds:= Input("ADX length", 2, 50, 10);
loth:= Input("Low Threshold", 5, 30, 15);
hith:= Input("High Threshold", 30, 60, 40);
spds:= Input("Smooth Length", 1, 5, 1);

base:= ADX(pds); smpdi:= Mov(PDI(pds), spds, s); smmdi:= Mov(MDI(pds), spds, s); netdmi:= smpdi - smmdi;

{OB up - Cyan} if(netdmi > 0 AND base >= hith and base > Ref(base, -1), base, 0); {OB weak up - Dark Cyan} if(netdmi > 0 AND base >= hith and base <= Ref(base, -1), base, 0); {up - Green} if(netdmi > 0 AND base >= loth AND base < hith AND base > Ref(base, -1), base, 0); {weak up - Dark Green} if(netdmi > 0 AND base >= loth AND base < hith AND base <= Ref(base, -1), base, 0); {neutral up - Dark Gray} if(netdmi > 0 AND base < loth, base, 0); {neutral down - Black} if(netdmi <= 0 AND base < loth, -base, 0); {weak down - Dark Red} if(netdmi <= 0 AND base >= loth AND base < hith AND base <= Ref(base, -1), -base, 0); {down - Red} if(netdmi <= 0 AND base >= loth AND base < hith AND base > Ref(base, -1), -base, 0); {OS weak down - Dark Magenta} if(netdmi <= 0 AND base >= hith and base <= Ref(base, -1), -base, 0); {OS down - Magenta} if(netdmi <= 0 AND base >= hith and base > Ref(base, -1), -base, 0);

William Golson

MetaStock Technical Support

Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.