Symbol being executed
Author: djmundus
Creation Date: 9/23/2018 11:19 PM
profile picture

djmundus

#1
How can I match the name of the current symbol against a string? I have a strategy that uses .IXIC as an external series and I found that I was getting errors about Buy & Hold symbols if it wasn't in the same dataset as the stocks I was testing. So, I need a way to exclude it from backtesting...
profile picture

Eugene

#2
As you can see in the QuickRef, use Bars.Symbol for string comparison e.g.
CODE:
Please log in to see this code.

However, including the B&H symbol in the DataSet will affect the backtest performance.
profile picture

Cone

#3
Depends on where you put that code, but if the script is running on a per-symbol basis, do this test at the beginning of the Execute() method, and return (exit the procedure) if it's true..

CODE:
Please log in to see this code.
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).