PINE LIBRARY

OrderTicketBuilder

366
Library "OrderTicketBuilder"
Assembles broker order ticket payloads as JSON strings.

BuildTicket(licenseId, symbol, action, orderType, tradeType, size, price, tp, sl, risk, trailPrice, trailOffset)
  BuildTicket assembles a JSON order ticket string for downstream execution.
  Parameters:
    licenseId (string): License identifier
    symbol (string): Symbol to trade
    action (string): "MRKT" or "PENDING"
    orderType (string): "BUY" or "SELL"
    tradeType (string): "SPREAD" or "SINGLE"
    size (float): (Optional) Trade size
    price (float): (Optional) Price for pending orders
    tp (float): (Optional) Take profit
    sl (float): (Optional) Stop loss
    risk (float): (Optional) Percent risk if size unspecified
    trailPrice (float): (Optional) Trailing-stop trigger price
    trailOffset (float): (Optional) Trailing-stop offset
  Returns: JSON order ticket string

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.