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
W prawdziwym duchu TradingView autor opublikował ten kod Pine jako bibliotekę typu open source, aby inni programiści Pine z naszej społeczności mogli go ponownie wykorzystać. Pozdrowienia dla autora! Możesz używać tej biblioteki prywatnie lub w innych publikacjach typu open source, ale ponowne użycie tego kodu w publikacji podlega Zasadom Regulaminu.
-=Gentleman Goat=- Download the TradingView Input Optimizer at tradingtools.software/optimizer
Discord: discord.gg/pGHHRczpbu
Również na:
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.