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

[amibroker] Stops & Signals questions



PureBytes Links

Trading Reference Links

I'm a new Amibroker user, just moving over from Wealth-lab.  Spent
most of the evening trying to come up to speed on Amibroker and have a
couple of questions.

For a test case, I'm trying to make a basic system that buys when the
close > EMA(45) and sells after 5 days using ApplyStop().

Here is my code:

---------------------

Equity(1);

ApplyStop( stopTypeNBar, stopModeBars, 5 );
Buy = Cross(Close, EMA(Close, 45));
Sell = 0;

GraphXSpace = 10; /* create empty space of 10% top and bottom of chart */
	Plot(C, " Close Price", colorGrey50, styleCandle);

PlotShapes(shapeUpArrow * Buy, colorGreen, 0, L, - 10);
PlotShapes(shapeDownArrow * Sell, colorRed, 0, H, - 10);

Plot(EMA(Close, 45), "EMA", colorRed);

-------------------------------

What I'm having problems with is:

1.  How I generate sell arrows for sells caused by the Apply Stop?

2.  On my chart, how can I not show a green arrow for a buy signals
that occurs when a position is already active?

Thanks.










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

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