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

[amibroker] Re: Vortex Indicator


  • Date: Sat, 02 Jan 2010 00:18:06 -0000
  • From: "Richard" <richpach2@xxxxxxxxx>
  • Subject: [amibroker] Re: Vortex Indicator

PureBytes Links

Trading Reference Links

Thanks soni67c, this makes things clearer.
I just noticed that we have hijacked another thread. We are posting inside "IB Backfill" thread. Perhaps we should stop or start another one if people want to continue discussing performance results of this system.

Regards
Richard

--- In amibroker@xxxxxxxxxxxxxxx, "soni67c" <soni67c@xxx> wrote:
>
> 
> 
> Hello Richard ,
> please check this.
> //===========================================================
> //The AB code is defined as: 
> // Vortex Indicator 
> // S&C Traders Tips Jan 2010 
> 
> //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:
> 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; 
> 
> Oscill = Param("oscil",1,0,1,1); 
> if( Oscill == 0 ) 
> { 
> Plot( VIP , "VIP", IIf(VIP>VIM,colorPaleGreen,colorPaleGreen), 4 ); 
> Plot( VIM , "VIM", IIf(VIP<VIM,colorRed,4), 4 ); 
> Buy=Cross(VIP,VIM ); 
> Sell = Cross(VIM,VIP ); 
> BuyPrice = ValueWhen(Buy,C);//Open;
> SellPrice = ValueWhen(Sell,C);//Open;
> PlotShapes( shapeUpArrow * Buy ,colorBlue);
> PlotShapes( shapeDownArrow * Sell ,colorRed); 
> Plot( Flip( Buy, Sell ), "Trade", colorPaleGreen, styleArea | styleOwnScale, 0, 1 );
> } 
> else 
> if( Oscill == 1 ) 
> { 
> diff=VIP-VIM; 
> vcol= IIf(diff > 0,30,32); 
> Plot( diff , "Diff" ,vcol , 6 );
> Buy = diff > 0 AND Ref(diff,-1) < 0;
> Sell = diff < 0 AND Ref(diff,-1) > 0;
> BuyPrice = ValueWhen(Buy,C);//Open;
> SellPrice = ValueWhen(Sell,C);//Open;
> PlotShapes( shapeUpArrow * Buy ,colorBlue,0,-0.1,0);
> PlotShapes( shapeDownArrow * Sell ,4,0,0.1,0);
> Plot(Flip(Buy, Sell), "Trade", colorPaleGreen,styleArea | styleOwnScale, 0, 1);  
> } 
> Title = EncodeColor(colorWhite)+ "Vortex Indicator-0110" + " - " +  Name() + " - " + EncodeColor(colorRed)+ Interval(2) + EncodeColor(colorWhite) + 
>  "  - " + Date() +" - "+"\n" +EncodeColor(colorYellow) +"Op-"+O+"  "+"Hi-"+H+"  "+"Lo-"+L+"  "+ 
> "Cl-"+C+"  "+ "Vol= "+ WriteVal(V);
> //====================================================================
> Thank you
> --- In amibroker@xxxxxxxxxxxxxxx, "Richard" <richpach2@> wrote:
> >
> > Hi "droskill",
> > 
> > I am a little confused by the rules as well. Sum(abs(....)..) will never go below 0 and you can see it if you plot VIP or VIM.
> > As the result, he rules do not generate any Buy or Sell signals.
> > Buy=Cross(VIP,1); seems to create some reasonable entries but this is not what the rules say.
> > 
> > Regards
> > Richard
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, "droskill" <droskill@> wrote:
> > >
> > > The AB code is defined as:
> > > // 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;
> > > 
> > > That should do it - I've not tested this but it should be close.
> > > 
> > > 
> > > 
> > > --- In amibroker@xxxxxxxxxxxxxxx, Bob Waits <bobwaits2@> wrote:
> > > >
> > > > I have the magazine and the formula, but it is only for the oscillator and not for a trading system, which Tradestation and Nuroshell have provided. I was wondering if anybody has used this as a system and tested the validity of this indicator.
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > ________________________________
> > > > From: droskill <droskill@>
> > > > To: amibroker@xxxxxxxxxxxxxxx
> > > > Sent: Wed, December 30, 2009 8:15:57 PM
> > > > Subject: [amibroker] Re: Vortex Indicator
> > > > 
> > > >   
> > > > Here:
> > > > 
> > > > http://www.traders. com/Documentatio n/FEEDbk_ docs/2010/ 01/TradersTips. html#TT4
> > > > 
> > > > --- In amibroker@xxxxxxxxx ps.com, Bob Waits <bobwaits2@ ..> wrote:
> > > > >
> > > > > In the latest S&C magazine, there is a nice article on Vortex Indicator. While the formula for the indicator is listed in the magazine, I was wondering if anyone has written a code for turning this into a system and testing the validity of this indicator. The Tradestation and Nuroshell has code for an entry, exit and shorting strategies.
> > > > > 
> > > > > Thanks.
> > > > >
> > > >
> > >
> >
>




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

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    amibroker-digest@xxxxxxxxxxxxxxx 
    amibroker-fullfeatured@xxxxxxxxxxxxxxx

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