This library comprises valuable functions for implementing strategies on TradingView, articulated in a professional writing style. The initial version features a monthly Profit & Loss table with percentage variations, utilizing a modified version of the script by @QuantNomad. Library "strategy_utilities" monthly_table(results_prec, results_dark)...
Library "biased_price_target" Collection of functions that can be used for the calculation of biased price targets like stop loss and take profit from a reference price using several methods that are already provided by the "distance_ratio" library plus the 'HHLL'. Methods supported are percentagewise (PERC), atr-based (ATR), fixed profit (PROF), tick-based...
Library "SAT_BACKTEST" ex_timezone(tz) switch case return exact @timezone for timezone input Parameters: tz (simple string) Returns: syminfo.timezone or tz if_in_date_range(usefromDate, fromDate, usetoDate, toDate, src_timezone, dst_timezone) if_in_date_range : check if @time_close is range Parameters: usefromDate (simple bool)...
Library "OrderLib" TODO: add library description here removeOrderView(view) Parameters: view (orderView) createOrderView(model, length, profit_color, loss_color, enter_color) Parameters: model (orderModel) length (simple int) profit_color (simple color) loss_color (simple color) enter_color (simple color) ...
WOAH Order Scaling! This Provides a user with methods to create a list of profit targets and order sizes which grow or shrink. For size, the will add up to specific sum. for Targets they will include the first and last, and can lean towards either, to scale the order grid. And thanks to @Hoanghetti for the markdown, i've included a basic usage example within...
Library "libKageMisc" Kage's Miscelaneous library print(_value) Print a numerical value in a label at last historical bar. Parameters: _value : (float) The value to be printed. Returns: Nothing. barsBackToDate(_year, _month, _day) Get the number of bars we have to go back to get data from a specific date. Parameters: _year : (int) Year...
Library "libKageBot" Library of function to generate command strings for bots FrostyBot and Zignally. This version ONLY WORKS WITH FROSTYBOT. strSize(_sizePercent, _sizeCurrency) Converts a float to a formated string suitable to position size in percentage or currency. At leaste one parameter must be given Parameters: _sizePercent : (float) ...
Library "Position" Allows for simulating trades within an indicator. newTrade(size, price, timestamp) Creates a new trade object. Parameters: size : The size of the trade (number of shares or contracts). price : The price at which the trade took place. timestamp : The timestamp of the trade. Defaults to the current time. Returns: A new...
Library "HiveLibrary" : Custom library RoundDown(number, decimals) RoundDown() rounds the specified number down to the given number of decimal places. Parameters: number : is the argument for rounding down & decimals is the number of digits after dot decimals Returns: return is the rounded down value of the number
Hello everyone, Here is a perfectly replicated TradingView backtesting engine condensed into a single library function calculated with arrays. It includes TradingView's calculations for Net profit, Total Trades, Percent of Trades Profitable, Profit Factor, Max Drawdown (absolute and percent), and Average Trade (absolute and percent). Here's how TradingView...
Library "profitestimate" Simple profit Estimatr. Engages when Position != 0 and holds until posittion is na/0... if position changes sizes, it will update automatically and adjust. it has an input for comission to estmate exit fees update_avgprice(_sizewas, _delta, _pricewas, _newprice) Get a new Average position Price Parameters: _sizewas :...
Library "PlurexSignalStrategy" Provides functions that wrap the built in TradingView strategy functions so you can seemlessly integrate with Plurex Signal automation. NOTE: Be sure to: - set your strategy default_qty_value to the default entry percentage of your signal - set your strategy default_qty_type to strategy.percent_of_equity - set your strategy...
Library "strategy" Library containing few key calculations for strategy involving leveraged limit and stop orders getQty(entry, stop, riskPercentage) calculate qty and leverage based on entry and stop price for given risk percentage. Parameters: entry : Entry Price stop : Stop Price riskPercentage : risk percentage per trade Returns: -...
Library "TradingWolfLibary" getMA(int, string) Gets a Moving Average based on type Parameters: int : length The MA period string : maType The type of MA Returns: A moving average with the given parameters minStop(float, simple, float, string) Calculates and returns Minimum stop loss Parameters: float : entry price (Close if...
Library "Strategy_PnL_Library" TODO: This is a library that helps you learn current pnl of open position and use it to create your own dynamic take profit or stop loss rules based on current level of your profit. It should only be used with strategies. inTrade() inTrade: Checks if a position is currently open. Returns: bool: true for yes, false for no. ...
Library "AkselitoLibrary" TODO: add library description here fun(x) TODO: add function description here Parameters: x : TODO: add parameter x description here Returns: TODO: add what function returns hi()
Library "FrostyBot" JSON Alert Builder for FrostyBot.js Binance Futures and FTX orders github.com More Complete Version Soon. TODO: Comment Functions and annotations from command reference ^^ TODO: Add additional whitelist and symbol mappings. leverage() buy() sell() cancelall() closelong() closeshort() traillong() trailshort() ...
Library "PineHelper" This library provides various functions to reduce your time. recent_opentrade_entry_bar_index() get a recent opentrade entry bar_index Returns: (int) bar_index recent_closedtrade_entry_bar_index() get a recent closedtrade entry bar_index Returns: (int) bar_index recent_closedtrade_exit_bar_index() get a recent closedtrade...