No, that is not completely true. The shift parameter in Ref allows shifting
to the left and right until but not exceeding the last bar. The XShift
allows shifting past the last bar.  Also while a positive Refshift moves an
indicator to the left, a positive XShift moves an indicator to the right.

An example follows below.

 

Title = EncodeColor(4)+ _DEFAULT_NAME()+";  "+EncodeColor(1) +
StrFormat("{{NAME}} - {{INTERVAL}}; {{DATE}}; O=%g, H=%g, L=%g, C=%g
(%.1f%%) 

{{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) );      

//Difference between RefShift and XShift extending beyond last bar

 

ShiftUntilLastBarParam=Param("ShiftUntilLastBarParam",0,-10,10,1);
//refshift

ShiftUntilLastBarColor=IIf(ShiftUntilLastBarParam<0,colorBlue,colorRed);

ShiftPastLastBarParam=Param("ShiftPastLastBarParam",0,-10,10,1);   //past
last bar shift

ShiftPastLastBarColor=IIf(ShiftPastLastBarParam<0,colorBlue,colorRed);

Plot(C,"C",1,64);

Plot(Ref(MA (C,5),ShiftUntilLastBarParam), "MAC5:Shift Until",
ShiftUntilLastBarColor, styleLine);

Plot(MA(C,5), "MAC5:Shift Past", ShiftPastLastBarColor, styleLine,minvalue =
88,maxvalue = 91,ShiftPastLastBarParam);

 

 

 

From: [email protected] [mailto:[email protected]] On Behalf
Of Ara Kaloustian
Sent: Thursday, October 15, 2009 12:46 PM
To: [email protected]
Subject: Re: [amibroker] how to shift indicator?

 

  

you don't have a shift parameter.

 

Look in help files for Plot() function ... it has an optional shift
parameter

----- Original Message ----- 

From: Joris Schuller <mailto:[email protected]>  

To: [email protected] 

Sent: Thursday, October 15, 2009 10:42 AM

Subject: RE: [amibroker] how to shift indicator?

 

Try:  Plot (Ref (MA (C,5),3), "MA5", colorRed, styleLine); Shifts to the
left not the right

Use:  Plot (Ref (MA (C,5),-3), "MA5", colorRed, styleLine); (minus sign)

 

 

From: [email protected] [mailto:[email protected]] On Behalf
Of Kaushik Surti
Sent: Thursday, October 15, 2009 2:06 AM
To: [email protected]
Subject: Re: [amibroker] how to shift indicator?

 

  

HI ... PLEASE SEND ME SOME GOOD AFL COLLECTION ... I M DAILY USER OF
AMIBROKER...

 

 THANKS 

 KAUSHIK SURTI


 

 


  _____  


From: James <[email protected]>
To: [email protected]
Sent: Wed, October 14, 2009 11:30:47 PM
Subject: Re: [amibroker] how to shift indicator?

  

Try:  Plot (Ref (MA (C,5),3), "MA5", colorRed, styleLine);


 

 


  _____  


From: asitasu <asit...@hotmail. com>
To: amibro...@yahoogrou ps.com <http://ps.com/> 
Sent: Wed, October 14, 2009 7:53:46 AM
Subject: [amibroker] how to shift indicator?

  

dear all,

i want to plot 5 perid ma on price chart shifted to right by three bars.
how to put it on chart?

asit.

 

 

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.421 / Virus Database: 270.14.18/2437 - Release Date: 10/15/09
03:57:00



No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.421 / Virus Database: 270.14.18/2437 - Release Date: 10/15/09
03:57:00

Reply via email to