Im trying to get this entry to work, if the close of the spread is above the upper Standard Deviation, but its giving me an error on the entry condition.. I was trying to copy off the pairs trading strategy, but not having any luck...
CODE:
Please log in to see this code.
Size:
Color:
Seems like the "if (IsLastPositionActive) else..." block is flawed - missing "else".
Size:
Color:
That part came straight from pairs trading, the problems seems to lie in the fact that both of them are both data series and I'm using a '>' there... does that help? Error CS0019.
In the original paits trading it uses the following condition
CODE:
Please log in to see this code.
Size:
Color:
Oh, that. For sure it's incorrect.
See The Bars Object > OHLC/V Series > How to: Access a OHLC/V value in the WealthScript Guide.
Conceptually it's the same as in previous versions you're used to, just the syntax is a little bit new.
Size:
Color:
Thanks Eugene, compiled fine after applying the follwing adjustment
CODE:
Please log in to see this code.
Size:
Color: