TradersPostInc

WebhookMessageDev

Library "WebhookMessageDev"
The webhook message library provides several functions for building JSON payloads

method buildWebhookJson(msg)
  Builds the final JSON payload from a webhookMessage type.
  Namespace types: webhookMessage
  Parameters:
    msg (webhookMessage): (webhookMessage) A prepared webhookMessage.
  Returns: <string> A JSON Payload.

method buildTakeProfitJson(msg)
  Builds the takeProfit JSON message to be used in a webhook message.
  Namespace types: takeProfitMessage
  Parameters:
    msg (takeProfitMessage): (takeProfitMessage)
  Returns: <string> A JSON takeProfit payload.

method buildStopLossJson(msg)
  Builds the stopLoss JSON message to be used in a webhook message.
  Namespace types: stopLossMessage
  Parameters:
    msg (stopLossMessage): (stopLossMessage)
  Returns: <string> A JSON stopLoss payload.

webhookMessage
  Final webhook message.
  Fields:
    ticker (series string)
    action (series string)
    sentiment (series string)
    price (series float)
    quantity (series int)
    takeProfit (series string)
    stopLoss (series string)

takeProfitMessage
  Take profit message.
  Fields:
    limitPrice (series float)
    percent (series float)
    amount (series float)

stopLossMessage
  Stop loss message.
  Fields:
    type (series string)
    percent (series float)
    amount (series float)
    stopPrice (series float)
    limitPrice (series float)
    trailPrice (series float)
    trailPercent (series float)

Biblioteka Pine

Działając zgodnie z prawdziwym duchem TradingView, autor opublikował ten kod Pine jako bibliotekę o otwartym kodzie źródłowym, aby inni programiści Pine z naszej społeczności mogli go ponownie wykorzystać. Brawa dla niego! Możesz korzystać z tej biblioteki prywatnie lub w innych publikacjach typu open source, ale ponowne wykorzystanie tego kodu w publikacji podlega Regulaminowi.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.

Chcesz skorzystać z tej biblioteki?

Skopiuj poniższy wiersz i wklej go w swoim skrypcie.