07 October 2011

VORTEX

Vortex Indicator w/ Histogram for Amibroker (AFL)


// Vortex Indicator
// S&C Traders Tips Jan 2010
period = Param("Period", 14, 2 );

VMP = Sum( abs( H - Ref( L, -1 ) ), period );
VMM = Sum( abs( L - Ref( H, -1 ) ), period );
STR = Sum( ATR( 1 ), period );

VIP = VMP / STR;
VIM = VMM / STR;

//Plot( VIP, "VI"+period+"+", colorBlue);
//Plot( VIM, "VI"+period+"-", colorRed );


Hist = VIP - VIM;
HistPrev = Ref(Hist,-1);

Color = IIf(Hist>HistPrev,colorCustom9,
IIf(hist0,colorCustom11,
IIf(hist<0,colorCustom8,colorWhite)); Plot( Hist, "", color, styleHistogram+styleOwnScale+styleThick ); Vortex Indicator System for Amibroker (AFL) // Vortex Indicator // S&C Traders Tips Jan 2010 period = Param("Period" , 14, 2 ); VMP = Sum( abs( H - Ref( L, -1 ) ), period ); VMM = Sum( abs( L - Ref( H, -1 ) ), period ); STR = Sum( ATR( 1 ), period ); VIP = VMP / STR; VIM = VMM / STR; Plot( VIP, "VI"+period+ "+", colorBlue); Plot( VIM, "VI"+period+ "-", colorRed ); //The system is defined as: //- Go long when the VI (or Dmi) goes from less than zero to greater than //zero. //- Go short when the VI (or Dmi) goes from above zero to less than zero. // - All trades are placed "next day market on open." // That would translate to: SetTradeDelays( 1,1,1,1); // everything delayed 1 day Buy = VIP > 0 AND Ref(VIP,-1) < 0; BuyPrice = Open; Sell = VIP < 0 and Ref(VIP,-1) > 0;
SellPrice = Open;
Short = Sell;
Cover = Buy;



VORTEX OSCILI


_SECTION_BEGIN("Vortex Oscillator");

// Vortex Indicator
// S&C Traders Tips Jan 2010
SetChartBkColor(colorBlack);
SetBarsRequired(sbrAll);
period = Param("Period", 21, 2 );
VMP = Sum( abs( H - Ref( L, -1 ) ), period );
VMM = Sum( abs( L - Ref( H, -1 ) ), period );
STR = Sum( ATR( 10 ), period );

VIP = VMP / STR;
VIM = VMM / STR;
K1=VIP-VIM;
K=TEMA(K1,7);
ifish=EMA(EMA(EMA(EMA(K,3),3),3),3);
Color=IIf(ifish>0,IIf(ifish>Ref(ifish,-1),colorGreen,colorYellow),IIf(ifish>Ref(ifish,-1),colorBlue,colorRed));
Plot(ifish," Vortex Oscillator ",Color,styleHistogram | styleThick, maskHistogram);
Plot(0,"",colorYellow,styleDashed);


_SECTION_END();

No comments:

My Blog List

Total Pageviews

Search This Blog

Followers