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

[amibroker] Help requested re. Plot and Shift



PureBytes Links

Trading Reference Links

I am trying to plot the close value of a prior period. Plotting the same
using the Ref function is easy. Using the shift feature available in the
plot statements to plot it is proving to be an unsolvable problem for me.


The value to be plotted is based on the value of n and is computed as
follows

Shift_Pds=int(n+1)/2;


PriorCls=ref(c,-1*Shift_pds); //this is vry simple if I settle for using the
Ref function

The tricky bit that I am not able to think through is - How do I shift the
value for today such that:

(i) If n < 100 then all the values subsequent to the value for today are
plotted on the right of the last bar, and

(ii) If N>100  then 50 values subsequent to the value for today  are plotted
on the right of the last bar.




TIA for any input on solving this problem.


Regards


R

Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.7/620 - Release Date: 1/8/2007 4:12 PM