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

Volatility Band Long Only Reversal Trading System for Amibroker (AFL)

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

Here is a volatility based long only reversal trading system inspired from Sylvain Vervoort’s Volatilty Band. Created by Rajandran.

Read full description here…

Screenshots

Indicator / Formula

Copy & Paste Friendly
//Strategy Coded by Rajandran R - Author of Marketcalls
//Date : 12 - Oct - 2013

_SECTION_BEGIN("Volatility Band Long Only Reversal Trading System");
average = Param("Band average", 8, 1 );
Volperiod = Param("VolPeriod", 13, 1 );
devfactor = Param("Devfactor", 3.55, 0, 10, 0.01 );
Lowbandadjust = Param("Low band adj.", 0.9, 0, 5, 0.01 );

Typical = ( High + Low + Close )/3;

AdjTyp = IIf( Typical > Ref( Typical, -1 ),
              Typical - Ref( Low, -1 ),
              Ref( Typical, -1 ) - Low );

Deviation = Sum( AdjTyp , VolPeriod )/ VolPeriod * devfactor;

DevHigh = EMA( deviation, average );
DevLow = EMA( deviation, average ) * Lowbandadjust;

Medianaverage = EMA( Typical, average );

up = EMA( Medianaverage, average ) + DevHigh;
down = EMA( Medianaverage, average ) - DevLow;



Plot( C, "VolatilityBand Reversal System" + _PARAM_VALUES() + " Price", colorDefault, styleCandle );

Plot( EMA( Medianaverage, average ) + DevHigh, "Upper", colorViolet );
Plot( EMA( Medianaverage, average ) - DevLow, "Lower", colorViolet );
Plot( MA( Medianaverage, average ), "Median", colorBlue );

Buy = Ref(C,-2) < Ref(down,-2) AND Ref(C,-1)>Ref(down,-1) AND C>Ref(C,-1);
Sell = 0;
Sell = Ref(C,-2) > Ref(up,-2) AND Ref(C,-1)<Ref(up,-1) AND C<Ref(C,-1);

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("MACD Plotter ver 3");

/**********************************************************
 /MACD Cross
***********************************************************/ 



StartBar=SelectedValue(BarIndex());
FinishBar = EndValue( BarIndex() );
i = Startbar;




EWODAILY =  EMA(C,45) - EMA(C,90);

SIG =  EMA(EWODAILY,9);

GfxSelectFont("Tahoma", 11, 700 ); 

todayEWODAILY    = EWODAILY  ; 
onedaybackEWODAILY    =Ref(EWODAILY  ,-1);
twodaybackEWODAILY   =  Ref(EWODAILY  ,-2)  ;

if( (todayEWODAILY   [i] > onedaybackEWODAILY   [i])   AND (onedaybackEWODAILY   [i] <= twodaybackEWODAILY  [i]))
{
GfxSetTextColor(ColorRGB(186,236,94)); 
GfxTextOut("New Trend Up",400,1);
}
if( (todayEWODAILY   [i] < onedaybackEWODAILY  [i])   AND (onedaybackEWODAILY   [i] >= twodaybackEWODAILY  [i]) )
{
GfxSetTextColor(colorRed); 
GfxTextOut("New Trend Dn",400,1);
}

if((todayEWODAILY   [i] > onedaybackEWODAILY  [i])   AND (onedaybackEWODAILY   [i] >= twodaybackEWODAILY   [i])
)
{
GfxSetTextColor(ColorRGB(221,248,112)); 
GfxTextOut("Trend Up",400,1);
}

if( (todayEWODAILY   [i]< onedaybackEWODAILY  [i])   AND (onedaybackEWODAILY   [i] <= twodaybackEWODAILY   [i])
                       )
{
GfxSetTextColor(ColorRGB(248,113,113)); 
GfxTextOut("Trend Dn",400,1);
}



EWODAILY_ZEROCRUP = Cross(EWODAILY ,0);
EWODAILY_ZEROCRDN = Cross(0,EWODAILY );


if(EWODAILY_ZEROCRUP[I])
{
GfxSetTextColor(ColorRGB(221,248,112)); 
GfxTextOut("Zero Cross Up",550,1);
}


if(EWODAILY_ZEROCRDN[I])
{
GfxSetTextColor(ColorRGB(248,113,113)); 
GfxTextOut("Zero Cross Dn",550,1);
}

Plot(SIG ,"",colorBlack,styleLine);


mycolor=IIf(EWODAILY <0 ,ColorRGB(300,100,50),IIf(EWODAILY >0 ,ColorRGB(25,150,150),colorGreen));

Plot(EWODAILY , "EWODAILY ", mycolor, styleHistogram | styleThick| styleNoLabel, styleOwnScale);



 





/****************************************************
                   CHART TITLES
****************************************************/

 
/****************************************************
                   CHART TITLES
****************************************************/


GfxSetTextAlign( TA_left = 0);
GfxSelectFont("Tahoma", 11, 700 ); 
GfxSetTextColor(ColorRGB(209,191,255)); 
GfxTextOut("etasindia.com - EWO ",07, 0); 





GfxSetTextAlign( TA_LEFT = 0 );
GfxSelectFont("Tahoma", 11, 700 ); 
GfxSetTextColor(ColorRGB(255,180,61)); 
GfxTextOut(Name()+ "   " + Date(),07,20); 





 


Title =

"\n";
 
 
 
  

_SECTION_END();

1 comments

1. hmurti

It seems that the formula references FUTURE quotes.
If you backtest this system you may receive outstanding results
that CAN NOT be reproduced in real trading.

Leave Comment

Please login here to leave a comment.

Back