[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Buy arrows, but no sell arrows.



PureBytes Links

Trading Reference Links

This piece of code plots buy/sell arrows on days of extremely one-sided volume breadth.  "^NYSEBR" is a dummy ticker with breadth data.  "Cond2A" is a filter that excludes low-volume extreme days.

"Cond2A" filters out the low-volume days as it should on the "Buy" days, but it filters out ALL of the "Sell" days, with no sell arrows displayed.   Removing "AND Cond2A" from the "Sell" condition restores the sell arrows, but without filtering them.  Can anyone tell me why and how to fix it?  Based on my knowledge of AB it ought to work, but just isn't for a reason I can't figure out.

TIA,

Sebastian

 

//Shows all 90% up/down or double 80% up volume days.

SetBarsRequired( 100000, 100000 ); // require all past and all future bars

Cond1=Foreign("^NYSEBR","V")/(Foreign("^NYSEBR","V")+Foreign("^NYSEBR","I"));

Cond2=Foreign("^NYSEBR","I")/(Foreign("^NYSEBR","V")+Foreign("^NYSEBR","I"));

Cond2A=Foreign("GSPC","V",1)>EMA(Foreign("GSPC","V",1),50);

Buy=Cond1>.89 OR Cond1>.79 AND Ref(Cond1,-1)>.79 AND Cond2A;

Sell=Cond2>.89 AND Cond2A;

shape=Buy*shapeUpArrow+Sell*shapeDownArrow;

PlotShapes(shape,IIf(Buy,colorSeaGreen,colorRed),0,IIf(Buy,Low,High));

 

 

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___