This is a basic C# question i.e. a matter of adding an "if" to check for the symbol name for equality with a string. This FAQ may come helpful:
How do I start with C# ? As Cone already suggested, the QuickRef tool is handy when you study the basics. In particular, the
Bars object category where you shall find the desired
Bars.Symbol property.
And an example from the
opposite side i.e. when you want your script to trade some "green listed" stocks
only:
Multi companies backtesting, see reply #7
However, it can be used for your task if you remove the exclamation sign:
CODE:
Please log in to see this code.