Am trying to convert several Daily strategies to Intra-day so i can insert intra-day Stop Losses. Can't figure out this Run-time error I keep getting when i run these strategy against 60 minute bars -
index out-of-range, must be non-negative and within range - attached is exact wording of error message.
To simplify the code, i commented the for (bar) loop, but still run into this error, with these simple commands - SetScale(), RestoreScale(), Synchronize(); Same issue with 30minute bars as well - i tried with ETF, Stock and Future symbols.
Please advise how to fix this ..
CODE:
Please log in to see this code.
Size:
Color:
Check out the QuickRef and the WealthScript Programming for the syntax and examples of using Synchronize(). You're using it incorrectly, like one would do with a void whereas Synchronize() returns a DataSeries and the result of its processing should be assigned back to the original DataSeries.
Size:
Color: