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...
Size:
Color:
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.
Size:
Color:
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.
Size:
Color: