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 ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

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

SDA2 Trend Trading System Verion 2.0 AFL code for Amibroker (AFL)

Rating:
2 / 5 (Votes 5)
Tags:
trading system, amibroker

SDA2 Trend Trading System is introduced in marketcalls.

http://www.marketcalls.in/amibroker/sda2-trend-trading-ver2-backtesting-results-for-nifty-future.html

http://www.marketcalls.in/amibroker/sda2-trend-trading-system-verion-2-0-afl-code.html

Similar Indicators / Formulas

All in One
Submitted by Nahid almost 14 years ago
Kase Peak Osc. V2 batu
Submitted by batu1453 over 10 years ago
Kase CD V2batu
Submitted by batu1453 over 10 years ago
Ichimoku
Submitted by prashantrdx over 10 years ago
Arvind' System
Submitted by akdabc over 14 years ago
Miftha remix for dse
Submitted by coolpace over 14 years ago

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("SDA2 Channel Trading System ver 2.0");

/* Coded By : R R
   WebSite: www.marketcalls.in 

Earlier during October 26th, 2010 SDA2 Trend Trading System  is introduced in marketcalls.
After revising my old strategy( which contains too many flaws in the system) releasing the 
newer Version of SDA2 Trend trading system(Version 2.0).This Version is more optimized for 
Long Only Signals (Short Signals are treated as exit from the long position AND stay away 
from the market). In the older Version the SDA2 trading system wont perform good if there 
is any gap up OR gap down in the trading instrument. The new Version overcomes those flaw 
AND it is more optimized towards those Gap Up/Gap Down.  */


SetChartOptions(0,chartShowArrows|chartShowDates);
trailing=0;
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
SetTradeDelays( 1, 1, 1, 1 );
BuyPrice = Open;
SellPrice = Open;

Derived=WMA(WMA(WMA(((H+L)/2)+(O-C),2),2),2); 
i=WMA(Derived,3); 
Upper=(Derived+StDev(Derived,7))+ATR(2)/1.5; 
Lower=(Derived-StDev(Derived,7))-ATR(2)/1; 

color=IIf(BarsSince(Cross(Lower,Low))> 
BarsSince(Cross(C,Upper)), colorBrightGreen,colorRed); 
Plot(C,"",color,64); 
Plot(Upper,"upper band",colorGreen); 
Plot(Lower,"lower band",colorDarkRed); 

/* Buy or Sell Condition */
Buy = Cross(Close,Upper);
Sell = Cross(Lower,Low);
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
Cover=Buy;
Short=Sell;


Filter = Buy OR Sell;
/* Exploration Parameters */
AddTextColumn( FullName(), "Company Name" );
AddColumn( Buy, "Buy", 1 );
AddColumn( Sell, "Sell", 1 );
AddColumn( C, "Close", 1.3 );
AddColumn( H, "High", 1.3 );
AddColumn( Lower, "Lower Band", 1.3 );
AddColumn( Upper, "Upper Band", 1.3 );

PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-40);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-50);                      
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-45); 
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorRed, 0, H, Offset=40);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorOrange, 0,H, Offset=50);                      
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-45);


_SECTION_END();

/*_SECTION_BEGIN("WaterMark");
GfxSetOverlayMode(1);
GfxSelectFont("Tahoma", Status("pxheight")/12 );
GfxSetTextAlign( 6 );// center alignment
GfxSetTextColor( ColorHSB( 42, 42, 42 ) );
GfxSetBkMode(0); // transparent
GfxTextOut( "Budget 2012", Status("pxwidth")/4, Status("pxheight")/4 ); //you can change your own display name
GfxSelectFont("Tahoma", Status("pxheight")/12 );
GfxTextOut( " www.marketcalls.in", Status("pxwidth")/4, Status("pxheight")/4+90 ); //you can change your own display name
_SECTION_END(); */

1 comments

1. drmasudbin

Boss u r great

Leave Comment

Please login here to leave a comment.

Back