PureBytes Links
Trading Reference Links
|
I didn't try to see what was happening with your code, but here's a code fragment from the Clearwater School that will develop the
advancing issues and declining issues as well as new highs and new lows (note the original author used 60 bars or 6 weeks).
Apply it to a list of your sectors's stocks and run SCAN.
There's a section for your indicator window that will display new highs/new lows.
Best Regards
Joe Landry
// Breadth of NDX100
// Develops 4 composites that can be plotted or manipulated as you wish
//
// How to Run
// 1) Build a watchlist of NDX100 stocks
// 2) Select an issue with a long history in the current ticker window
// 3) Set APPLY TO to use filter NDX100
// 4) Set RANGE to one bar... 1 n last quotations
// 5) Press SCAN
// Voila!
Buy=Sell=0;
Filter=1;
//===================6 Weeks New Highs New Lows==========================================
AddToComposite(IIf(High > HHV(Ref(High, -1), 30), 1, 0), "~NDXNewHighs", "X");
AddToComposite(IIf(Low < LLV(Ref(Low, -1), 30), 1, 0), "~NDXNewLows", "X");
//===================Advance/Decline Issues
AddToComposite(IIf(Close - Ref(Close, -1) > 0, 1, 0), "~NDXAdv", "X" );
AddToComposite(IIf(Ref(Close, -1) - Close > 0, 1, 0), "~NDXDec", "X" );
>>>>>>>>>>>>>>>>>>>>> For Your indicator builder <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<,
NASADV=Foreign("~NDXAdv","X");
NASDECL = Foreign("~NDXDec","X");
DIFF = NASADV-NASDECL;
Plot(NASADV,"NAS(Grn)",8,2);
Plot(-NASDECL,"NAS(Red)",4,2);
Plot(MA(Diff,10),"10dayMA",1,4);
Plot(0,"",colorLightBlue,1);
Title = "NASDAQ Adv(Green) & Decl(Red),Net10day MA";
----- Original Message -----
From: dmcleod1981
To: amibroker@xxxxxxxxxxxxxxx
Sent: Saturday, September 11, 2004 3:36 PM
Subject: [amibroker] Advance Decline Line
I am trying to use the addtocomposite to create an Advance Decline
line for each sector.
I have the following code but this does not create a cumulative line
which is what I am trying to do.
//creates advance /decline by sector composite
up=C>Ref(C,-1);
dn=C<Ref(C,-1);
ADln=(up-dn);
Ad="~AD"+SectorID(1);
AddToComposite(ADln,AD,"C");
Buy=Sell=Short=Cover=0;
I tried using Cum(ADln); etc but I am not really sure how all of this
works together yet. Still a newbie grasping for a clue....
Thanks
DM
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Sponsor
ADVERTISEMENT
------------------------------------------------------------------------------
Yahoo! Groups Links
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
b.. To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|