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)
minor improvement use constants instead of literals
Minor typo and documentation changes
Added some documentation
- Some minor optimizations using `const` variables where it was possible
- Update signal_datagram library
- Added version check functionality on handshake
- Added examples at the end of the script on how to produce and consume a signal
- Use enums
- Update `signal_datagram` libarary
- Update to pinescript version 6
- Changed offset of signals and shapes in the example
Biblioteca Pine
Fiel al espíritu de TradingView, el autor ha publicado este código de Pine como biblioteca de código abierto, para que otros programadores Pine de nuestra comunidad puedan reutilizarlo. ¡Enhorabuena al autor! Puede usar esta biblioteca de forma privada o en otras publicaciones de código abierto, pero la reutilización de este código en publicaciones está sujeta a nuestras Normas internas.
Telegram: @jason5480
🔗 Addresses
₿ - bc1qxh3jeld7ke70fx3r5q243d96jsx0etth6x8fa7
* Please contact me before any donation ☕
Exención de responsabilidad
Biblioteca Pine
Fiel al espíritu de TradingView, el autor ha publicado este código de Pine como biblioteca de código abierto, para que otros programadores Pine de nuestra comunidad puedan reutilizarlo. ¡Enhorabuena al autor! Puede usar esta biblioteca de forma privada o en otras publicaciones de código abierto, pero la reutilización de este código en publicaciones está sujeta a nuestras Normas internas.
Telegram: @jason5480
🔗 Addresses
₿ - bc1qxh3jeld7ke70fx3r5q243d96jsx0etth6x8fa7
* Please contact me before any donation ☕