plurex

PlurexSignal

plurex Atualizado   
Library "PlurexSignal"
Provides functions that wrap the built in TradingView strategy functions so you can seemlessly integrate with Plurex Signal automation.
NOTE: Be sure to set your strategy close_entries_rule="ANY" and pyramiding=20 or some other amount appropriate to your strategy in order to have multiple entries.

plurexMarket()
  Build a Plurex market string from a base and quote asset symbol.
  Returns: A market string that can be used in Plurex Signal messages.

tickerToPlurexMarket()
  Builds Plurex market string from the syminfo
  Returns: A market string that can be used in Plurex Signal messages.

simpleMessage(secret, action, marketOverride)
  Builds Plurex Signal Message json to be sent to a Signal webhook
  Parameters:
    secret: The secret for your Signal on plurex
    action: The action of the message. One of .
    marketOverride: Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
  Returns: A json string message that can be used in alerts to send messages to Plurex.

long(secret, marketOverride, qty)
  Open a new long entry. Wraps strategy function and sends plurex message as an alert.
  Parameters:
    secret: The secret for your Signal on plurex
    marketOverride: Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
    qty: Corresponds to strategy.entry qty

short(secret, marketOverride, qty)
  Open a new short entry. Wraps strategy function and sends plurex message as an alert.
  Parameters:
    secret: The secret for your Signal on plurex
    marketOverride: Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
    qty: Corresponds to strategy.entry qty

closeAll(secret, marketOverride)
  Close all positions. Wraps strategy function and sends plurex message as an alert.
  Parameters:
    secret: The secret for your Signal on plurex
    marketOverride: Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.

closeLongs(secret, marketOverride)
  Close all longs. Wraps strategy function and sends plurex message as an alert.
  Parameters:
    secret: The secret for your Signal on plurex
    marketOverride: Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.

closeShorts(secret, marketOverride)
  Close all shorts. Wraps strategy function and sends plurex message as an alert.
  Parameters:
    secret: The secret for your Signal on plurex
    marketOverride: Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.

closeLastLong(secret, marketOverride)
  Close last long entry. Wraps strategy function and sends plurex message as an alert.
  Parameters:
    secret: The secret for your Signal on plurex
    marketOverride: Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.

closeFirstLong(secret, marketOverride)
  Close first long entry. Wraps strategy function and sends plurex message as an alert.
  Parameters:
    secret: The secret for your Signal on plurex
    marketOverride: Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.

closeLastShort(secret, marketOverride)
  Close last short entry. Wraps strategy function and sends plurex message as an alert.
  Parameters:
    secret: The secret for your Signal on plurex
    marketOverride: Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.

closeFirstShort(secret, marketOverride)
  Close first short entry. Wraps strategy function and sends plurex message as an alert.
  Parameters:
    secret: The secret for your Signal on plurex
    marketOverride: Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
Notas de Lançamento:
v2

Added:
longAndSetStopLoss(secret, stop, marketOverride, qty)
  Open a new long entry. Wraps strategy function and sends plurex message as an alert. Also sets a gobal stop loss for full open position
  Parameters:
    secret: The secret for your Signal on plurex
    stop: The trigger price for the stop loss. See strategy.exit documentation
    marketOverride: Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
    qty: Corresponds to strategy.entry qty

longAndSetTrailingStopLoss(secret, trail_offset, trail_price, trail_points, marketOverride, qty)
  Open a new long entry. Wraps strategy function and sends plurex message as an alert. Also sets a gobal trailing stop loss for full open position. You must set one of trail_price or trail_points.
  Parameters:
    secret: The secret for your Signal on plurex
    trail_offset: See strategy.exit documentation
    trail_price: See strategy.exit documentation
    trail_points: See strategy.exit documentation
    marketOverride: Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
    qty: Corresponds to strategy.entry qty

shortAndSetStopLoss(secret, stop, marketOverride, qty)
  Open a new short entry. Wraps strategy function and sends plurex message as an alert. Also sets a gobal stop loss for full open position
  Parameters:
    secret: The secret for your Signal on plurex
    stop: The trigger price for the stop loss. See strategy.exit documentation
    marketOverride: Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
    qty: Corresponds to strategy.entry qty

shortAndSetTrailingStopLoss(secret, trail_offset, trail_price, trail_points, marketOverride, qty)
  Open a new short entry. Wraps strategy function and sends plurex message as an alert. Also sets a gobal trailing stop loss for full open position. You must set one of trail_price or trail_points.
  Parameters:
    secret: The secret for your Signal on plurex
    trail_offset: See strategy.exit documentation
    trail_price: See strategy.exit documentation.
    trail_points: See strategy.exit documentation
    marketOverride: Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
    qty: Corresponds to strategy.entry qty

Biblioteca do Pine

No verdadeiro espírito TradingView, o autor publicou este código de Pine como uma biblioteca de código aberto para que outros programadores de Pine de nossa comunidade possam reutilizá-lo. Um brinde ao autor! Você pode usar esta biblioteca em particular ou em outras publicações de código aberto, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.

Gostaria de usar essa biblioteca?

Copie a seguinte linha e cole-a em seu script.