PINE LIBRARY
Telah dikemas kini Signal_transcoder_library

Library "Signal_transcoder_library"
This is my 2nd iteration for sending Signals via Plots. (first one was the 8bit Version)
Now a cleaner approach (thanks for the hints LonesomeTheBlue)
_16bit_encode()
Input a 16 bool Array
Outputs a Float for transmitting via Plot
_16bit_decode()
Input a Float from plot via input-mapping
Outputs a Array of 16 bools
Future Ideas:
Transmitting 2-4 Ints (-127 to 127) and Bools
This is my 2nd iteration for sending Signals via Plots. (first one was the 8bit Version)
Now a cleaner approach (thanks for the hints LonesomeTheBlue)
_16bit_encode()
Input a 16 bool Array
Outputs a Float for transmitting via Plot
_16bit_decode()
Input a Float from plot via input-mapping
Outputs a Array of 16 bools
Future Ideas:
Transmitting 2-4 Ints (-127 to 127) and Bools
Nota Keluaran
v2Added:
f_remap_bits()
here you can mix the channels
array in (16 bits) array remapped out (16 bits)
f_bool_operations()
standard bit operations like:
"and", "or", "not", "nand", "nor", "xor", "xnor",
classic timerblocks (candletimers)
"TP", "TPD", "TON", "TOF"
Nota Keluaran
v3 bugfixing the TOF/TON Function (no masking of false)Nota Keluaran
v4added MDP
Minimum Deviation Percentage
it will give you the option to filter out signals by only accepting new signals after a minimum move of the close price.
for dca strategys very usefull, as it limits a overinvesting by a triggerhappy indicator.
Nota Keluaran
v5Added bool funtion "rate"
it counts the bool-in compares it with needed trues in a given range
example: channelin 0 bars 20 trues 10 channelout 1
no other changes
Nota Keluaran
v6Added:
f_infuse_signal() overloaded function
it does infuse 1 to 8 signals into a 16 elements bool array (for each amount a overload)
with an additional check for the channel provided for -1 < channel <15
example:
f_infuse_signal(int channel1, bool mysignal1, int channel2, bool mysignal 2 , .... , int channel8, bool mysignal8, boolarray)
f_infuse_signal(int channel1, bool mysignal1, boolarray)
Nota Keluaran
bug huntingNota Keluaran
Upgrade to V6Nota Keluaran
v9generic encoder and decoder added and wrappers for legacy operation.
Added:
encode_bits(mux_array, bits)
Parameters:
mux_array (array<bool>)
bits (int)
decode_bits(mux, bits)
Parameters:
mux (float)
bits (int)
_32bit_encode(mux_array)
Parameters:
mux_array (array<bool>)
_32bit_decode(mux)
Parameters:
mux (float)
_50bit_encode(mux_array)
Parameters:
mux_array (array<bool>)
_50bit_decode(mux)
Parameters:
mux (float)
Perpustakaan Pine
In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in publications is governed by House Rules.
Penafian
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Perpustakaan Pine
In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in publications is governed by House Rules.
Penafian
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.