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

RE: [amibroker] how to shift indicator?



PureBytes Links

Trading Reference Links



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: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Ara Kaloustian
Sent: Thursday, October 15, 2009 12:46 PM
To: amibroker@xxxxxxxxxxxxxxx
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 -----

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: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Kaushik Surti
Sent: Thursday, October 15, 2009 2:06 AM
To: amibroker@xxxxxxxxxxxxxxx
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 <jamesmemphis@xxxxxxxxx>
To: amibroker@xxxxxxxxxxxxxxx
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 <asitasu@xxxxxxxx com>
To: amibroker@xxxxxxxxx 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



__._,_.___


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





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___