Library "TradingToolsLibrary" Easily create advanced entries, exits, filters and qualifiers to simulate strategies. Supports DCA (Dollar Cost Averaging) Lines, Stop Losses, Take Profits (with trailing or without) & ATR.
method deepCopy(this) This creates a deep copy instead of a shallow copy of an entry_position. This does NOT deep copy the self_pyramiding_positions array reference, since only the master entry_position needs this to track the rest of its copies for efficiency reasons. This is to prevent a feedback loop. Namespace types: entry_position Parameters: this (entry_position) Returns: entry_position
method precision_fix(this, precision) Convert a floating point number to a precise floating point number with digit precision to avoid floating point errors in quantity calculations. Namespace types: series float, simple float, input float, const float Parameters: this (float) precision (int) Returns: float
xSellBuyMidInterpolation(_x, _high, _low, _sellRange, _buyRange) Creates an interpolation for a sell range and buy range but with an emphasis on reaching the _low the closer to the middle of the _sell and _buy range you go. Parameters: _x (float): is the value you want to use to control interpolation bewteen the _high and _low value. This will return the lowest percentage at the mid between high and low and highest percentage at the _high and _low. _high (float) _low (float) _sellRange (float) _buyRange (float) Returns: an interpolated float between the _high and _low supplied.
xSellBuyInterpolation(_x, _high, _low, _sellRange, _buyRange) Creates an interpolation a sell range and buy range Parameters: _x (float): is the value you want to use to control interpolation bewteen the _high and _low value. _high (float) _low (float) _sellRange (float) _buyRange (float) Returns: an interpolated float between the _high and _low supplied.
activate_entries_and_exits(_entries, _exits, _filters, _qualifiers, _equity) Determines activation for entries or exits. Does not place the actual orders. Parameters: _entries (entry_position[]) _exits (exit_position[]) _filters (filter[]) _qualifiers (qualifier[]) _equity (equity_management) Returns: void
create_entries_and_exits(_entries, _exits, _equity) Creates actual entry and exit orders if activated Parameters: _entries (entry_position[]) _exits (exit_position[]) _equity (equity_management) Returns: void
Siguiendo fielmente el espíritu TradingView, el autor ha publicado este código Pine como una biblioteca de código abierto, permitiendo que otros programadores de Pine en nuestra comunidad lo utilicen de nuevo. ¡Olé por el autor! Puede utilizar esta biblioteca de forma privada o en otras publicaciones de código abierto, pero tenga en cuenta que la reutilización de este código en una publicación se rige por las Normas internas.
-=Gentleman Goat=- Download the TradingView Input Optimizer at tradingtools.software/optimizer
Discord: discord.gg/pGHHRczpbu
También en:
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.