jason5480

tts_convention

jason5480 已更新   
Library "tts_convention"
This library can convert the start, end, cancel start, cancel end deal conditions that are used in the
"Template Trailing Strategy" script into a signal value and vice versa. The "two channels mod div" convention is unsed
internaly and the signal value can be composed/decomposed into two channels that contain the afforementioned actions
for long and short positions separetely.

getDealConditions(signal)
  getDealConditions - Get the start, end, cancel start and cancel end deal conditions that are used in the "Template Trailing Strategy" script by decomposing the given signal
  Parameters:
    signal (int): - The signal value to decompose
  Returns: An object with the start, end, cancel start and cancel end deal conditions for long and short

getSignal(dealConditions)
  getSignal - Get the signal value from the composition of the start, end, cancel start and cancel end deal conditions that are used in the "Template Trailing Strategy" script
  Parameters:
    dealConditions (DealConditions): - The deal conditions object that containd the start, end, cancel start and cancel end deal conditions for long and short
  Returns: The composed signal value

DealConditions
  Fields:
    startLongDeal (series__bool)
    startShortDeal (series__bool)
    endLongDeal (series__bool)
    endShortDeal (series__bool)
    cnlStartLongDeal (series__bool)
    cnlStartShortDeal (series__bool)
    cnlEndLongDeal (series__bool)
    cnlEndShortDeal (series__bool)
發布通知:
v2
minor improvement use constants instead of literals
發布通知:
v3
Minor typo and documentation changes
發布通知:
v4
Added some documentation
發布通知:
v5
  • Some minor optimizations using `const` variables where it was possible
  • Update signal_datagram library

If you're interested in exploring and discovering other high quality free strategies come join us in Discord: discord.gg/2wkm9QqSuY
Pine腳本庫

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

免責聲明

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

想使用這個腳本庫嗎?

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