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
Dalam semangat sebenar TradingView, penulis telah menerbitkan kod Pine ini sebagai satu perpustakaan sumber terbuka supaya pengaturcara Pine lain dari komuniti kami boleh menggunakannya semula. Sorakan kepada penulis! Anda boleh menggunakan perpustakaan ini secara peribadi atau dalam penerbitan sumber terbuka lain, tetapi penggunaan semula kod dalam penerbitan ini adalah dikawal oleh Peraturan dalaman.
-=Gentleman Goat=- Download the TradingView Input Optimizer at tradingtools.software/optimizer
Discord: discord.gg/pGHHRczpbu
Juga pada:
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.