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

[amibroker] Difficulty with sell arrow shapes



PureBytes Links

Trading Reference Links

I've overlooked something in shapes for sell arrows in an indicator
test.  I'm using Amibroker 4.90.5.  I obtained more sell arrows than I
thought should display.  The trailing stops seem to be okay. 

For instance, I obtain sell arrows that are shaped as triangles when I
don't see that in the code nor do I see where I set that sell
criteria.  For the test, the ETF that I used for an example here is
symbol MZZ from October 2007 to now.  Here's my test code sample:

Buy =Close > 5 AND Close < 100 AND Close > 1.009*(EMA(Close,30)) AND
Close > Ref(Close,-1)
AND RelStrength( "^DJI" ) > 1.0 AND  Volume > 1.4*(EMA(V,30))  AND
RelStrength("^GSPC") > 20.0;

shape=Buy*shapeUpArrow;
PlotShapes( shape, IIf( Buy, colorGreen, colorRed), 0, IIf( Buy, C,C
), 0 );

//If no buy signal given, it won't give a sell signal
Sell=0;
//Trailing Stop at 7% Loss
ApplyStop(2,1,7,False,0);
Equity(1,0); // THIS EVALUATES STOPS
Plot(Sell==4,"HELPapplyStop sell",colorRed,4|styleOwnScale);//4 is for
trailing stops

//shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
shape = Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorGreen, colorRed), 0, IIf( Buy, C,
C-1), 0 );

I have no idea what I've overlooked. Maybe I over-complicated the
PlotShapes function. Would someone look at or try this and let me know
what to change?

Regards.







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
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/