-
You have to read here please on how to use code tags for inserting code to a post. It's mandatory.
-
Then (as for your code) you need to add Short and Cover variables into your formula file. There aren't any in your upper code.
e.g.
Short = Sell; Cover = Buy;
-
Then for backtest you need to make sure that short is enabled in analysis settings.
E.g. select "Long and short" at "Positions" drop down menu
1 Like