LONGONMARKET is a function in ProBuilder language used to determine if there are any open long positions in the market. This function is particularly useful for traders who need to automate their trading strategies and ensure actions are only taken when no long positions are currently held.
LongOnMarket
IF NOT LongOnMarket THEN
BUY 1 LOT AT MARKET TomorrowOpen
ENDIF
This example demonstrates how to use the LongOnMarket function within a conditional statement. If there are no open long positions (as checked by NOT LongOnMarket), the script will execute a buy order of 1 lot at the market price at the opening of the next trading day.
Understanding the LongOnMarket function is essential for developing effective and safe automated trading strategies in ProBuilder language.