Offset DataSeries?
Author: maninjapan
Creation Date: 3/1/2010 9:43 AM
profile picture

maninjapan

#1
Im trying to create a Hilo series for a spread and have the following, I would just like to offeset the whole series by 1 bar. If someone needs mroe code to help with this I can post more.

CODE:
Please log in to see this code.
profile picture

Eugene

#2
Please see the QuickRef entry for DataSeries and let me know if something is not clear.
profile picture

maninjapan

#3
thanks, tried that but getting a runtime error

Runtime Error: Object reference not set to an instance of an object.
at Wealthlab.Strategies.SpreadBreakOut.Execute()
at WealthLab.DataSeries.op_RightShift(DataSeries ds1,Int32 value)


CODE:
Please log in to see this code.


profile picture

Eugene

#4
In this case, knowing what your "ActualSpread" is about (external series), it might be due to a bug.

See my message with a workaround dated 12/22/2009 12:30 PM in a conversation with you:

Standard Deviation on Moving Average

When you will be implementing the workaround, keep in mind that shifting a series to the right means accessing its value at previous bar e.g.

CODE:
Please log in to see this code.
profile picture

maninjapan

#5
Thanks Eugene will give it a go. Im trying to create a Hi Lo Breakout, so accessing the previous value is what Im Looking to do.

Thanks!
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).