This library can be used to track (hypothetical) trades on the chart. Enter the Open, SL, and TP prices (or TP in R to have it calculated) and then call Trade.TrackTrade(barIndex). Keep track of your trades in an array and then simply call TradeTracker.UpdateAllTrades(close) to update all trades based on the current close price.
A Trade Tracking Library
Monitor conditions with less code by using Arrays. When your conditions are met in chronologically, a signal is returned and the scanning starts again.
Create trades automatically with Stop Loss, Take Profit and Entry. The trades will automatically track based on the market movement and update when the targets are...
The core logic for the two moving average strategy that is used as an example for the internal logic of
the "Template Trailing Strategy" and the "Two MA Signal Indicator"
ma(source, maType, length)
ma - Calculate the moving average of the given source for the given length and type of the average
source (float) : -...
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.
This creates a deep copy instead of a shallow copy of an entry_position. This does NOT deep copy the...
simple state machine that allows tracking a state an manipulating it with conditions
method step(this, before, after, condition)
will step the state of the state machine from one to the next in case of condition
Namespace types: StateMachine
this (StateMachine) : (StateMachine) the state machine to use
This library keeps your money in check, and is used for testing and later on webhook-applications too. It has four volatility functions and two of them can be used to calculate a Stop-Loss, like Average True Range. It also can calculate Position Size, and the Risk Reward Ratio. But those calculations don't take leverage into account.
A collection of custom tools & utility functions commonly used with my scripts
Calculates how many decimals are on the quote price of the current market
Returns: The current decimal places on the market quote price
Truncates (cuts) excess decimal places
The "Mizar_Library" is a powerful tool designed for Pine Script™ programmer’s, providing a collection of general functions that facilitate the usage of Mizar’s DCA (Dollar-Cost-Averaging) bot system.
To begin using the Mizar Library, you first need to import it into your indicator script. Insert the following line below your indicator initiation line: import...
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...
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.
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...
Kage's Miscelaneous library
Print a numerical value in a label at last historical bar.
_value : (float) The value to be printed.
barsBackToDate(_year, _month, _day)
Get the number of bars we have to go back to get data from a specific date.
_year : (int) Year...