What the difference between Bars.Low[bar-1] and Low[bar-1]
Author: leeto
Creation Date: 6/4/2015 12:26 PM
profile picture

leeto

#1
Could you explain What the difference between Bars.Low[bar-1] and Low[bar-1] ?

Many thx in advance !
profile picture

Panache

#2
I don't think there is any. The only time it would matter is if you had an external symbol (Symbol), in which case you would use Symbol.Low[bar-1] to designate the low for the external symbol as opposed to the symbol the strategy was operating on.
profile picture

leeto

#3
Many thx for reply !
Could you tell me how can I introduce external symbol. For example the code below doesn't compile
and gives me error : "the name SPY does not exist in the current context "

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

Cone

#4
See GetExternalSymbol() in the QuickRef (F11), which actually contains an example using SPY!
profile picture

Eugene

#5
And before asking basic questions like this, let me strongly recommend that you review the WealthScript Programming Guide: DataSeries > Accessing Secondary Symbols.
profile picture

leeto

#6
Thx for reply and for the reference. Sorry for newbie question.
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).