SELLSHORT

Category: ProBacktest

SELLSHORT is a command used in the ProBuilder programming language, primarily designed for algorithmic trading strategies. This instruction is utilized to initiate a short position in the market, which means selling a security that the trader does not currently own, with the expectation of buying it back later at a lower price.

Syntax:

SELLSHORT quantity SHARES AT MARKET

Example:

IF NOT ShortOnMarket AND ShortConditions THEN
    SELLSHORT 1 SHARES AT MARKET
ENDIF

This example demonstrates the use of the SELLSHORT command within a conditional statement. The condition checks if there is not already a short position in the market (ShortOnMarket) and if certain conditions for going short (ShortConditions) are met. If both conditions are true, the script executes the SELLSHORT command to open a short position by selling one share at the market price.

  • The quantity specifies the number of shares to short.
  • The phrase AT MARKET indicates that the short sale should be executed at the current market price.

This command is crucial for strategies that aim to profit from anticipated declines in stock prices. Understanding and using SELLSHORT effectively can enable traders to capitalize on market downturns.

Related Instructions:

  • BUY probacktest
  • EXITSHORT probacktest
  • SELL probacktest
  • Logo Logo
    Loading...