ShortTriggered

Category: ProBacktest

The ShortTriggered function in ProBuilder language is designed to determine if a short position has been opened on a specific candlestick. This function is particularly useful for identifying whether an order has been executed and if its associated stop loss or take profit was triggered within the same candlestick. This is especially relevant in scenarios involving pending orders, also known as Working Orders (WO).

Syntax:

ShortTriggered[N]

Here, N is an optional parameter that specifies the candlestick index relative to the current candlestick. If N is not provided, it defaults to 0, which refers to the current candlestick.

Example Usage:

if ShortTriggered[1] then
    // Actions to take if a short position was opened on the previous candlestick
endif

In this example, the ShortTriggered[1] function checks if a short position was opened on the previous candlestick (one candlestick back from the current one). If true, the code inside the if statement will be executed.

Additional Information:

  • The ShortTriggered function is essential for traders using automated strategies who need to verify the execution and outcome of short orders within their trading algorithms.
  • Understanding the timing of trade execution and its impact within the same candlestick can help in refining strategy parameters and risk management tactics.

This function does not provide any trading or financial advice but is a tool for programming specific trading strategy behaviors in the ProBuilder language.

Related Instructions:

  • LongTriggered probacktest
  • Logo Logo
    Loading...