Session Ready
Exercise

Specifying orderside in add.rule()

The next critical argument to specify in your order is orderside, which can take two values: either long or short. In quantstrat, long and short side trades are siloed off separately so that quantstrat knows whether a trade is a long trade or a short trade. A long trade is one that profits by buying an asset in the hopes that the asset's price will rise. A short trade is one that sells an asset before owning it, hoping to buy it back later at a lower price.

For your strategy, you will want to take only long orders.

Instructions
100 XP
  • The add.rule() command from the previous exercise has been loaded into your workspace.
  • Define your order side as long by specifying the orderside argument.