Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
Find Out More Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Swing Trading System for Amibroker (AFL)

3 / 5 (Votes 5)
trading system, amibroker, swing

Very simple formula but nice results.
Buy above High and Sell below Low
Green line is Trailing Stop loss line


Similar Indicators / Formulas

NMA Swing System v1.1
Submitted by kaiji about 8 years ago
Submitted by persee about 8 years ago
Señales de entrada y salida
Submitted by yayo88 over 4 years ago
NMA indicator with Button Trading
Submitted by rohan.joshi55 over 4 years ago
Cumulative Value
Submitted by mfoysalar about 8 years ago
LANDIS Modified
Submitted by isfandi about 7 years ago

Indicator / Formula

Copy & Paste Friendly
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 

_SECTION_BEGIN("Swing Trading System");

InitStop = 20; //11; 
TRStop = EMA(Close,30);// 84; 

Buy = Cross( EMA( Close, 10 ), EMA( Close, 20 )) AND EMA(Close,10) > EMA(Close,20) AND EMA(Close,20) AND EMA(Close,30)-1;
Sell = Cross( EMA( Close, 30 ), EMA( Close, 20 )) AND EMA(Close,30) > EMA(Close,20) AND EMA(Close,10) AND EMA(Close,20)-1;
Short = Sell; 

BuyPrice		= ValueWhen(Buy, High);
ShortPrice		= ValueWhen(Short, Low);
CoverPrice		= ValueWhen(Cover, Close);
SellPrice		= ValueWhen(Sell, Close);

dist = 1.5*ATR(10); 

for( i = 0; i < BarCount; i++ ) 
if( Buy[i] ) PlotText( "Buy: > " + H[ i ], i, L[ i ] - dist[i], colorBrightGreen); // alteration - C instead of H/L 
if( Sell[i] ) PlotText( "Sell: < " + L[ i ], i, H[ i ] + dist[i], colorOrange); 

PlotShapes(IIf(Sell==1, shapeDownArrow, shapeNone), colorRed, 0,High, Offset=-15);
PlotShapes(IIf(Buy==1, shapeUpArrow , shapeNone), colorGreen, 0,Low, Offset=-15);

Plot( EMA( Close,10),"MA10",colorRed,styleLine);
Plot( EMA( Close,20),"MA20",colorBlue,styleLine);
Plot( EMA( Close,30),"MA30",colorGreen,styleLine);

ApplyStop(stopTypeTrailing, stopModePoint, TRStop, 0, False, 0);
ApplyStop(stopTypeLoss, stopModePoint, InitStop, 0, False, 0);




//Settings for Backtesting to keep lot size fixed // Need help here
RoundLotSize = 125;
PositionSize = C*125*2;
//End of Backtesting Settings for Backtester


1. kmmasoud

yes it is simple but, it does alot, thanks dear for sharing

2. hoierman

I’m confused why would you BUY above High and Sell below Low ??


3. ptolmees

This formula looks really good but the question is what is meant under high and low?
I think buy/sell should be done after appearance of the relevant arrow..
Am I right? )

4. arun.victor

Check crossovers, red line is on top = market is bullish, Red line is on bottom = market is on bearish.

5. arun.victor

(I’m confused why would you BUY above High and Sell below Low ??)

For breakout

Leave Comment

Please login here to leave a comment.