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
