Trying to use the "future_symbol()" function to return a specific object in the futures chain. Usage like "future_symbol( 'VXN17')" works fine. However, as soon as "future_symbol( variable )" or "future_symbol( reference )" is used, the following error is returned:
Error InvalidFutureSymbolCall: 0077 symbol argument must be a string.
Okay, so that seems weird that you can't pass the symbol you want to return into future_symbol(). What's even weirder is if you use the IDE Debugger, everything works fine and you can pass in variables as much as you want.
In the attached Algorithm, line 11 works fine. Lines 12-15 throw the error. If you comment out lines 12-15 and use the Debugger to manually enter each one, they all work perfectly fine.
So it doesn't work when the Algo builds, but it works fine in the Debugger.....Can anyone explain what is going on or a possible workaround?