Rolling Sortino Ratio with Ref Ticker V1.0 [ADRIDEM]Overview
The Rolling Sortino Ratio with Ref Ticker script is designed to offer a comprehensive view of the Sortino ratios for a selected reference ticker and the current ticker. This script helps investors compare risk-adjusted returns between two assets over a rolling period, providing insights into their relative performance and risk. Below is a detailed presentation of the script and its unique features.
Unique Features of the New Script
Reference Ticker Comparison : Allows users to compare the Sortino ratio of the current ticker with a reference ticker, providing a relative performance analysis. Default ticker is BTCUSDT but can be changed.
Customizable Rolling Window : Enables users to set the length for the rolling window, adapting to different market conditions and timeframes. The default value is 252 bars, which approximates one year of trading days, but it can be adjusted as needed.
Smoothing Option : Includes an option to apply a smoothing simple moving average (SMA) to the Sortino ratios, helping to reduce noise and highlight trends. The smoothing length is customizable, with a default value of 4 bars.
Visual Indicators : Plots the smoothed Sortino ratios for both the reference ticker and the current ticker, with distinct colors for easy comparison. Additionally, horizontal lines and a shaded background help identify key levels.
Dynamic Background Color : Adds a gray-blue transparent background between the Sortino ratio levels of 0 and 1, highlighting the critical region where risk-adjusted returns are assessed.
Originality and Usefulness
This script uniquely combines the analysis of Sortino ratios for a reference ticker and the current ticker, providing a comparative view of their risk-adjusted returns. The inclusion of a customizable rolling window and smoothing option enhances its adaptability and usefulness in various market conditions.
Signal Description
The script includes several features that highlight potential insights into the risk-adjusted returns of the assets:
Reference Ticker Sortino Ratio : Plotted as a red line, this represents the smoothed Sortino ratio for the user-selected reference ticker.
Current Ticker Sortino Ratio : Plotted as a white line, this represents the smoothed Sortino ratio for the current ticker.
Horizontal Lines and Background Color : Lines at 0 and 1, along with a shaded background between these levels, help to quickly identify the regions of positive and strong risk-adjusted returns.
These features assist in identifying relative performance differences and confirming the strength or weakness of risk-adjusted returns between the two tickers.
Detailed Description
Input Variables
Length for Rolling Window (`length`) : Defines the range for calculating the rolling Sortino ratio. Default is 252.
Smoothing Length (`smoothing_length`) : The number of periods for the smoothing SMA. Default is 4.
Annual Risk-Free Rate (`riskFreeRate`) : The annual risk-free rate used in the Sortino ratio calculation. Default is 0.02 (2%).
Reference Ticker (`ref_ticker`) : The ticker symbol for the reference asset. Default is "BINANCE:BTCUSDT".
Functionality
Sortino Ratio Calculation : The script calculates the daily returns, mean return, and downside deviation for both the reference ticker and the current ticker. These values are used to compute the annualized Sortino ratio.
```pine
ref_dailyReturn = ta.change(ref_close) / ref_close
ref_meanReturn = ta.sma(ref_dailyReturn, length)
ref_downsideDeviation = ta.stdev(math.min(ref_dailyReturn, 0), length)
ref_annualizedReturn = ref_meanReturn * length
ref_annualizedDownsideDev = ref_downsideDeviation * math.sqrt(length)
ref_sortinoRatio = (ref_annualizedReturn - riskFreeRate) / ref_annualizedDownsideDev
```
Smoothing : A simple moving average is applied to the Sortino ratios to smooth the data.
```pine
smoothed_ref_sortinoRatio = ta.sma(ref_sortinoRatio, smoothing_length)
smoothed_current_sortinoRatio = ta.sma(current_sortinoRatio, smoothing_length)
```
Plotting : The script plots the smoothed Sortino ratios for both the reference ticker and the current ticker, along with horizontal lines and a shaded background.
```pine
plot(smoothed_ref_sortinoRatio, title="Ref Ticker Sortino Ratio", color=color.rgb(255, 82, 82, 50), linewidth=2)
plot(smoothed_current_sortinoRatio, title="Current Ticker Sortino Ratio", color=color.white, linewidth=2)
h0 = hline(0, "Zero Line", color=color.gray)
h1 = hline(1, "One Line", color=color.gray)
fill(h0, h1, color=color.rgb(33, 150, 243, 90), title="Background")
```
How to Use
Configuring Inputs : Adjust the detection length, smoothing length, and risk-free rate as needed. Set the reference ticker to the desired asset for comparison.
Interpreting the Indicator : Use the plotted Sortino ratios and background shading to assess the relative risk-adjusted returns of the reference and current tickers.
Signal Confirmation : Look for differences in the Sortino ratios to identify potential performance advantages or weaknesses. The background shading helps to highlight key levels of risk-adjusted returns.
This script provides a detailed comparative view of risk-adjusted returns, aiding in more informed decision-making by highlighting key differences between the reference ticker and the current ticker.
Portfolio management
Rolling Sharpe Ratio with Ref Ticker V1.0 [ADRIDEM]Overview
The Rolling Sharpe Ratio with Ref Ticker script is designed to offer a comprehensive view of the Sharpe ratios for a selected reference ticker and the current ticker. This script helps investors compare risk-adjusted returns between two assets over a rolling period, providing insights into their relative performance and risk. Below is a detailed presentation of the script and its unique features.
Unique Features of the New Script
Reference Ticker Comparison : Allows users to compare the Sharpe ratio of the current ticker with a reference ticker, providing a relative performance analysis. Default ticker is BTCUSDT but can be changed.
Customizable Rolling Window : Enables users to set the length for the rolling window, adapting to different market conditions and timeframes. The default value is 252 bars, which approximates one year of trading days, but it can be adjusted as needed.
Smoothing Option : Includes an option to apply a smoothing simple moving average (SMA) to the Sharpe ratios, helping to reduce noise and highlight trends. The smoothing length is customizable, with a default value of 4 bars.
Visual Indicators : Plots the smoothed Sharpe ratios for both the reference ticker and the current ticker, with distinct colors for easy comparison. Additionally, horizontal lines and a shaded background help identify key levels.
Dynamic Background Color : Adds a gray-blue transparent background between the Sharpe ratio levels of 0 and 1, highlighting the critical region where risk-adjusted returns are assessed.
Originality and Usefulness
This script uniquely combines the analysis of Sharpe ratios for a reference ticker and the current ticker, providing a comparative view of their risk-adjusted returns. The inclusion of a customizable rolling window and smoothing option enhances its adaptability and usefulness in various market conditions.
Signal Description
The script includes several features that highlight potential insights into the risk-adjusted returns of the assets:
Reference Ticker Sharpe Ratio : Plotted as a red line, this represents the smoothed Sharpe ratio for the user-selected reference ticker.
Current Ticker Sharpe Ratio : Plotted as a white line, this represents the smoothed Sharpe ratio for the current ticker.
Horizontal Lines and Background Color : Lines at 0 and 1, along with a shaded background between these levels, help to quickly identify the regions of positive and strong risk-adjusted returns.
These features assist in identifying relative performance differences and confirming the strength or weakness of risk-adjusted returns between the two tickers.
Detailed Description
Input Variables
Length for Rolling Window (`length`) : Defines the range for calculating the rolling Sharpe ratio. Default is 252.
Smoothing Length (`smoothing_length`) : The number of periods for the smoothing SMA. Default is 4.
Annual Risk-Free Rate (`riskFreeRate`) : The annual risk-free rate used in the Sharpe ratio calculation. Default is 0.02 (2%).
Reference Ticker (`ref_ticker`) : The ticker symbol for the reference asset. Default is "BINANCE:BTCUSDT".
Functionality
Sharpe Ratio Calculation : The script calculates the daily returns, mean return, and standard deviation for both the reference ticker and the current ticker. These values are used to compute the annualized Sharpe ratio.
```pine
ref_dailyReturn = ta.change(ref_close) / ref_close
ref_meanReturn = ta.sma(ref_dailyReturn, length)
ref_stdDevReturn = ta.stdev(ref_dailyReturn, length)
ref_annualizedReturn = ref_meanReturn * length
ref_annualizedStdDev = ref_stdDevReturn * math.sqrt(length)
ref_sharpeRatio = (ref_annualizedReturn - riskFreeRate) / ref_annualizedStdDev
```
Smoothing : A simple moving average is applied to the Sharpe ratios to smooth the data.
```pine
smoothed_ref_sharpeRatio = ta.sma(ref_sharpeRatio, smoothing_length)
smoothed_current_sharpeRatio = ta.sma(current_sharpeRatio, smoothing_length)
```
Plotting : The script plots the smoothed Sharpe ratios for both the reference ticker and the current ticker, along with horizontal lines and a shaded background.
```pine
plot(smoothed_ref_sharpeRatio, title="Ref Ticker Sharpe Ratio", color=color.rgb(255, 82, 82, 50), linewidth=2)
plot(smoothed_current_sharpeRatio, title="Current Ticker Sharpe Ratio", color=color.white, linewidth=2)
h0 = hline(0, "Zero Line", color=color.gray)
h1 = hline(1, "One Line", color=color.gray)
fill(h0, h1, color=color.rgb(33, 150, 243, 90), title="Background")
```
How to Use
Configuring Inputs : Adjust the detection length, smoothing length, and risk-free rate as needed. Set the reference ticker to the desired asset for comparison.
Interpreting the Indicator : Use the plotted Sharpe ratios and background shading to assess the relative risk-adjusted returns of the reference and current tickers.
Signal Confirmation : Look for differences in the Sharpe ratios to identify potential performance advantages or weaknesses. The background shading helps to highlight key levels of risk-adjusted returns.
This script provides a detailed comparative view of risk-adjusted returns, aiding in more informed decision-making by highlighting key differences between the reference ticker and the current ticker.
High Probability OS/OB {DCAquant}DCAquant - High Probability OS/OB
The DCAquant - High Probability OS/OB Pine Script is a sophisticated indicator that provides insights into overbought (OB) and oversold (OS) conditions based on Hull Moving Averages (HMA) and Volume Weighted Moving Averages (VWMA). Here's a detailed breakdown of its functionality:
-------------------------------------------------------------------------------------
THIS INDICATOR IS ONLY WRITTEN FOR BTC, ETH and TOTAL!!!!!!!!!!!!!
-------------------------------------------------------------------------------------
Functionality
The script identifies high-probability OB and OS zones by combining multiple moving averages (MAs).
1. Volume Weighted Moving Average (VWMA)
The VWMA function computes the VWMA over a specified length, incorporating both the price and volume.
2. Hull Moving Average with Volume Weight (HMA-VW)
The hullma_vw function calculates the HMA using the VWMA. This involves:
Computing VWMAs over the full length and half-length.
Using these VWMAs to derive the HMA-VW through a weighted approach.
5. Standard Hull Moving Average (HMA)
The hull function computes the HMA using the standard weighted moving average (WMA).
4. Smoothed HMA-VW
This is an Exponential Moving Average (EMA) of the HMA-VW to smooth out short-term fluctuations.
How this works
First, the distance between the 2 MA's is calculated.
The distance is scored against the average price of the last 100 days.
By getting this score we can calculate extremes
The Extremes are categorized into 4 levels. The transparency of the background color distinguishes these 4 levels.
Only the MOST extremes are plotted ON THE CHART. Within the indicator, all 4 levels are plotted.
Usage
Extreme Buy zone: Consider entering the market when the indicator shows deep negative values (oversold). These are highlighted with a cyan background, with increasing opacity indicating stronger buy signals (Level 4 Zones).
Extreme Sell Zone: Consider exiting the market when the indicator shows high positive values (overbought). These are highlighted with a magenta background, with increasing opacity indicating stronger sell signals (Level 4 Zones).
Disclaimer
This indicator should not be used in isolation. It is recommended to use this as part of a systematic approach, incorporating other tools and analysis methods to confirm signals and make well-informed trading decisions.
Position Sizing Tool - Fixed Loss - Multi Asset [RSC]
This script is an Multi Asset measurement tool that can be used to evaluate or keep track of trades. Like the long and short position drawing tools, it calculates a risk reward ratio and a risk-adjusted position size from multiple entries (4 maximum), stop and take profit multiple levels ( 4 maximum) , but it also does much more:
• It can be used to configure long or short trades.
• All monetary values can be expressed in any number of currencies.
• The value of tick/pip movement (which varies with the position's size) is displayed in the currency you have selected.
• It does live tracking of the position.
• You can configure alerts on entries and exits.
█ HOW TO USE IT
Load the indicator on an active chart.
When you first load this script on a chart, you are able specify following parameter
• Account Balance
• Account currency.
And for each asset (Max 8):
• Symbols Ticker (and Exchange)
• Risk per trade (% or Amount base on Account Currency)
• Account Size
• Entry Time
• Entry levels (Max. 4)
• Leverage (only works for crypto) (same leverage for all entries)
• Stop loss level.
• Take profit level (Max. 4)
• Exit level percentage (Max. 4)
Once you have entered (or modify) parameters, the script will draw trade zones and levels labels containing the trade metrics:
• determines if the trade is a long or short from the position of the take profit and stop loss levels in relation to the entry price. If the take profit level is above the entry price, the stop must be below and vice versa, otherwise an error occurs.
• You can change levels by entering new values in the script's settings.
Once you place the position tool on a chart, it will appear at the same levels on symbols that you selected in script setting and nothing showed up for other symbols.
If your scale is not set to "Scale price chart only", the position tool's levels will be taken into account when scaling the chart, which can cause the symbol's bars to be compressed. If your scale is set to "Scale price chart only", the position tool will still be there, but it will not impact the scale of the chart's bars, so you won't see it if it sits outside the symbol's price scale.
█ FEATURES
Display
The position tool displays the following information for entries:
• The price level with “ Stoploss/Entry/Target” sign before it.
• Open or Closed P&L: For an open trade, the "Open P&L" displays the difference in money value between the entry level and the chart's current price.
For a closed trade, the "Closed P&L" displays the realized P&L on the trade.
• Quantity: The trade size, which takes into account the risk tolerance you set in the script's settings.
• RR: The reward to risk ratio expresses the relationship of the distance between the entry and the take profit level vs the entry and the stop level.
Example: A $100 stop with a $100 target will have a ratio of 1:1, whereas a $200 target with the same stop will have a 2:1 ratio.
• Per tick/pip: Represents the money value of a tick or pip movement.
• Their distance from the entry in money value, percentage and ticks/pips.
• The projected end money value of the position if the level is reached. These values are calculated based on the trade size and the currency.
█ Currency adjustments
This indicator modifies the trade label's colors and values based on the final Profit and Loss (P&L), which considers the dynamic exchange rate between base and conversion currencies in its calculations when the conversion currency is a specified value other than the default. Depending on the cross rate between the base and account currencies, this process can yield a negative P&L on an otherwise successful simulated trade.
For instance, if your account is in currency XYZ, you might buy 10 Apple shares at $150 each, with the XYZ to USD exchange rate being 2:1. This purchase would cost you 3000 units of XYZ. Suppose that later on, the shares appreciate to $170 each, and you decide to sell. One might expect this trade to result in profit. However, if the exchange rate has now equalized to 1:1, the return on selling the shares, calculated in XYZ, would only be 1700 units, resulting in a loss of 1300 units XYZ.
The indicator will mark the P&L and the target labels in red in such cases, regardless of whether the market price reached the profit target, as the trade produced a net loss due to reduced funds after currency conversion. Conversely, an otherwise unsuccessful position can result in a net profit in the account currency due to conversion rate fluctuations. The final losses or gains appear in the label metrics, and the corresponding color coding reflects the trade's success or failure.
█ Settings
The settings in the "Trade sizing" section are used to calculate the position size and the monetary value of trades. Two types of risk can be chosen from the menu; a percentage based risk calculation, or a fixed money value. The risk is used to calculate the quantity of units to purchase to achieve that level of risk exposure. Example: An account size of $1000 and 10% risk will have a projected end amount of $900 if the stop loss is hit. The quantity is a product of this relationship; a projected number of units to allow for the equivalent of $100 of risk exposure over the change in price from the entry to the stop value.
You can control the appearance of the tool and the values it displays in the settings following these first two sections.
Wolf DCA CalculatorThe Wolf DCA Calculator is a powerful and flexible indicator tailored for traders employing the Dollar Cost Averaging (DCA) strategy. This tool is invaluable for planning and visualizing multiple entry points for both long and short positions. It also provides a comprehensive analysis of potential profit and loss based on user-defined parameters, including leverage.
Features
Entry Price: Define the initial entry price for your trade.
Total Lot Size: Specify the total number of lots you intend to trade.
Percentage Difference: Set the fixed percentage difference between each DCA point.
Long Position: Toggle to switch between long and short positions.
Stop Loss Price: Set the price level at which you plan to exit the trade to minimize losses.
Take Profit Price: Set the price level at which you plan to exit the trade to secure profits.
Leverage: Apply leverage to your trade, which multiplies the potential profit and loss.
Number of DCA Points: Specify the number of DCA points to strategically plan your entries.
How to Use
1. Add the Indicator to Your Chart:
Search for "Wolf DCA Calculator" in the TradingView public library and add it to your chart.
2. Configure Inputs:
Entry Price: Set your initial trade entry price.
Total Lot Size: Enter the total number of lots you plan to trade.
Percentage Difference: Adjust this to set the interval between each DCA point.
Long Position: Use this toggle to choose between a long or short position.
Stop Loss Price: Input the price level at which you plan to exit the trade to minimize losses.
Take Profit Price: Input the price level at which you plan to exit the trade to secure profits.
Leverage: Set the leverage you are using for the trade.
Number of DCA Points: Specify the number of DCA points to plan your entries.
3. Analyze the Chart:
The indicator plots the DCA points on the chart using a stepline style for clear visualization.
It calculates the average entry point and displays the potential profit and loss based on the specified leverage.
Labels are added for each DCA point, showing the entry price and the lots allocated.
Horizontal lines mark the Stop Loss and Take Profit levels, with corresponding labels showing potential loss and profit.
Benefits
Visual Planning: Easily visualize multiple entry points and understand how they affect your average entry price.
Risk Management: Clearly see your Stop Loss and Take Profit levels and their impact on your trade.
Customizable: Adapt the indicator to your specific strategy with a wide range of customizable parameters.
MetaFOX DCA (ASAP-RSI-BB%B-TV)Welcome To ' MetaFOX DCA (ASAP-RSI-BB%B-TV) ' Indicator.
This is not a Buy/Sell signals indicator, this is an indicator to help you create your own strategy using a variety of technical analyzing options within the indicator settings with the ability to do DCA (Dollar Cost Average) with up to 100 safety orders.
It is important when backtesting to get a real results, but this is impossible, especially when the time frame is large, because we don't know the real price action inside each candle, as we don't know whether the price reached the high or low first. but what I can say is that I present to you a backtest results in the worst possible case, meaning that if the same chart is repeated during the next period and you traded for the same period and with the same settings, the real results will be either identical to the results in the indicator or better (not worst). There will be no other factors except the slippage in the price when executing orders in the real trading, So I created a feature for that to increase the accuracy rate of the results. For more information, read this description.
Below I will explain all the properties and settings of the indicator:
A) 'Buy Strategies' Section: Your choices of strategies to Start a new trade: (All the conditions works as (And) not (OR), You have to choose one at least and you can choose more than one).
- 'ASAP (New Candle)': Start a trade as soon as possible at the opening of a new candle after exiting the previous trade.
- 'RSI': Using RSI as a technical analysis condition to start a trade.
- 'BB %B': Using BB %B as a technical analysis condition to start a trade.
- 'TV': Using tradingview crypto screener as a technical analysis condition to start a trade.
B) 'Exit Strategies' Section: Your choices of strategies to Exit the trades: (All the conditions works as (And) not (OR), You can choose more than one, But if you don't want to use any of them you have to activate the 'Use TP:' at least).
- 'ASAP (New Candle)': Exit a trade as soon as possible at the opening of a new candle after opening the previous trade.
- 'RSI': Using RSI as a technical analysis condition to exit a trade.
- 'BB %B': Using BB %B as a technical analysis condition to exit a trade.
- 'TV': Using tradingview crypto screener as a technical analysis condition to exit a trade.
C) 'Main Settings' Section:
- 'Trading Fees %': The Exchange trading fees in percentage (trading Commission).
- 'Entry Price Slippage %': Since real trading differs from backtest calculations, while in backtest results are calculated based on the open price of the candle, but in real trading there is a slippage from the open price of the candle resulting from the supply and demand in the real time trading, so this feature is to determine the slippage Which you think it is appropriate, then the entry prices of the trades will calculated higher than the open price of the start candle by the percentage of slippage that you set. If you don't want to calculate any slippage, just set it to zero, but I don't recommend that if you want the most realistic results.
Note: If (open price + slippage) is higher than the high of the candle then don't worry, I've kept this in consideration.
- 'Use SL': Activate to use stop loss percentage.
- 'SL %': Stop loss percentage.
- 'SL settings options box':
'SL From Base Price': Calculate the SL from the base order price (from the trade first entry price).
'SL From Avg. Price': Calculate the SL from the average price in case you use safety orders.
'SL From Last SO.': Calculate the SL from the last (lowest) safety order deviation.
ex: If you choose 'SL From Avg. Price' and SL% is 5, then the SL will be lower than the average price by 5% (in this case your SL will be dynamic until the price reaches all the safety orders unlike the other two SL options).
Note: This indicator programmed to be compatible with '3COMMAS' platform, but I added more options that came to my mind.
'3COMMAS' DCA bots uses 'SL From Base Price'.
- 'Use TP': Activate to use take profit percentage.
- 'TP %': Take profit percentage.
- 'Pure TP,SL': This feature was created due to the differences in the method of calculations between API tools trading platforms:
If the feature is not activated and (for example) the TP is 5%, this means that the price must move upward by only 5%, but you will not achieve a net profit of 5% due to the trading fees. but If the feature is activated, this means that you will get a net profit of 5%, and this means that the price must move upward by (5% for the TP + the equivalent of trading fees). The same idea is applied to the SL.
Note: '3COMMAS' DCA bots uses activated 'Pure TP,SL'.
- 'SO. Price Deviation %': Determines the decline percentage for the first safety order from the trade start entry price.
- 'SO. Step Scale': Determines the deviation multiplier for the safety orders.
Note: I'm using the same method of calculations for SO. (safety orders) levels that '3COMMAS' platform is using. If there is any difference between the '3COMMAS' calculations and the platform that you are using, please let me know.
'3COMMAS' DCA bots minimum 'SO. Price Deviation %' is (0.21)
'3COMMAS' DCA bots minimum 'SO. Step Scale' is (0.1)
- 'SO. Volume Scale': Determines the base order size multiplier for the safety orders sizes.
ex: If you used 10$ to buy at the trade start (base order size) and your 'SO. Volume Scale' is 2, then the 1st SO. size will be 20, the 2nd SO. size will be 40 and so on.
- 'SO. Count': Determines the number of safety orders that you want. If you want to trade without safety orders set it to zero.
'3COMMAS' DCA bots minimum 'SO. Volume Scale' is (0.1)
- 'Exchange Min. Size': The exchange minimum size per trade, It's important to prevent you from setting the base order Size less than the exchange limit. It's also important for the backtest results calculations.
ex: If you setup your strategy settings and it led to a loss to the point that you can't trade any more due to insufficient funds and your base order size share from the strategy becomes less than the exchange minimum trade size, then the indicator will show you a warning and will show you the point where you stopped the trading (It works in compatible with the initial capital). I recommend to set it a little bit higher than the real exchange minimum trade size especially if you trade without safety orders to not stuck in the trade if you hit the stop loss
- 'BO. Size': The base order size (funds you use at the trade entry).
- 'Initial Capital': The total funds allocated for trading using your strategy settings, It can be more than what is required in the strategy to cover the deficit in case of a loss, but it should not exceed the funds that you actually have for trading using this strategy settings, It's important to prevent you from setting up a strategy which requires funds more than what you have. It's also has other important benefits (refer to 'Exchange Min. Size' for more information).
- 'Accumulative Results': This feature is also called re-invest profits & risk reduction. If it's not activated then you will use the same funds size in each new trade whether you are in profit or loss till the (initial capitals + net results) turns insufficient. If it's activated then you will reuse your profits and losses in each new trade.
ex: The feature is active and your first trade ended with a net profit of 1000$, the next trade will add the 1000$ to the trade funds size and it will be distributed as a percentage to the BO. & SO.s according to your strategy settings. The same idea in case of a loss, the trade funds size will be reduced.
D) 'RSI Strategy' Section:
- 'Buy': RSI technical condition to start a trade. Has no effect if you don't choose 'RSI' option in 'Buy Strategies'.
- 'Exit': RSI technical condition to exit a trade. Has no effect if you don't choose 'RSI' option in 'Exit Strategies'.
E) 'TV Strategy' Section:
- 'Buy': TradingView Crypto Screener technical condition to start a trade. Has no effect if you don't choose 'TV' option in 'Buy Strategies'.
- 'Exit': TradingView Crypto Screener technical condition to exit a trade. Has no effect if you don't choose 'TV' option in 'Exit Strategies'.
F) 'BB %B Strategy' Section:
- 'Buy': BB %B technical condition to start a trade. Has no effect if you don't choose 'BB %B' option in 'Buy Strategies'.
- 'Exit': BB %B technical condition to exit a trade. Has no effect if you don't choose 'BB %B' option in 'Exit Strategies'.
G) 'Plot' Section:
- 'Signals': Plots buy and exit signals.
- 'BO': Plots the trade entry price (base order price).
- 'AVG': Plots the trade average price.
- 'AVG options box': Your choice to plot the trade average price type:
'Avg. With Fees': The trade average price including the trading fees, If you exit the trade at this price the trade net profit will be 0.00
'Avg. Without Fees': The trade average price but not including the trading fees, If you exit the trade at this price the trade net profit will be a loss equivalent to the trading fees.
- 'TP': Plots the trade take profit price.
- 'SL': Plots the trade stop loss price.
- 'Last SO': Plots the trade last safety order that the price reached.
- 'Exit Price': Plots a mark on the trade exit price, It plots in 3 colors as below:
Red (Default): Trade exit at a loss.
Green (Default): Trade exit at a profit.
Yellow (Default): Trade exit at a profit but this is a special case where we have to calculate the profits before reaching the safety orders (if any) on that candle (compatible with the idea of getting strategy results at the worst case).
- 'Result Table': Plots your strategy result table. The net profit percentage shown is a percentage of the 'initial capital'.
- 'TA Values': Plots your used strategies Technical analysis values. (Green cells means valid condition).
- 'Help Table': Plots a table to help you discover 100 safety orders with its deviations and the total funds needed for your strategy settings. Deviations shown in red is impossible to use because its price is <= 0.00
- 'Portfolio Chart': Plots your Portfolio status during the entire trading period in addition to the highest and lowest level reached. It's important when evaluating any strategy not only to look at the final result, but also to look at the change in results over the entire trading period. Perhaps the results were worryingly negative at some point before they rose again and made a profit. This feature helps you to see the whole picture.
- 'Welcome Message': Plots a welcome message and showing you the idea behind this indicator.
- 'Green Net Profit %': It plots the 'Net Profit %' in the result table in green color if the result is equal to or above the value that you entered.
- 'Green Win Rate %': It plots the 'Win Rate %' in the result table in green color if the result is equal to or above the value that you entered.
- 'User Notes Area': An empty text area, Feel free to use this area to write your notes so you don't forget them.
The indicator will take care of you. In some cases, warning messages will appear for you. Read them carefully, as they mean that you have done an illogical error in the indicator settings. Also, the indicator will sometimes stop working for the same reason mentioned above. If that happens then click on the red (!) next to the indicator name and read the message to find out what illogical error you have done.
Please enjoy the indicator and let me know your thoughts in the comments below.
[MAD] Entrytool / Bybit-LinearThis indicator, "Entry Tool," was coded at request for Sandmann .
It is designed to provide traders with real-time feedback for strategizing entries, exits, and liquidation levels for trades initiated at that given moment.
The tool visualizes average entry prices, stop-loss levels, multiple take-profit targets, and potential liquidation prices, offering a comprehensive overview of possible trade outcomes. It aids traders in pre-planning their trades by visually simulating the impact of different trading decisions directly on the live chart. Each setting and parameter can be customized to align with individual trading strategies and risk tolerances, making this tool versatile for various trading styles, including day trading, swing trading, and position trading.
------------------------------
Steps to Use the Indicator:
1. Basic Setup:
Setup Type: Choose between "Long" or "Short" to set the direction of the trade.
Leverage: Adjust the leverage to understand its impact on your potential returns and liquidation price.
Tracking follows the close price, alternative you can enter a specific price.
2. Position Setup:
Initial Entry Amount: Set the starting amount for the trade.
Distance: First Increment Percentage from Entry price
Amount: Define the increase for the first incremental addition to the position and specify the amount to be added.
Distance: Second Increment Percentage from Entry
Amount: Set the increase for the second incremental addition and the corresponding amount.
3. Risk Management:
Stop-Loss (SL) Percentage: Set the percentage below or above the average entry price at which the position should be closed to minimize losses.
Take-Profit (TP) Percentages: Define up to four different profit target levels by specifying the percentage above or below the average entry price.
4. Visual Settings:
Box Colors: Customize the colors of the boxes that represent long and short positions to differentiate easily on the chart.
Box Extension: Determine the length by which the box extends beyond the current bar, which helps in visualizing the potential price movement.
Line Colors and Extensions: Select colors for various lines such as the Average Entry Line, Stop-Loss Line, Take-Profit Lines, and Liquidations Line. Adjust the length of these lines for better visibility.
Label Settings: Configure the distance of labels from their corresponding lines and set the font size for better readability.
5. Additional Features:
Liquidation Price Visualization: This new feature calculates and displays the liquidation price based on the current leverage and margin settings, giving traders a critical insight into their risk exposure.
Interactive Drag Point: Adjust the start price manually by dragging the point on the chart, which dynamically updates entry and exit levels as well as risk metrics.
Detailed Leverage Data Array: Input different scenarios with specific leverage, initial margin, and maintenance rates to see how these factors impact potential liquidation points.
6. Informations about leverage calculation
The data used are fetched from Bybit for Linear pairs to calculate the liquidations like in their documentation.
Keep in mind that other exchanges may calulate based on another formular.
Dynamic Date and Price Tracker with Entry PriceThe Dynamic Date and Price Tracker indicator is a simple tool designed for traders to visualize and monitor their trade's progress in real-time from a specified starting point.
This tool provides an intuitive graphical representation of your trade's profitability based on a custom entry date and price.
Features:
-Starting Date Selection: Choose a specific starting date, after which the indicator begins tracking your trade's performance.
-Custom Entry Price: Input a starting price to accurately reflect your actual entry price for performance tracking across different timeframes.
-Real-Time Tracking: As new bars form, the indicator automatically adjusts a dynamic line to the current closing price.
-Profit/Loss Color Coding: The dynamic line color changes based on whether the current price is above (green for profit) or below (red for loss) your specified entry price.
-Performance Label: A real-time label displays the absolute and percentage change in price since your initial entry, color-coded for positive (green) or negative (red) performance.
-Entry Price Line: The horizontal line marks your starting price for easy visual comparison.
Liquidations [ChartPrime]Liquidations Indicator:
The Liquidations indicator is a powerful tool designed to help traders identify significant liquidation levels in financial markets. By analyzing volume data over a specified lookback period, the indicator highlights potential areas where market participants with high leverage positions may face liquidation, providing valuable insights into market dynamics.
Usage:
Traders can use the Liquidations indicator to:
◈ Identify liquidity grab opportunities: Liquidation levels often attract price action as market participants with leveraged positions face the risk of forced liquidation. Traders can anticipate price movements as the market aims to trigger these stops, potentially leading to rapid price movements or reversals.
◈ Confirm trend strength: A cluster of liquidation levels in the same direction as the prevailing trend may confirm the strength of the trend, while divergences between liquidation levels and price movements may signal potential trend reversals.
Settings:
◈ Previous Value Bars Back: Specifies the number of previous bars used in calculating the liquidation levels.
◈ Show Leverage: Allows users to selectively display liquidation levels for different leverage multiples, including 5x, 10x, 25x, 50x, and 100x.
◈ Liquidation Levels Width: Sets the width of the lines representing liquidation levels on the chart.
◈ Short Liquidations Color: Specifies the color of the lines representing short liquidation levels.
◈ Long Liquidations Color: Specifies the color of the lines representing long liquidation levels.
◈ Bar Color: Sets the color of the background bar when the indicator is active.
Visual Representation:
◈ Liquidation levels are plotted as horizontal lines on the chart, with different colors representing short and long liquidation levels.
◈ Each liquidation level is labeled with the corresponding leverage multiple (e.g., 5x, 10x, etc.).
A dashboard displays the active liquidation levels for each leverage multiple, allowing traders to quickly assess the current market conditions.
◈ Time Window allows users to cut off unnecessary part of the chart and concentrate on a current active part of the chart to make better trading decisions:
Interpretation:
Market participants tend to place stop-loss orders near liquidation levels , creating clusters of pending orders. As price approaches these levels, it may trigger a cascade of stop-loss orders, providing liquidity for market orders and potentially leading to rapid price movements in the opposite direction.
Traders can anticipate price reversals or accelerations as price interacts with liquidation levels, using them as reference points for identifying potential entry or exit opportunities.
Note:
While the Liquidations indicator provides valuable insights into market dynamics, traders should use it in conjunction with other technical analysis tools and risk management strategies to make informed trading decisions.
Tic Tac Toe Game [TradeDots]Feeling bored with trading?
Time to inject some fun into your decision-making process with our Tic Tac Toe Indicator!
The Tic Tac Toe game transforms your chart into a competitive playground where trading pairs face off in a classic game of Tic Tac Toe.
HOW TO PLAY
Our Tic Tac Toe game invites you to pit one trading pair against another directly on your chart. Choose the competitors and watch as they battle it out in a traditional grid setup.
Navigate to settings and select your competitor pair.
Choose who kicks off the game.
After the close of each new bar, the algorithm will utilize the closing prices of both symbols. These numbers feed into a random number generator which alternates the turns for placing marks on the grid.
The game progresses until one pair aligns three consecutive symbols and wins, or the board fills up. After that, the game resets every three bars, offering continual engagement during active market hours.
MANUAL PLAYING MODE
Currently, due to PineScript's limitations, a fully interactive manual mode is not supported, as all previous data will be lost with each new user input, preventing the replication of existing game states.
However, users can input a sequence at the start, guiding the placement of symbols throughout the game.
Stay tuned for future updates!
Futures Risk CalculatorThe "Futures Risk Calculator" is designed to assist traders in calculating the number of contracts to risk based on their account size, risk percentage, and stop loss level. This script provides a convenient way for traders to determine their position size in futures or other instruments where contracts are used.
The script prompts users to input their account size, risk percentage, entry price, and stop loss price. It then calculates the stop size in points, risk in dollars, and the number of contracts to risk. These calculations are based on standard risk management principles commonly used in trading.
The script plots the entry and stop loss lines on the chart for visual reference. Additionally, it displays a label in the top-right corner of the chart, showing the calculated number of contracts to risk. The label updates dynamically as the input values or market conditions change.
Originality and Usefulness:
This script is original and adds value to the TradingView community by providing traders with a practical tool for managing risk in their trading strategies. It is focusing on risk management, an essential aspect of successful trading.
By automating the calculation process, the script saves traders time and reduces the potential for manual errors. It encourages traders to adopt disciplined risk management practices, which are crucial for long-term profitability and capital preservation.
How to Use:
Input your account size, risk percentage, entry price, and stop loss price in the script settings.
Enter the pip size according to the instrument you are using (by default its's based for NASDAQ)
The script will automatically calculate the number of contracts to risk based on the provided inputs.
The entry and stop loss lines will be plotted on the chart for visual reference.
The calculated number of contracts to risk will be displayed in the top-right corner of the chart.
By following these steps, traders can effectively manage their risk exposure and make informed decisions when entering trades.
Candle Strength based on Relative Strength of EMAOverview:
The EMA-Based Relative Strength Labels indicator provides a dynamic method to visualize the strength of price movements relative to an Exponential Moving Average (EMA). By comparing the current price to the EMA, it assigns labels (A, B, C for bullish and X, Y, Z for bearish) to candles, indicating the intensity of bullish or bearish behavior.
Key Features:
Dynamic EMA Comparison: The indicator calculates the difference between the current price and the EMA, expressing it as a percentage to determine relative strength.
Configurable Thresholds: Users can set custom thresholds for strong, moderate, and low bullish or bearish movements, allowing for tailored analysis based on personal trading strategy or market behavior.
Clear Visual Labels: Each candle is labeled directly on the chart, making it easy to spot significant price movements at a glance.
Usage:
Trend Confirmation: The labels help confirm the prevailing trend's strength, aiding traders in decision-making regarding entry or exit points.
Risk Management: By identifying the strength of the price movements, traders can better manage stop-loss placements and avoid potential false breakouts.
Strategy Development: Incorporate the indicator into trading systems to enhance strategies that depend on trend strength and momentum.
How It Works:
The script calculates the EMA of the closing prices and measures the relative strength of each candle to this average.
Bullish candles above the EMA and bearish candles below the EMA are further analyzed to determine their strength based on predefined percentage thresholds.
Labels 'A', 'B', and 'C' are assigned for varying degrees of bullish strength, while 'X', 'Y', and 'Z' denote levels of bearish intensity.
Customization:
Users can adjust the EMA period and modify the strength thresholds for both bullish and bearish conditions to suit different instruments and timeframes.
Best Practices:
Combine this indicator with volume analysis and other technical tools for comprehensive market analysis.
Regularly update the thresholds based on market volatility and personal risk tolerance to maintain the effectiveness of the labels.
RSI Multi Strategies With Overlay SignalsHello everyone,
In this indicator, you will find 6 different entry and exit signals based on the RSI :
Entry into overbought and oversold zones
Exit from overbought and oversold zones
Crossing the 50 level
RSI cross RSI MA below or above the 50 level
RSI cross RSI MA in the overbought or oversold zones
RSI Divergence
With the signals identified, you can create your own strategy . (If you have any suggestions, please mention them in the comments).
Beyond these signals, you can set SL (Stop Loss) and TP (Take Profit) levels to better manage your positions.
SL Methods:
Percentage: The stop loss is determined by the percentage you specify.
ATR : The stop level is determined based on the Average True Range (ATR).
TP Methods:
Percentage: The take profit is determined by the percentage you specify.
RR ( Risk Reward ): The take profit level is determined based on the distance from the stop level.
You can mix and match these options as you like.
What makes the indicator unique and effective is its ability to display the RSI in the bottom chart and the signals, SL (Stop Loss), and TP (Take Profit) levels in the overlay chart simultaneously. This feature allows you to manage your trading quickly and easily without the need for using two separate indicators.
Let's try out a few strategies together.
My entry signal: RSI Entered OS (Oversold) Zone
My exit signal: RSI Entered OB (Overbought) Zone
I'm not using a stoploss for this strategy ("Fortune favors the brave").
Let's keep ourselves safe by adding a stop loss.
I'm adding an ATR-based stop loss.
I think it's better now.
If you have any questions or suggestions about the indicator, you can contact me.
Cheers
Mag7 IndexThis is an indicator index based on cumulative market value of the Magnificent 7 (AAPL, MSFT, NVDA, TSLA, META, AMZN, GOOG). Such an indicator for the famous Mag 7, against which your main security can be benchmarked, was missing from the TradingView user library.
The index bar values are calculated by taking the weighted average of the 7 stocks, relative to their market cap. Explicitly, we are multiplying each bar period's total outstanding stock amount by the OHLC of that period for each stock and dividing that value by the combined sum of outstanding stock for the 7 corporations. OHLC is taken for the extended trading session.
The index dynamically adjusts with respect to the chosen main security and the bars/line visible in the chart window; that is, the first close value is normalized to the main security's first close value. It provides recalculation of the performance in that chart window as you scroll (this isn't apparent in the demo chart above this description).
It can be useful for checking market breadth, or benchmarking price performance of the individual stock components that comprise the Magnificent 7. I prefer comparing the indicator to the Nasdaq Composite Index (IXIC) or S&P500 (SPX), but of course you can make comparisons to any security or commodity.
Settings Input Options:
1) Bar vs. Line - view as OHLC colored bars or line chart. Line chart color based on close above or below the previous period close as green or red line respectively.
2) % vs Regular - the final value for the window period as % return for that window or index value
3) Turn on/off - bottom right tile displaying window-period performance
Inspired by the simpler NQ 7 Index script by @RaenonX but with normalization to main security at start of window and additional settings input options.
Please provide feedback for additional features, e.g., if a regular/extended session option is useful.
Wunder OI breakout1. The basic concept for this strategy is to breakout open interest levels.
2. Open interest indicates the total number of active positions in the market a sharp increase in which we will use to enter a trade.
3. The main concept of this strategy is to break open interest levels.The strategy is based on building levels based on the highs and lows over a certain period. The breakdown of the set levels is used for entry. You can change the period as well as the percentage of change in open interest to find setups based on your pair and timeframe.
4. A function for calculating risk on the portfolio (your deposit) has been added to the Wunder OI breakout. When this option is enabled, you get a calculation of the entry amount in dollars relative to your Stop Loss. In the settings, you can select the risk percentage on your portfolio. The loss will be calculated from the amount that will be displayed on the chart.
5. For example, if your deposit is $1000 and you set the risk to 1%, with a Stop Loss of 5%, the entry volume will be $200. The loss at SL will be $10. 10$, which is your 1% risk or 1% of the deposit.
Important! The risk per trade must be less than the Stop Loss value. If the risk is greater than SL, then you should use leverage.
The amount of funds entering the trade is calculated in dollars. This option was created if you want to send the dollar amount from Tradingview to the exchange. However, putting your volume in dollars you get the incorrect net profit and drawdown indication in the backtest results, as TradingView calculates the backtest volume in contracts.
To display the correct net profit and drawdown values in Tradingview Backtest results, use the ”Volume in contract” option.
Easy Strategy BuilderHello, I focused on making this indicator as user-friendly as possible while designing it. I avoided complex structures, and as a result, I believe I have created an indicator that everyone can easily use.
With the Strategy Builder indicator, you can automate the strategy you use and visualize signals on the chart. This allows you to scale your strategy and stay informed of new signals through alerts.
How it works?
Firstly, we need to determine the entry condition for the trade. For this, you have 15 different sources at your disposal.
1. Price
2. RSI
3. RSI MA
4. CCI
5. STOCH K
6. STOCH D
7. MA 1
8. MA 2
9. ATR
10. DMI+
11. DMI-
12. SUPERTREND
13. BB Lower
14. BB Middle
15. BB Upper
Using the relationship between these sources or with a key level, we can generate signals. There are 7 different conditions available to control this relationship.
1. > x is greater than y
2. > = x is greater than or equal to y
3. < x is less than y
4. ≤ x is less than or equal to y
5. = x is equal to y
6. Cross Up = x has crossed above y. One bar ago, x was less than y, now x is greater than y.
7. Cross Down = x has crossed below y. One bar ago, x was greater than y, now x is less than y.
Let’s make a few examples
1.
- Entry Condition: RSI crosses above RSI moving average.
- Exit Condition: RSI crosses below RSI moving average.
Let's use more than one condition together
2.
Entry Condition: rsi<30 ve rsi cross up rsi Ma
Exit Condition: Rsi>70 ve rsi cross down rsi Ma
Let's strengthen the signal by adding different indicators and price.
3.
Entry Condition: rsi<30 and price70 and price> bb middle and rsi cross down rsi ma
What if things go wrong? Let's add stop loss
4.
Entry Condition: rsi<30 and price70 and price> bb higher and rsi cross down rsi ma
Stoploss: %2
That's how simple it is to create a strategy. Need a more complex strategy? Feel free to contact me.
Important notes:
1. Avoid continuously triggered conditions.
Example:
Entry Condition: RSI > 0
2. Determine logical entry and exit conditions.
3. Avoid placing stop losses too close to entry points.
AIFX with WMALinear regression is a linear approach to modeling the relationship between a dependent variable and one or more independent variables.
In linear regression, the relationships are modeled using linear predictor functions whose unknown model parameters are estimated from the data.
The regression channel in this study is modeled using the least squares approach with four base average types to choose from:
-> Volume Weighted Moving Average (VWMA)
When using VWMA, if no volume is present, the calculation will automatically switch to tick volume, making it compatible with any cryptocurrency, stock, currency pair, or index you want to analyze.
There are two window types for calculation in this script as well:
-> Continuous, which generates a regression model over a fixed number of bars continuously.
-> Interval, which generates a regression model that only moves its starting point when a new interval starts. The number of bars for calculation cumulatively increases until the end of the interval.
The channel is generated by calculating standard deviation multiplied by the channel width coefficient, adding it to and subtracting it from the regression line, then dividing it into quartiles.
To observe the path of the regression, I've included a tracer line, which follows the current point of the regression line. This is also referred to as a Least Squares Moving Average (LSMA).
For added predictive capability, there is an option to extend the channel lines into the future.
A custom bar color scheme based on channel direction and price proximity to the current regression value is included.
I don't necessarily recommend using this tool as a standalone, but rather as a supplement to your analysis systems.
Regression analysis is far from an exact science. However, with the right combination of tools and strategies in place, it can greatly enhance your analysis and trading.
Buy/Sell Signals: The indicator is based on specific criteria to generate buy/sell signals. Crossings between the upper and lower bands trigger buy/sell signals. For example, a sell signal is generated when the price crosses below the upper band, while a buy signal is generated when the price crosses above the lower band.
Alarm Conditions: The indicator sets alarm conditions to notify users when specific buy/sell signals are detected. This ensures that users do not miss trading opportunities and stay informed about significant changes in the market.
Trailing Management (Zeiierman)█ Overview
The Trailing Management (Zeiierman) indicator is designed for traders who seek an automated and dynamic approach to managing trailing stops. It helps traders make systematic decisions regarding when to enter and exit trades based on the calculated risk-reward ratio. By providing a clear visual representation of trailing stop levels and risk-reward metrics, the indicator is an essential tool for both novice and experienced traders aiming to enhance their trading discipline.
The Trailing Management (Zeiierman) indicator integrates a Break-Even Curve feature to enhance its utility in trailing stop management and risk-reward optimization. The Break-Even Curve illuminates the precise point at which a trade neither gains nor loses value, offering clarity on the risk-reward landscape. Furthermore, this precise point is calculated based on the required win rate and the risk/reward ratio. This calculation aids traders in understanding the type of strategy they need to employ at any given time to be profitable. In other words, traders can, at any given point, assess the kind of strategy they need to utilize to make money, depending on the price's position within the risk/reward box.
█ How It Works
The indicator operates by computing the highest high and the lowest low over a user-defined period and then applying this information to determine optimal trailing stop levels for both long and short positions.
Directional Bias:
It establishes the direction of the market trend by comparing the index of the highest high and the lowest low within the lookback period.
Bullish
Bearish
Trailing Stop Adjustment:
The trailing stops are adjusted using one of three methods: an automatic calculation based on the median of recent peak differences, pivot points, or a fixed percentage defined by the user.
The Break-Even Curve:
The Break-Even Curve, along with the risk/reward ratio, is determined through the trailing method. This approach utilizes the current closing price as a hypothetical entry point for trades. All calculations, including those for the curve, are based on this current closing price, ensuring real-time accuracy and relevance. As market conditions fluctuate, the curve dynamically adjusts, offering traders a visual benchmark that signifies the break-even point. This real-time adjustment provides traders with an invaluable tool, allowing them to visually track how shifts in the market could impact the point at which their trades neither gain nor lose value.
Example:
Let's say the price is at the midpoint of the risk/reward box; this means that the risk/reward ratio should be 1:1, and the minimum win rate is 50% to break even.
In this example, we can see that the price is near the stop-loss level. If you are about to take a trade in this area and would respect your stop, you only need to have a minimum win rate of 11% to earn money, given the risk/reward ratio, assuming that you hold the trade to the target.
In other words, traders can, at any given point, assess the kind of strategy they need to employ to make money based on the price's position within the risk/reward box.
█ How to Use
Market Bias:
When using the Auto Bias feature, the indicator calculates the underlying market bias and displays it as either bullish or bearish. This helps traders align their trades with the underlying market trend.
Risk Management:
By observing the plotted trailing stops and the risk-reward ratios, traders can make strategic decisions to enter or exit positions, effectively managing the risk.
Strategy selection:
The Break-Even Curve is a powerful tool for managing risk, allowing traders to visualize the relationship between their trailing stops and the market's price movements. By understanding where the break-even point lies, traders can adjust their strategies to either lock in profits or cut losses.
Based on the plotted risk/reward box and the location of the price within this box, traders can easily see the win rate required by their strategy to make money in the long run, given the risk/reward ratio.
Consider this example: The market is bullish, as indicated by the bias, and the indicator suggests looking into long trades. The price is near the top of the risk/reward box, which means entering the market right now carries a huge risk, and the potential reward is very low. To take this trade, traders must have a strategy with a win rate of at least 90%.
█ Settings
Trailing Method:
Auto: The indicator calculates the trailing stop dynamically based on market conditions.
Pivot: The trailing stop is adjusted to the highest high (long positions) or lowest low (short positions) identified within a specified lookback period. This method uses the pivotal points of the market to set the trailing stop.
Percentage: The trailing stop is set at a fixed percentage away from the peak high or low.
Trailing Size (prd):
This setting defines the lookback period for the highest high and lowest low, which affects the sensitivity of the trailing stop to price movements.
Percentage Step (perc):
If the 'Percentage' method is selected, this setting determines the fixed percentage for the trailing stop distance.
Set Bias (bias):
Allows users to set a market bias which can be Bullish, Bearish, or Auto, affecting how the trailing stop is adjusted in relation to the market trend.
-----------------
Disclaimer
The information contained in my Scripts/Indicators/Ideas/Algos/Systems does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
My Scripts/Indicators/Ideas/Algos/Systems are only for educational purposes!
Equity CurveAn equity curve is a graphical representation of the change in the value of a trading account over a time period. The equity curve is a direct reflection of a trading strategy's effectiveness. A consistently upward-trending equity curve indicates a successful strategy, while a flat or declining curve may signal the need for adjustment.
This indicator takes traders daily account values as a comma separated list, and creates an equity curve and simple moving average of the equity curve. This serves as a mirror reflecting the outcome of past actions and decisions, guiding traders in fine-tuning their strategies, managing risk more effectively, and ultimately striving towards a consistently profitable trading journey.
New equity values should be added to the end of the current list. A space or no space after the comma has no effect.
Importance of the Equity Curve
Strategy Evaluation: The equity curve is a direct reflection of a trading strategy's effectiveness over time. A consistently upward-trending equity curve indicates a successful strategy, while a flat or declining curve may signal the need for adjustment.
Risk Management: Monitoring the equity curve helps traders to see the impact of their risk management practices. Sudden drops in equity could highlight instances of excessive risk-taking or inadequate stop-loss settings.
Performance Benchmarks: Comparing the equity curve against benchmarks or desired performance goals allows traders to assess if they are meeting, exceeding, or falling short of their trading objectives.
Psychology: Trading is as much about psychology as it is about strategy. A visual representation of one's equity curve helps maintain discipline, encouraging adherence to a trading plan during downturns and preventing overconfidence during upswings.
Having this data visually allows traders to see which category of trader they fall into.
Unprofitable
Boom or Bust
Profitable
Statistical Data
The indicator not only plots the equity curve and moving average, but includes the option to display the highest value reached by the equity curve, the percentage difference from the peak, and performance over selected periods (All Time, YTD, QTD, MTD, WTD).
Historical Analysis
The Equity Curve Indicator is not just a tool for real-time monitoring of trading performance; it also serves as a powerful instrument for conducting historical analysis. By analyzing the equity curve in conjunction with historical market conditions, traders can identify patterns or triggers that resulted in significant gains or losses.
For example, the chart below shows the equity curve overlaid on periods of net new highs / lows. The equity curve experienced declines while the market was showing net new lows or choppy periods (represented by a red or white background), while most of the equity gains were made while net new highs were present (green background).
This retrospective analysis helps in understanding how different market conditions impact trading strategies and performance.
Trading the Equity Curve
All trading strategies produce an equity curve that has winning and losing periods. In the example above, the trader could introduce a simple rule to lighten up on long positions or move to cash during periods of net new lows.
Another simple rule could be introduced to stop trading if the equity curve falls below the moving average, until favorable market conditions return again.
This indicator is intended to be used on the daily timeframe.
Danger Signals from The Trading MindwheelThe " Danger Signals " indicator, a collaborative creation from the minds at Amphibian Trading and MARA Wealth, serves as your vigilant lookout in the volatile world of stock trading. Drawing from the wisdom encapsulated in "The Trading Mindwheel" and the successful methodologies of legends like William O'Neil and Mark Minervini, this tool is engineered to safeguard your trading journey.
Core Features:
Real-Time Alerts: Identify critical danger signals as they emerge in the market. Whether it's a single day of heightened risk or a pattern forming, stay informed with specific danger signals and a tally of signals for comprehensive decision-making support. The indicator looks for over 30 different signals ranging from simple closing ranges to more complex signals like blow off action.
Tailored Insights with Portfolio Heat Integration: Pair with the "Portfolio Heat" indicator to customize danger signals based on your current positions, entry points, and stops. This personalized approach ensures that the insights are directly relevant to your trading strategy. Certain signals can have different meanings based on where your trade is at in its lifecycle. Blow off action at the beginning of a trend can be viewed as strength, while after an extended run could signal an opportunity to lock in profits.
Forward-Looking Analysis: Leverage the 'Potential Danger Signals' feature to assess future risks. Enter hypothetical price levels to understand potential market reactions before they unfold, enabling proactive trade management.
The indicator offers two different modes of 'Potential Danger Signals', Worst Case or Immediate. Worst Case allows the user to input any price and see what signals would fire based on price reaching that level, while the Immediate mode looks for potential Danger Signals that could happen on the next bar.
This is achieved by adding and subtracting the average daily range to the current bars close while also forecasting the next values of moving averages, vwaps, risk multiples and the relative strength line to see if a Danger Signal would trigger.
User Customization: Flexibility is at your fingertips with toggle options for each danger signal. Tailor the indicator to match your unique trading style and risk tolerance. No two traders are the same, that is why each signal is able to be turned on or off to match your trading personality.
Versatile Application: Ideal for growth stock traders, momentum swing traders, and adherents of the CANSLIM methodology. Whether you're a novice or a seasoned investor, this tool aligns with strategies influenced by trading giants.
Validation and Utility:
Inspired by the trade management principles of Michael Lamothe, the " Danger Signals " indicator is more than just a tool; it's a reflection of tested strategies that highlight the importance of risk management. Through rigorous validation, including the insights from "The Trading Mindwheel," this indicator helps traders navigate the complexities of the market with an informed, strategic approach.
Whether you're contemplating a new position or evaluating an existing one, the " Danger Signals " indicator is designed to provide the clarity needed to avoid potential pitfalls and capitalize on opportunities with confidence. Embrace a smarter way to trade, where awareness and preparation open the door to success.
Let's dive into each of the components of this indicator.
Volume: Volume refers to the number of shares or contracts traded in a security or an entire market during a given period. It is a measure of the total trading activity and liquidity, indicating the overall interest in a stock or market.
Price Action: the analysis of historical prices to inform trading decisions, without the use of technical indicators. It focuses on the movement of prices to identify patterns, trends, and potential reversal points in the market.
Relative Strength Line: The RS line is a popular tool used to compare the performance of a stock, typically calculated as the ratio of the stock's price to a benchmark index's price. It helps identify outperformers and underperformers relative to the market or a specific sector. The RS value is calculated by dividing the close price of the chosen stock by the close price of the comparative symbol (SPX by default).
Average True Range (ATR): ATR is a market volatility indicator used to show the average range prices swing over a specified period. It is calculated by taking the moving average of the true ranges of a stock for a specific period. The true range for a period is the greatest of the following three values:
The difference between the current high and the current low.
The absolute value of the current high minus the previous close.
The absolute value of the current low minus the previous close.
Average Daily Range (ADR): ADR is a measure used in trading to capture the average range between the high and low prices of an asset over a specified number of past trading days. Unlike the Average True Range (ATR), which accounts for gaps in the price from one day to the next, the Average Daily Range focuses solely on the trading range within each day and averages it out.
Anchored VWAP: AVWAP gives the average price of an asset, weighted by volume, starting from a specific anchor point. This provides traders with a dynamic average price considering both price and volume from a specific start point, offering insights into the market's direction and potential support or resistance levels.
Moving Averages: Moving Averages smooth out price data by creating a constantly updated average price over a specific period of time. It helps traders identify trends by flattening out the fluctuations in price data.
Stochastic: A stochastic oscillator is a momentum indicator used in technical analysis that compares a particular closing price of an asset to a range of its prices over a certain period of time. The theory behind the stochastic oscillator is that in a market trending upwards, prices will tend to close near their high, and in a market trending downwards, prices close near their low.
While each of these components offer unique insights into market behavior, providing sell signals under specific conditions, the power of combining these different signals lies in their ability to confirm each other's signals. This in turn reduces false positives and provides a more reliable basis for trading decisions
These signals can be recognized at any time, however the indicators power is in it's ability to take into account where a trade is in terms of your entry price and stop.
If a trade just started, it hasn’t earned much leeway. Kind of like a new employee that shows up late on the first day of work. It’s less forgivable than say the person who has been there for a while, has done well, is on time, and then one day comes in late.
Contextual Sensitivity:
For instance, a high volume sell-off coupled with a bearish price action pattern significantly strengthens the sell signal. When the price closes below an Anchored VWAP or a critical moving average in this context, it reaffirms the bearish sentiment, suggesting that the momentum is likely to continue downwards.
By considering the relative strength line (RS) alongside volume and price action, the indicator can differentiate between a normal retracement in a strong uptrend and a when a stock starts to become a laggard.
The integration of ATR and ADR provides a dynamic framework that adjusts to the market's volatility. A sudden increase in ATR or a character change detected through comparing short-term and long-term ADR can alert traders to emerging trends or reversals.
The "Danger Signals" indicator exemplifies the power of integrating diverse technical indicators to create a more sophisticated, responsive, and adaptable trading tool. This approach not only amplifies the individual strengths of each indicator but also mitigates their weaknesses.
Portfolio Heat Indicator can be found by clicking on the image below
Danger Signals Included
Price Closes Near Low - Daily Closing Range of 30% or Less
Price Closes Near Weekly Low - Weekly Closing Range of 30% or Less
Price Closes Near Daily Low on Heavy Volume - Daily Closing Range of 30% or Less on Heaviest Volume of the Last 5 Days
Price Closes Near Weekly Low on Heavy Volume - Weekly Closing Range of 30% or Less on Heaviest Volume of the Last 5 Weeks
Price Closes Below Moving Average - Price Closes Below One of 5 Selected Moving Averages
Price Closes Below Swing Low - Price Closes Below Most Recent Swing Low
Price Closes Below 1.5 ATR - Price Closes Below Trailing ATR Stop Based on Highest High of Last 10 Days
Price Closes Below AVWAP - Price Closes Below Selected Anchored VWAP (Anchors include: High of base, Low of base, Highest volume of base, Custom date)
Price Shows Aggressive Selling - Current Bars High is Greater Than Previous Day's High and Closes Near the Lows on Heaviest Volume of the Last 5 Days
Outside Reversal Bar - Price Makes a New High and Closes Near the Lows, Lower Than the Previous Bar's Low
Price Shows Signs of Stalling - Heavy Volume with a Close of Less than 1%
3 Consecutive Days of Lower Lows - 3 Days of Lower Lows
Close Lower than 3 Previous Lows - Close is Less than 3 Previous Lows
Character Change - ADR of Last Shorter Length is Larger than ADR of Longer Length
Fast Stochastic Crosses Below Slow Stochastic - Fast Stochastic Crosses Below Slow Stochastic
Fast & Slow Stochastic Curved Down - Both Stochastic Lines Close Lower than Previous Day for 2 Consecutive Days
Lower Lows & Lower Highs Intraday - Lower High and Lower Low on 30 Minute Timeframe
Moving Average Crossunder - Selected MA Crosses Below Other Selected MA
RS Starts Curving Down - Relative Strength Line Closes Lower than Previous Day for 2 Consecutive Days
RS Turns Negative Short Term - RS Closes Below RS of 7 Days Ago
RS Underperforms Price - Relative Strength Line Not at Highs, While Price Is
Moving Average Begins to Flatten Out - First Day MA Doesn't Close Higher
Price Moves Higher on Lighter Volume - Price Makes a New High on Light Volume and 15 Day Average Volume is Less than 50 Day Average
Price Hits % Target - Price Moves Set % Higher from Entry Price
Price Hits R Multiple - Price hits (Entry - Stop Multiplied by Setting) and Added to Entry
Price Hits Overhead Resistance - Price Crosses a Swing High from a Monthly Timeframe Chart from at Least 1 Year Ago
Price Hits Fib Level - Price Crosses a Fib Extension Drawn From Base High to Low
Price Hits a Psychological Level - Price Crosses a Multiple of 0 or 5
Heavy Volume After Significant Move - Above Average and Heaviest Volume of the Last 5 Days 35 Bars or More from Breakout
Moving Averages Begin to Slope Downward - Moving Averages Fall for 2 Consecutive Days
Blow Off Action - Highest Volume, Largest Spread, Multiple Gaps in a Row 35 Bars or More Post Breakout
Late Buying Frenzy - ANTS 35 Bars or More Post Breakout
Exhaustion Gap - Gap Up 5% or Higher with Price 125% or More Above 200sma
Forex lot size calculation🔶What it is ?
Forex lot size calculation is an indicator to help traders to manage trading account better and avoid emotion when you're changing account from small to bigger capital.
This indicator calculates lot size to entry by calculation risk in percent that you're planing for a position and your account balance also.
Our purpose is, keep your mind always "Empty" during trading even you're managing 100k$, 200k$ and more, espeically when you're changing from small account to bigger account.
The diffirence here is only Lot size you will input, we don't need to focus on how many money in dollors will we lost after a position. Each position, that's 1%, 2% balance , just like that. From that point, we can control emotion better and trade more effectively.
🔶 Who can use it ?
1. All traders who are using NCI, ICT , MACD system and other systems...
2. All traders who are trading on any timeframe
3. All traders who are trading on Forex market
4. All traders who are new or experienced traders
5. All traders who are swing or scalping traders
🔶 The purpose of indicator
1. Calculate lot size for all forex pairs exactly to trade on other platform like MT4/5, Ctrader and even Tradingview.
2. Exchange from risk by percent of account to lot size
3. Helping you to manage trading accounts easier
4. Always "Empty your mind" during Trading
🔶 How will indicator appear on chart
After you added it on chart, indicator will appear as table at your bottom right of chart. You can change it to Top-center as above chart by setting that I will guide you right on below.
In general, you can see three data :
1. Acc size $: That's your account balance you already input
2. %Risk : Here is risk by percent that you're planing to trade
3. LOT SIZE : Here is value after calcuation to help you can know how many lot size to entry.
Indicator will show you as three colors also :
GREEN : You're taking risk at a safe level that's less than 1%your account. You normally can trade better and manage trade easier with risk like that.
WHITE : You're taking risk at a normal level that's from 1 - 2% your account. You should becareful during taking this risk because it is only for experience traders.
RED : You're taking risk at a dangerous level that's greater than 2% your account.
This type of risk is only for top trader who can earn profit from mange consistency for a long time. Plus, with this type of risk, you will be rejected by prop firm companies easier because of gambling rules.
🔶 INPUT value
There're 2 groups for trader to input and use this indicator :
1. Trading input :
You need to input data to calcuate lot size here
- Your account balance : here is your initial account balance that you deposit
- Acc risk % : Here is risk by percent you're planing for each position.
- Stop loss by pips : Here is stop loss by pips for your position.
Explanation about stoploss by pips in Forex
Please help to refer to my chart above, that's a buying position in Tradingview. Tradingview measured all needed data in pips for you.
For example : My buying position on have chart having stop loss value is 15.3 pips.
I just need to input stoploss here as 15.3.
2. Display setting
Here is the place we will set the text size and location of table.
- Font size : The size of texts in this indicator. You can choose from tiny to Huge size
- Location : The position of indicator on chart. You can put it from bottom to top and left to right as your favorite
🔶 How to use indicator
After setting indicator, you need to input all data to Trading input group :
1. Your account balance
2. Acc risk %
3. Stop loss by pips
And then click to OK.
Indicator will calculate and give out LOT SIZE for you to entry.
It will remember your account balance and risk %, so you just need to input stop loss for your diffirence trades.
As chart above, I input my initial account as 200k$ and I normally take 1% risk for each position.
I want to buy at green box on chart above with SL is around 15.3 pips on AUDUSD.
Indicator helped to calculate lot size as 13.07 lot to trade.
I hope this indicator help you to trade and manage account better.
Simple Position SizerSimple Position Sizer is designed to calculate optimal position sizes based on a defined risk percentage and stop-loss level. It offers two modes for determining position size: using the current close price or a specified entry price. The script provides key trade details such as entry price, stop-loss level, quantity to trade, total cost, and risk amount in monetary terms, alongside visual indications of these parameters through colored lines and labels on the chart. Users can customize account size, risk per trade percentage, and entry and stop-loss levels directly within the settings.
Usage Scenario:
A trader looking to enter a position would first decide whether the entry is based on the current closing price or a predetermined level. After setting the stop-loss level and specifying the risk per trade as a percentage of the account size, the script calculates the number of shares or contracts to purchase. It also computes the total cost of the position and displays the potential loss if the stop-loss is triggered, allowing the trader to understand the risk involved before entering the trade.
Visual Indicators:
Green indicators suggest a long setup where the entry level is above the stop-loss, indicating bullish entry.
Red indicators signal a short setup where the entry level is below the stop-loss, reflecting bearish entry
Blue lines represent the entry level when specified by the trader, providing a visual cue for planned entries.
Mental Health Monitoring🔶What it is ?
NCI_Mental Health is a reminder to help traders to manage psychology during analyzation.
This indicator calculates and displays your analyzation time and give you alert about your current mental status to continue analyzing or close chart to avoid being manipulated my market.
Our purpose is, keep your mind always "Empty" during analyzation. Counting opening chart will help you to control analyzation time and empty your mind better.
🔶 Who can use it ?
1. All traders who are using NCI, ICT , MACD system and other systems...
2. All traders who are trading on any timeframe
3. All traders who are trading on any market like stock, crypto, forex, gold, indices...
4. All traders who are new or experienced traders
5. All traders who are swing or scalping traders
🔶 The purpose of indicator
This indicator will give you alert and information about your mental health to know :
1. When you need to stop analyzation
2. When you can continue analyzing chart without any worries
3. Choosing your best emotion period to analyze to give out the best decision
4. Always "Empty your mind" during analyzation
🔶 How will indicator appear on chart
After you added it on chart, indicator will appear at your top right corner of chart. You can change it to Top-center as above chart by setting that I will guide you right on below.
In general, you can see two data :
1. Analyzation time : That's period that you used to analyze now by seconds and minutes
2. Metal status : Your mental status during analyzation
We will have 3 status as :
Good- You're on a very good status to start analyzing. This infomation will be shown as green color. We can remember color better than words so I added more color.
Normal - Your brain are on a normal status that you still continue analyzing.
This infomation will be shown as white color.
MANIPULATED - Your brain is very TIRED and you must close chart to take a rest.
This infomation will be shown as red color.
🔶 How to use indicator
You should focus on Metal status mostly with below guidance :
1. Good: You're on a nice status to give out the best decision. Normally, you should analyze a chart less than 3 minutes as default to always stay on the best status during analyzation.
2. Normal : It is better to prepare to take a rest. You can continue analyzing without any worries.
3. MANIPULATED : You will be manipulated by market easily to give out the wrong decisions.
You need to close chart now.
🔶 INPUT value
1. Minute : Analyzation time as minute value
2. Second : Analyzation time as second value
3. Your Alert message: A message to remind yourself if analyzation time is ended.
4. Font size : The size of texts in this indicator. You can choose from tiny to Huge size
5. Location : The position of indicator on chart. You can put it from bottom to top and left to right as your favorite.
🔶 Setting ALERT
If you prefer to receive a remind from Indicator than checking Mental status on indicator table
You can set alert by Tradingview with below steps :
1. Click to Alert on top middle of chart (tool bar)
2. At Condition, choose NCI mental health
3. Click to Create
Indicator will send you alert if your analyzation time now is over your Input value.
You should close chart and stop analyzation to avoid giving wrongly decision.
Warm regards,
Jayce