How to include Short and Cover into my trading formula

  1. You have to read here please on how to use code tags for inserting code to a post. It's mandatory.

  2. 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;
    
  3. 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
    19

1 Like