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
De acordo com o verdadeiro espírito do TradingView, o autor publicou esse código Pine como uma biblioteca de código aberto para que outros programadores Pine de nossa comunidade possam reutilizá-lo. Parabéns ao autor! Você pode usar essa biblioteca de forma privada ou em outras publicações de código aberto, mas a reutilização desse código em uma publicação é regida pelas Regras da Casa.
-=Gentleman Goat=- Download the TradingView Input Optimizer at tradingtools.software/optimizer
Discord: discord.gg/pGHHRczpbu
Também em:
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.