plurex

PlurexSignal

plurex 已更新   
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.
發布通知:
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

Pine腳本庫

本著真正的TradingView精神,作者將此Pine代碼以開源腳本庫發布,以便我們社群的其他Pine程式設計師可以重用它。向作者致敬!您可以私下或在其他開源出版物中使用此庫,但在出版物中重用此代碼受網站規則約束。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想使用這個腳本庫嗎?

複製以下行並將其黏貼到您的腳本中。