Scale Ability [TrendX_]Scale Ability indicator can indicate a company’s potential for future growth and profitability.
A scalable company is one that can increase its revenue and market share without increasing its costs proportionally, which can benefit from economies of scale. Therefore, the high-scale ability can generate more value for its shareholders - which is important for investment decisions.
Scale Ability indicator consists of 3 financial components:
Cash Flow from Investing Activities to Total Assets Ratio (CFIA / TA)
Net Income to Total Debt Ratio (NI / TD)
Earnings Before Interest, Taxes, Depreciation and Amortization to Equity Ratio (EBITDA / E)
These measures can help investors assess how efficiently and effectively a company uses its resources to generate revenue and profit.
Note:
This can be customizable between Fiscal Quarter (FQ) and Fiscal Year (Fy)
This is suitable for companies in fast-growing industries.
FUNCTION
CFIA / TA Ratio
A company with a net income to total debt of 9% could indicate that it is investing in its assets to keep up with the market demand and the technological changes which can create competitive advantages.
NI/ TD Ratio
A company with a net income to total debt of 9% could show that it is profitable and has a strong financial position, which can easily cover its debt payments.
EBITDA / E Ratio
A company with a net income to total debt of 14% illustrates that it is generating a high return on its equity.
USAGE
Scale index division:
> 43 : Excellent
32 - 43 : Good
12 - 31 : Above Average
= 11 : Average
8 - 10 : Below Average
5 - 7 : Poor
< 4 : Very Poor
DISCLAIMER
This is only a rough estimate, and the actual ratio may differ significantly depending on the stage of the business cycle and the company’s strategy, and the comparison of each company and its peers.
This indicator is not financial advice, it can only help traders make better decisions. There are many factors and uncertainties that can affect the outcome of any endeavor, and no one can guarantee or predict with certainty what will occur.
Therefore, one should always exercise caution and judgment when making decisions based on past performance.
Portfolio management
Quantitative Risk Navigator [kikfraben]📊 Quantitative Risk Navigator - Your Financial Performance GPS
Navigate the complexities of financial markets with confidence using the Quantitative Risk Navigator. This indicator provides you with a comprehensive dashboard to assess and understand the risk and performance of your chosen asset.
📈 Key Features:
Alpha and Beta Analysis: Uncover the outperformance (Alpha) and risk exposure (Beta) of your asset compared to a selected benchmark. Know where your investment stands in the market.
Correlation Insights: Understand the relationship between your asset and its benchmark through a clear visualization of correlation trends over different time lengths.
Risk-Return Metrics: Evaluate risk and return simultaneously with Sharpe and Sortino ratios. Make informed decisions by assessing the reward-to-risk ratio of your investment.
Omega Ratio: Gain deeper insights into your asset's performance by analyzing the Omega Ratio, which highlights the distribution of positive and negative returns.
Customizable Visualization: Tailor your chart to focus on specific metrics and time frames. Choose which metrics to display, allowing you to concentrate on the aspects that matter most to you.
Interactive Metrics Table: A user-friendly metrics table provides a quick overview of key values, including average metrics, enabling you to grasp the financial health of your asset at a glance.
Color-Coded Clarity: The indicator employs color-coded visualizations, making it easy to identify bullish and bearish trends, helping you make rapid and informed decisions.
🛠️ How to Use:
Symbol Selection: Choose your base symbol and preferred data source for analysis.
Risk-Free Rate: Input your risk-free rate to fine-tune calculations.
Length Customization: Adjust the lengths for different metrics to align with your analysis preferences.
Whether you're a seasoned trader or just stepping into the financial world, the Quantitative Risk Navigator empowers you to make strategic decisions by providing a comprehensive view of your asset's risk and return profile. Stay in control of your investments with this powerful financial GPS.
🚀 Start Navigating Your Financial Journey Today!
Rate of Change StrategyRate of Change Strategy :
INTRODUCTION :
This strategy is based on the Rate of Change indicator. It compares the current price with that of a user-defined period of time ago. This makes it easy to spot trends and even speculative bubbles. The strategy is long term and very risky, which is why we've added a Stop Loss. There's also a money management method that allows you to reinvest part of your profits or reduce the size of your orders in the event of substantial losses.
RATE OF CHANGE (ROC) :
As explained above, the ROC is used to situate the current price compared to that of a certain period of time ago. The formula for calculating ROC in relation to the previous year is as follows :
ROC (365) = (close/close (365) - 1) * 100
With this formula we can find out how many percent the change in the current price is compared with 365 days ago, and thus assess the trend.
PARAMETERS :
ROC Length : Length of the ROC to be calculated. The current price is compared with that of the selected length ago.
ROC Bubble Signal : ROC value indicating that we are in a bubble. This value varies enormously depending on the financial product. For example, in the equity market, a bubble exists when ROC = 40, whereas in cryptocurrencies, a bubble exists when ROC = 150.
Stop Loss (in %) : Stop Loss value in percentage. This is the maximum trade value percentage that can be lost in a single trade.
Fixed Ratio : This is the amount of gain or loss at which the order quantity is changed. The default is 400, which means that for each $400 gain or loss, the order size is increased or decreased by an amount chosen by the user.
Increasing Order Amount : This is the amount to be added to or subtracted from orders when the fixed ratio is reached. The default is $200, which means that for every $400 gain, $200 is reinvested in the strategy. On the other hand, for every $400 loss, the order size is reduced by $200.
Initial capital : $1000
Fees : Interactive Broker fees apply to this strategy. They are set at 0.18% of the trade value.
Slippage : 3 ticks or $0.03 per trade. Corresponds to the latency time between the moment the signal is received and the moment the order is executed by the broker.
Important : A bot has been used to test the different parameters and determine which ones maximize return while limiting drawdown. This strategy is the most optimal on BITSTAMP:BTCUSD in 1D timeframe with the following parameters :
ROC Length = 365
ROC Bubble Signal = 180
Stop Loss (in %) = 6
LONG CONDITION :
We are in a LONG position if ROC (365) > 0 for at least two days. This allows us to limit noise and irrelevant signals to ensure that the ROC remains positive.
SHORT CONDITION :
We are in a SHORT position if ROC (365) < 0 for at least two days. We also open a SHORT position when the speculative bubble is about to burst. If ROC (365) > 180, we're in a bubble. If the bubble has been in existence for at least a week and the ROC falls back below this threshold, we can expect the asset to return to reasonable prices, and thus a downward trend. So we're opening a SHORT position to take advantage of this upcoming decline.
EXIT RULES FOR WINNING TRADE :
The strategy is self-regulating. We don't exit a LONG trade until a SHORT signal has arrived, and vice versa. So, to exit a winning position, you have to wait for the entry signal of the opposite position.
RISK MANAGEMENT :
This strategy is very risky, and we can easily end up on the wrong side of the trade. That's why we're going to manage our risk with a Stop Loss, limiting our losses as a percentage of the trade's value. By default, this percentage is set at 6%. Each trade will therefore take a maximum loss of 6%.
If the SL has been triggered, it probably means we were on the wrong side. This is why we change the direction of the trade when a SL is triggered. For example, if we were SHORT and lost 6% of the trade value, the strategy will close this losing trade and open a long position without taking into account the ROC value. This allows us to be in position all the time and not miss the best opportunities.
MONEY MANAGEMENT :
The fixed ratio method was used to manage our gains and losses. For each gain of an amount equal to the value of the fixed ratio, we increase the order size by a value defined by the user in the "Increasing order amount" parameter. Similarly, each time we lose an amount equal to the value of the fixed ratio, we decrease the order size by the same user-defined value. This strategy increases both performance and drawdown.
NOTE :
Please note that the strategy is backtested from 2017-01-01. As the timeframe is 1D, this strategy is a medium/long-term strategy. That's why only 34 trades were closed. Be careful, as the test sample is small and performance may not necessarily reflect what may happen in the future.
Enjoy the strategy and don't forget to take the trade :)
Absolute Momentum (Time Series Momentum)Absolute momentum , also known as time series momentum , focuses on the trend of an asset's own past performance to predict its future performance. It involves analyzing an asset's own historical performance, rather than comparing it to other assets.
The strategy determines whether an asset's price is exhibiting an upward (positive momentum) or downward (negative momentum) trend by assessing the asset's return over a given period (standard look-back period: 12 months or approximately 250 trading days). Some studies recommend calculating momentum by deducting the corresponding Treasury bill rate from the measured performance.
Absolute Momentum Indicator
The Absolute Momentum Indicator displays the rolling 12-month performance (measured over 250 trading days) and plots it against a horizontal line representing 0%. If the indicator crosses above this line, it signifies positive absolute momentum, and conversely, crossing below indicates negative momentum. An additional, optional look-back period input field can be accessed through the settings.
Hint: This indicator is a simplified version, as some academic approaches measure absolute momentum by subtracting risk-free rates from the 12-month performance. However, even with higher rates, the values will still remain close to the 0% line.
Benefits of Absolute Momentum
Absolute momentum, which should not be confused with relative momentum or the momentum indicator, serves as a timing instrument for both individual assets and entire markets.
Gary Antonacci , a key contributor to the absolute momentum strategy (find study below), emphasizes its effectiveness in multi-asset portfolios and its importance in long-only investing. This is particularly evident in a) reducing downside volatility and b) mitigating behavioral biases.
Moskowitz, Ooi, and Pedersen document significant 'time series momentum' across various asset classes, including equity index, currency, commodity, and bond futures, in 58 liquid instruments (find study below). There's a notable persistence in returns ranging from one to 12 months, which tends to partially reverse over longer periods. This pattern aligns with sentiment theories suggesting initial under-reaction followed by delayed over-reaction.
Despite its surprising ease of implementation, the academic community has successfully measured the effects of absolute momentum across decades and in every major asset class, including stocks, bonds, commodities, and foreign exchange (FX).
Strategies for Implementing Absolute Momentum:
To Buy a Stock:
Select a Look-Back Period: Choose a historical period to analyze the stock's performance. A common period is 12 months, but this can vary based on your investment strategy.
Calculate Excess Return: Determine the stock's excess return over this period. You can also assume a risk-free rate of "0" to simplify the process.
Evaluate Momentum:
If the excess return is positive, it indicates positive absolute momentum. This suggests the stock is in an upward trend and could be a good buying opportunity.
If the excess return is negative, it suggests negative momentum, and you might want to delay buying.
Consider further conditions: Align your decision with broader market trends, economic indicators, or fundamental analysis, for additional context.
To Sell a Stock You Own:
Regularly Monitor Performance: Use the same look-back period as for buying (e.g., 12 months) to regularly assess the stock's performance.
Check for Negative Momentum: Calculate the excess return for the look-back period. Again, you can assume a risk-free rate of "0" to simplify the process. If the stock shows negative momentum, it might be time to consider selling.
Consider further conditions:Align your decision with broader market trends, economic indicators, or fundamental analysis, for additional context.
Important note: Note: Entering a position (i.e., buying) based on positive absolute momentum doesn't necessarily mean you must sell it if it later exhibits negative absolute momentum. You can initiate a position using positive absolute momentum as an entry indicator and then continue holding it based on other criteria, such as fundamental analysis.
General Tips:
Reassessment Frequency: Decide how often you will reassess the momentum (monthly, quarterly, etc.).
Remember, while absolute momentum provides a systematic approach, it's recommendable to consider it as part of a broader investment strategy that includes diversification, risk management, fundamental analysis, etc.
Relevant Capital Market Studies:
Antonacci, Gary. "Absolute momentum: A simple rule-based strategy and universal trend-following overlay." Available at SSRN 2244633 (2013)
Moskowitz, Tobias J., Yao Hua Ooi, and Lasse Heje Pedersen. "Time series momentum." Journal of financial economics 104.2 (2012): 228-250
Narrow Range StrategyNarrow Range Strategy :
INTRODUCTION :
This strategy is based on the Narrow Range Day concept, implying that low volatility will generate higher volatility in the days ahead. The strategy sends us buy and sell signals with well-defined profit targets. It's a medium/long-term strategy. There's also a money management method that allows us to reinvest part of the profits or reduce the size of orders in the event of substantial losses.
NARROW RANGE (NR) DAY :
A Narrow Range Day is a day in which price variations are included in those of a specific day some time before. The high and low of this specific day form the "reference range". In general, we compare these variations with those of 4 or 7 days ago. The mathematical formula for finding an NR4 is :
If low > low(4) and high < high(4) :
nr = true
This implies that the current low is greater than the low of 4 days ago, and the current high is smaller than the high of 4 days ago. So today's volatility is lower than that of 4 days ago, and may be a sign of high volatility to come.
PARAMETERS :
Narrow Range Length : Corresponds to the number of candles back to compare current volatility. The default is 4, allowing comparison of current volatility with that of 4 candles ago.
Stop Loss : Percentage of the reference range on which to set an exit order to limit losses. The minimum value is 0.001, while the maximum is 1. The default value is 0.35.
Fixed Ratio : This is the amount of gain or loss at which the order quantity is changed. The default is 400, which means that for each $400 gain or loss, the order size is increased or decreased by an amount chosen by the user.
Increasing Order Amount : This is the amount to be added to or subtracted from orders when the fixed ratio is reached. The default is $200, which means that for every $400 gain, $200 is reinvested in the strategy. On the other hand, for every $400 loss, the order size is reduced by $200.
Initial capital : $1000
Fees : Interactive Broker fees apply to this strategy. They are set at 0.18% of the trade value.
Slippage : 3 ticks or $0.03 per trade. Corresponds to the latency time between the moment the signal is received and the moment the order is executed by the broker.
Important : A bot was used to test NR4 and NR7 with all possible Stop Losses in order to find out which combination generates the highest return on BITSTAMP:ETHUSD while limiting the drawdown. This strategy is the most optimal with an NR4 and a SL of 35% of the reference range size in 5D timeframe.
BUY AND SHORT SIGNALS :
When an NR is spotted, we create two stop orders on the high and low of the reference range. As soon as there's a breakout from this reference range (shown in blue on the chart), we open a position. We're LONG if there's a breakout on the high and SHORT if there's a breakout on the low. Executing a stop order cancels the second stop order.
RISK MANAGEMENT :
This strategy is subject to losses. We manage our risk with Stop Losses. The user is free to enter a SL as a percentage of the reference range. The maximum amount risked per trade therefore depends on the size of the range. The larger the range, the greater the risk. That's why we have set a maximum Stop Loss to 10% to limiting risks per trade.
The special feature of this strategy is that it targets a precise profit objective. This corresponds to the size of the reference range at the top of the high if you're LONG, or at the bottom of the low if you're short. In the same way, the larger the reference range, the greater the potential profits.
The risk reward remains the same for all trades and amounts to : 100/35 = 2.86. If the reference range is too high, we have set a SL to 10% of the trade value to limit losses. In that case, the risk reward is less than 2.86.
MONEY MANAGEMENT :
The fixed ratio method was used to manage our gains and losses. For each gain of an amount equal to the value of the fixed ratio, we increase the order size by a value defined by the user in the "Increasing order amount" parameter. Similarly, each time we lose an amount equal to the value of the fixed ratio, we decrease the order size by the same user-defined value. This strategy increases both performance and drawdown.
NOTE :
Please note that the strategy is backtested from 2017-01-01. As the timeframe is 5D, this strategy is a medium/long-term strategy. That's why only 37 trades were closed. Be careful, as the test sample is small and performance may not necessarily reflect what may happen in the future.
Enjoy the strategy and don't forget to take the trade :)
Liquidations Meter [LuxAlgo]The Liquidation Meter aims to gauge the momentum of the bar, identify the strength of the bulls and bears, and more importantly identify probable exhaustion/reversals by measuring probable liquidations.
🔶 USAGE
This tool includes many features related to the concept of liquidation. The two core ones are the liquidation meter and liquidation price calculator, highlighted below.
🔹 Liquidation Meter
The liquidation meter presents liquidations on the price chart by measuring the highest leverage value of longs and shorts that have been potentially liquidated on the last chart bar, hence allowing traders to:
gauge the momentum of the bar.
identify the strength of the bulls and bears.
identify probable reversal/exhaustion points.
Liquidation of low-leveraged positions can be indicative of exhaustion.
🔹 Liquidation Price Calculator
A liquidation price calculator might come in handy when you need to calculate at what price level your leveraged position in Crypto, Forex, Stocks, or any other asset class gets liquidated to add a protective stop to mitigate risk. Monitoring an open position gets easier if the trader can calculate the total risk in order for them to choose the right amount of margin and leverage.
Liquidation price is the distance from the trader's entry price to the price where trader's leveraged position gets liquidated due to a loss. As the leverage is increased, the distance from trader's entry price to the liquidation price shrinks.
While you have one or several trades open you can quickly check their liquidation levels and determine which one of the trades is closest to their liquidation price.
If you are a day trader that uses leverage and you want to know which trade has the best outlook you can calculate the liquidation price to see which one of the trades looks best.
🔹 Dashboard
The bar statistics option enables measuring and presenting trading activity, volatility, and probable liquidations for the last chart bar.
🔶 DETAILS
It's important to note that liquidation price calculator tool uses a formula to calculate the liquidation price based on the entry price + leverage ratio.
Other factors such as leveraged fees, position size, and other interest payments have been excluded since they are variables that don’t directly affect the level of liquidation of a leveraged position.
The calculator also assumes that traders are using an isolated margin for one single position and does not take into consideration the additional margin they might have in their account.
🔹Liquidation price formula
the liquidation distance in percentage = 100 / leverage ratio
the liquidation distance in price = current asset price x the liquidation distance in percentage
the liquidation price (longs) = current asset price – the liquidation distance in price
the liquidation price (shorts) = current asset price + the liquidation distance in price
or simply
the liquidation price (longs) = entry price * (1 – 1 / leverage ratio)
the liquidation price (shorts) = entry price * (1 + 1 / leverage ratio)
Example:
Let’s say that you are trading a leverage ratio of 1:20. The first step is to calculate the distance to your liquidation point in percentage.
the liquidation distance in percentage = 100 / 20 = 5%
Now you know that your liquidation price is 5% away from your entry price. Let's calculate 5% below and above the entry price of the asset you are currently trading. As an example, we assume that you are trading bitcoin which is currently priced at $35000.
the liquidation distance in price = $35000 x 0.05 = $1750
Finally, calculate liquidation prices.
the liquidation price (longs) = $35000 – $1750 = $33250
the liquidation price (short) = $35000 + $1750 = $36750
In this example, short liquidation price is $36750 and long liquidation price is $33250.
🔹How leverage ratio affects the liquidation price
The entry price is the starting point of the calculation and it is from here that the liquidation price is calculated, where the leverage ratio has a direct impact on the liquidation price since the more you borrow the less “wiggle-room” your trade has.
An increase in leverage will subsequently reduce the distance to full liquidation. On the contrary, choosing a lower leverage ratio will give the position more room to move on.
🔶 SETTINGS
🔹Liquidations Meter
Base Price: The option where to set the reference/base price.
🔹Liquidation Price Calculator
Liquidation Price Calculator: Toggles the visibility of the calculator. Details and assumptions made during the calculations are stated in the tooltip of the option.
Entry Price: The option where to set the entry price, a value of 0 will use the current closing price. Details are given in the tooltip of the option.
Leverage: The option where to set the leverage value.
Show Calculated Liquidation Prices on the Chart: Toggles the visibility of the liquidation prices on the price chart.
🔹Dashboard
Show Bar Statistics: Toggles the visibility of the last bar statistics.
🔹Others
Liquidations Meter Text Size: Liquidations Meter text size.
Liquidations Meter Offset: Liquidations Meter offset.
Dashboard/Calculator Placement: Dashboard/calculator position on the chart.
Dashboard/Calculator Text Size: Dashboard text size.
🔶 RELATED SCRIPTS
Here are some of the scripts that are related to the liquidation and liquidity concept, for more and other conceptual scripts you are kindly invited to visit LuxAlgo-Scripts .
Liquidation-Levels
Liquidations-Real-Time
Buyside-Sellside-Liquidity
Cryptocurrency Cointegration Matrix (SpiritualHealer117)This indicator plots a cointegration matrix for the pairings of 100 cryptocurrencies. The matrix is populated with ADF t-stats (from an ADF-test with 1 lag). An ADF-test (Augmented Dickey-Fuller test) tests the null hypothesis that an AR process has a unit root. If rejected, the alternative hypothesis is usually that the AR process is either stationary or trend-stationary. This model extends upon Lejmer's Cointegration Matrix for forex by enabling the indicator to use cryptocurrency pairs and allows for significantly more pairs to be analyzed using the group selection feature. This indicator arose from collaboration with TradingView user CryptoJuju.
This indicator runs an ADF-test on the residuals (spread) of each pairing (i.e. a cointegration test). It tests if there is a unit root in the spread between the two assets of a pairing. If there is a unit root in the spread, it means the spread varies randomly over time, and any mean reversion in the spread is very hard to predict. By contrast, if a unit root does not exist, the spread (distance between the assets) should remain more or less constant over time, or rise/fall in close to the same rate over time. The more negative the number from an ADF-test, the stronger the rejection of the idea that the spread has a unit root. In statistics, there are different levels which correspond with the confidence level of the test. For this indicator, -3.238 equals a confidence level of 90%, -3.589 equals a confidence level of 95% and -4.375 equals a confidence level of 99% that there is not a unit root. So the colors are based on the confidence level of the test statistic (the t-stat, i.e. the number of the pairing in the matrix). So if the number is greater than -3.238 it is green, if it's between -3.238 and -3.589 it's yellow, if it's between -3.589 and -4.375 it's orange, and if its lower than -4.375 it's red.
There are multiple ways to interpret the results. A strong rejection of the presence of a unit root (i.e. a value of -4.375 or below) is not a guarantee that there is no unit root, or that any of the two alternative hypotheses (that the spread is stationary or trend-stationary) are correct. It only means that in 99% of the cases, if the spread is an AR process, the test is right, and there is no unit root in the spread. Therefore, the results of this test is no guarantee that the result proves one of the alternative solutions. Green therefore means that a unit root cannot be ruled out (which can be interpreted as "the two cryptocurrencies probably don't move together over time"), and red means that a unit root is likely not present (which can be interpreted as "the two cryptocurrencies may move together over time").
One possible way to use this indicator is to make sure you don't trade two pairs that move together at the same time. So basically the idea is that if you already have a trade open in one of the currency pairs of the pairing, only enter a trade in the other currency pair of that pairing if the color is green, or you may be doubling your risk. Alternatively, you could implement this indicator into a pairs trading system, such as a simple strategy where you buy the spread between two cryptocurrencies with a red result when the spread's value drops one standard deviation away from its moving average, and conversely sell when it moves up one standard deviation above the moving average. However, this strategy is not guaranteed to work, since historical data does not guarantee the future.
Specific to this indicator, there are 100 different cryptocurrency tickers which are included in the matrix, and the cointegration matrices between all the tickers can be checked by switching asset group 1 and asset group 2 to different asset groups. The ADF test is computed using a specified length, and if there is insufficient data for the length, the test produces a grayed out box.
NOTE: The indicator can take a while to load since it computes the value of 400 ADF tests each time it is run.
Leading Industry [TrendX__]Leading Industry indicator functions like an Industry-meter, a tool that measures the strength of different industries in a country or region.
It consists of the fields of Technology, Finance, Industrial, Energy, Real-estate, and Construction.
USAGE
The Industry-meter indicates which industry is the strongest by using an arrow that points to the field with the highest score.
The default fields are set for Vietnam’s industry, but the user can customize them according to their preferences and needs.
The Industry-meter is a useful way to visualize the economic landscape and identify the opportunities and challenges in various sectors.
DISCLAIMER
This indicator is not financial advice, it can only help traders make better decisions. There are many factors and uncertainties that can affect the outcome of any endeavor, and no one can guarantee or predict with certainty what will occur.
Therefore, one should always exercise caution and judgment when making decisions based on past performance.
Martingale + Grid DCA Strategy [YinYangAlgorithms]This Strategy focuses on strategically Martingaling when the price has dropped X% from your current Dollar Cost Average (DCA). When it does Martingale, it will create a Purchase Grid around this location to likewise attempt to get you a better DCA. Likewise following the Martingale strategy, it will sell when your Profit has hit your target of X%.
Martingale may be an effective way to lower your DCA. This is due to the fact that if your initial purchase; or in our case, initial Grid, all went through and the price kept going down afterwards, that you may purchase more to help lower your DCA even more. By doing so, you may bring your DCA down and effectively may make it easier and quicker to reach your target profit %.
Grid trading may be an effective way of reducing risk and lowering your DCA as you are spreading your purchases out over multiple different locations. Likewise we offer the ability to ‘Stack Grids’. What this means, is that if a single bar was to go through 20 grids, the purchase amount would be 20x what each grid is valued at. This may help get you a lower DCA as rather than creating 20 purchase orders at each grid location, we create a single purchase order at the lowest grid location, but for 20x the amount.
By combining both Martingale and Grid DCA techniques we attempt to lower your DCA strategically until you have reached your target profit %.
Before we start, we just want to make it known that first off, this Strategy features 8% Commission Fees, you may change this in the Settings to better reflect the Commission Fees of your exchange. On a similar note, due to Commission Fees being one of the number one profit killers in fast swing trade strategies, this strategy doesn’t focus on low trades, but the ideology of it may result in low amounts of trades. Please keep in mind this is not a bad thing. Since it has the ability to ‘Stack Grid Purchases’ it may purchase more for less and result in more profit, less commission fees, and likewise less # of trades.
Tutorial:
In this example above, we have it set so we Martingale twice, and we use 100 grids between the upper and lower level of each martingale; for a total of 200 Grids. This strategy will take total capital (initial capital + net profit) and divide it by the amount of grids. This will result in the $ amount purchased per grid. For instance, say you started with $10,000 and you’ve made $2000 from this Strategy so far, your total capital is $12,000. If you likewise are implementing 200 grids within your Strategy, this will result in $12,000 / 200 = $60 per grid. However, please note, that the further down the grid / martingale is, the more volume it is able to purchase for $60.
The white line within the Strategy represents your DCA. As the Strategy makes purchases, this will continue to get lower as will your Target Profit price (Blue Line). When the Close goes above your Target Profit price, the Strategy will close all open positions and claim the profit. This profit is then reinvested back into the Strategy, which may exponentially help the Strategy become more profitable the longer it runs for.
In the example above, we’ve zoomed in on the first example. In this we want to focus on how the Strategy got back into the trades shortly after it sold. Currently within the Settings we have it set so our entry is when the Lowest with a length of 3 is less than the previous Lowest with a length of 3. This is 100% customizable and there are multiple different entry options you can choose from and customize such as:
EMA 7 Crossover EMA 21
EMA 7 Crossunder EMA 21
RSI 14 Crossover RSI MA 14
RSI 14 Crossunder RSI MA 14
MFI 14 Crossover MFI MA 14
MFI 14 Crossunder MFI MA 14
Lowest of X Length < Previous Lowest of X Length
Highest of X Length > Previous Highest of X Length
All of these entry options may be tailored to be checked for on a different Time Frame than the one you are currently using the Strategy on. For instance, you may be running the Strategy on the 15 minute Time Frame yet decide you want the RSI to cross over the RSI MA on the 1 Day to be a valid entry location.
Please keep in mind, this Strategy focuses on DCA, this means you may not want the initial purchase to be the best location. You may want to buy when others think it is a good time to sell. This is because there may be strong bearish momentum which drives the price down drastically and potentially getting you a good DCA before it corrects back up.
We will continue to add more Entry options as time goes on, and if you have any in mind please don’t hesitate to let us know.
Now, back to the example above, if we refer to the Yellow circle, you may see that the Lowest of a length of 3 was less than its previous lowest, this triggered the martingales to create their grids. Only a few bars later, the price went into the first grid and went a little lower than its midpoint (Yellow line). This caused about 60% of the first grid to be purchased. Shortly after the price went even lower into this grid and caused the entire first martingale grid to be purchased. However, if you notice, the white line (your DCA) is lower than the midpoint of the first grid. This is due to the fact that we have ‘Stack Grid Purchases’ enabled. This allows the Strategy to purchase more when a single bar crosses through multiple grid locations; and effectively may lower your average more than if it simply executed a purchase order at each grid.
Still looking at the same location within our next example, if we simply increase the Martingale amount from 2 to 3 we can see something strange happens. What happened is our Target Profit price was reached, then our entry condition was met, which caused all of the martingale grids to be formed; however, the price continued to increase afterwards. This may not be a good thing, sure the price could correct back down to these grid locations, but what if it didn’t and it just kept increasing? This would result in this Strategy being stuck and unable to make any trades. For this reason we have implemented a Failsafe in the Settings called ‘Reset Grids if no purchase happens after X bars’.
We have enabled our Failsafe ‘Reset Grids if no purchase happens after X bars’ in this example above. By default it is set to 100 bars, but you can change this to whatever works best for you. If you set it to 0, this Failsafe will be disabled and act like the example prior where it is possible to be stuck with no trades executing.
This Failsafe may be an important way to ensure the Strategy is able to make purchases, however it may also mean the Grids increase in price when it is used, and if a massive correction were to occur afterwards, you may lose out on potential profit.
This Strategy was designed with WebHooks in mind. WebHooks allow you to send signals from the Strategy to your exchange. Simply set up a Custom TradingView Bot within the OKX exchange or 3Commas platform (which has your exchange API), enter the data required from the bot into the settings here, select your bot type in ‘Webhook Alert Type’, and then set up the alert. After that you’re good to go and this Strategy will fully automate all of its trades within your exchange for you. You need to format the Alert a certain way for it to work, which we will go over in the next example.
Add an alert for this Strategy and simply modify the alert message so all it says is:
{{strategy.order.alert_message}}
Likewise change from the Alert ‘Settings’ to Alert ‘Notifications’ at the top of the alert popup. Within the Notifications we will enable ‘Webhook URL’ and then we will pass the URL we are sending the Webhook to. In this example we’ve put OKX exchange Webhook URL, however if you are using 3Commas you’ll need to change this to theirs.
OKX Webhook URL:
www.okx.com
3Commas Webhook URL:
app.3commas.io
Make sure you click ‘Create’ to actually create this alert. After that you’re all set! There are many Tutorials videos you can watch if you are still a little confused as to how Webhook trading works.
Due to the nature of this Strategy and how it is designed to work, it has the ability to never sell unless there it will make profit. However, because of this it also may be stuck waiting in trades for quite a long period of time (usually a few months); especially when your Target Profit % is 15% like in the example above. However, this example above may be a good indication that it may maintain profitability for a long period of time; considering this ‘Deep Backtest’ is from 2017-8-17.
We will conclude the tutorial here. Hopefully you understand how this Strategy has the potential to make calculated and strategic DCA Grid purchases for you and then based on a traditional Martingale fashion, bulk sell at the desired Target Profit Percent.
Settings:
Purchase Settings:
Only Purchase if its lower than DCA: Generally speaking, we want to lower our Average, and therefore it makes sense to only buy when the close is lower than our current DCA and a Purchase Condition is met.
Purchase Condition: When creating the initial buy location you must remember, you want to Buy when others are Fearful and Sell when others are Greedy. Therefore, many of the Buy conditions involve times many would likewise Sell. This is one of the bonuses to using a Strategy like this as it will attempt to get you a good entry location at times people are selling.
Lower / Upper Change Length: This Lower / Upper Length is only used if the Purchase Condition is set to 'Lower Changed' or 'Upper Changed'. This is when the Lowest or Highest of this length changes. Lowest would become lower or Highest would become higher.
Purchase Resolution: Purchase Resolution is the Time Frame that the Purchase Condition is calculated on. For instance, you may only want to start a new Purchase Order when the RSI Crosses RSI MA on the 1 Day, but yet you run this Strategy on the 15 minutes.
Sell Settings:
Trailing Take Profit: Trailing Take Profit is where once your Target Profit Percent has been hit, this will trail up to attempt to claim even more profit.
Target Profit Percent: What is your Target Profit Percent? The Strategy will close all positions when the close price is greater than your DCA * this Target Profit Percent.
Grid Settings:
Stack Grid Purchases: If a close goes through multiple Buy Grids in one bar, should we amplify its purchase amount based on how many grids it went through?
Reset Grids if no purchase happens after X Bars: Set this to 0 if you never want to reset. This is very useful in case the price is very bullish and continues to increase after our Target Profit location is hit. What may happen is, Target Profit location is hit, then the Entry condition is met but the price just keeps increasing afterwards. We may not want to be sitting waiting for the price to drop, which may never happen. This is more of a failsafe if anything. You may set it very large, like 500+ if you only want to use it in extreme situations.
Grid % Less than Initial Purchase Price: How big should our Buy Grid be? For instance if we bought at 0.25 and this value is set to 20%, that means our Buy Grid spans from 0.2 - 0.25.
Grid Amounts: How many Grids should we create within our Buy location?
Martingale Settings:
Amount of Times 'Planned' to Martingale: The more Grids + the More Martingales = the less $ spent per grid, however the less risk. Remember it may be better to be right and take your time than risk too much and be stuck too long.
Martingale Percent: When the current price is this percent less than our DCA, lets create another Buy Grid so we can lower our average more. This will make our profit location less.
Webhook Alerts:
Webhook Alert Type: How should we format this Alert? 3Commas and OKX take their alerts differently, so please select the proper one or your webhooks won't work.
3Commas Webhook Alerts:
3Commas Bot ID: The 3Commas Bot ID is needed so we know which BOT ID we are sending this webhook too.
3Commas Email Token: The 3Commas Email Token is needed for your webhooks to work properly as it is linked to your account.
OKX Webhook Alerts:
OKX Signal Token: This Signal Token is attached to your OKX bot and will be used to access it within OKX.
If you have any questions, comments, ideas or concerns please don't hesitate to contact us.
HAPPY TRADING!
2 Moving Averages | Trend FollowingThe trading system is a trend-following strategy based on two moving averages (MA) and Parabolic SAR (PSAR) indicators.
How it works:
The strategy uses two moving averages: a fast MA and a slow MA.
It checks for a bullish trend when the fast MA is above the slow MA and the current price is above the fast MA.
It checks for a bearish trend when the fast MA is below the slow MA and the current price is below the fast MA.
The Parabolic SAR (PSAR) indicator is used for additional trend confirmation.
Long and short positions can be turned on or off based on user input.
The strategy incorporates risk management with stop-loss orders based on the Average True Range (ATR).
Users can filter the backtest date range and display various indicators.
The strategy is designed to work with the date range filter, risk management, and user-defined positions.
Features:
Trend-following strategy.
Two customizable moving averages.
Parabolic SAR for trend confirmation.
User-defined risk management with stop-loss based on ATR.
Backtest date range filter.
Flexibility to enable or disable long and short positions.
This trading system provides a comprehensive approach to trend-following and risk management, making it suitable for traders looking to capture trends with controlled risk.
Renko StrategyRENKO STRATEGY
CAUTION : This strategy must be applied to a candlestick chart (not a Renko chart).
INTRODUCTION :
The Traditional Renko chart has been reproduced and is plotted according to the evolution of the price. It will enable us to receive buy or sell signals and follow major trends. This is a medium/long term strategy and depends a lot on the box size chosen in the parameters. There's also a money management method allowing us to reinvest part of the profits or reduce the size of orders in the event of substantial losses.
RENKO CHART :
Renko chart construction methodology :
The user must first choose the box size. The minimum is 0.00001 and there is no maximum. The default is 10. The user must then choose the source that will define the data on which the calculations will be based (high, low, open, close). By default, close is selected. The first candle on the chart is used to draw the first box with its high and low.
Each time the price changes by the amount of the box size relative to the high or low of the last box, a new box is added above or below the previous one. If price variations are less than the box size, the same box is added next to the previous one. If price variations are N (integer number) times greater than box size, N boxes are added above or below the previous one. Each box added above the previous one is a green box, while each box added below the previous one is a red box.
Conditions for drawing a green box above the previous one :
(source - high_of_the_last_box) / box_size > 1
Condition for drawing a red box below the previous one :
(low_of_the_last_box - source) / box_size > 1
If neither condition is triggered, the same box is drawn next to the previous one.
Example :
The last candle has drawn a box with low 12 and high 14. The box size is therefore 2. The strategy will look at the value of the close each time a candle ends. The current candle closes with a close equal to 15.5. As the variation from the previous high is only 1.5 (which is less than the box size), the same box is added next to the previous one. The next candle closes at 16.2. The price variation is therefore 2.2 compared with the previous high. We can now add a new green box just above the previous one, with a low of 14 and a high of 16. The same process applies if the candle's close is at least one box size below the low of the last box. In this case, a new red box is placed below the previous one.
PARAMETERS :
Source : Allows you to specify which data will be taken into account by the strategy when performing calculations. The default is close.
Box size : Size of Renko graph boxes. This is a very important parameter to choose carefully, as it has a strong impact on the strategy's performance. Defaults to 10.
Fixed Ratio : This is the amount of gain or loss at which the order quantity is changed. The default is 400, meaning that for each $400 gain or loss, the order size is increased or decreased by a user-selected amount.
Increasing Order Amount : This is the amount to be added to or subtracted from orders when the fixed ratio is reached. The default is $200, which means that for every $400 gain, $200 is reinvested in the strategy. On the other hand, for every $400 loss, the order size is reduced by $200.
Initial capital : $1000
Fees : Interactive Broker fees apply to this strategy. They are set at 0.18% of the trade value.
Slippage : 3 ticks or $0.03 per trade. Corresponds to the latency time between the moment the signal is received and the moment the order is executed by the broker.
Important : A bot has been used to test all possible box sizes to find out which one generates the highest return on BITSTAMP:LTCUSD while limiting the drawdown. This strategy is the most optimal with a box size equal to 5.08 in 8h timeframe.
BUY AND SHORT SIGNALS :
As the aim of this strategy is to follow major trends based on price movements, we need to be on the right side of price fluctuation. We trade every box reversal, i.e. we are LONG when the boxes are green indicating an uptrend and SHORT when they are red indicating a downtrend.
RISK MANAGEMENT :
This strategy can incur losses. The size of the box is decisive, as it is used to plot the RENKO chart and thus trigger buy or sell signals. It's also what allows us to manage risk. For every trade, we risk a maximum amount equal to 2 times the size of the box, i.e. :(5.08*2*nb_contract)/trade_value.
MONEY MANAGEMENT :
The fixed ratio method has been used to manage our gains and losses. For each gain of an amount equal to the value of the fixed ratio, we increase the order size by a value defined by the user in the "Increasing order amount" parameter. Similarly, each time we lose an amount equal to the value of the fixed ratio, we decrease the order size by the same user-defined value. This strategy not only increases our performance, but also our drawdown.
Enjoy the strategy and don't forget to take the trade :)
Global Leaders M2Introducing the Global Leaders M2 Indicator
The Global Leaders M2 indicator is a comprehensive tool designed to provide you with crucial insights into the money supply (M2) of the world's top 10 economic powerhouses. This powerful indicator offers a wealth of information to help you make informed decisions in the financial markets.
Key Features:
Multi-Country M2 Data: Access M2 data for the world's top 10 economic leaders, including China, the United States, Japan, Germany, the United Kingdom, France, Italy, Canada, Russia, and India.
Rate of Change Analysis: Understand the rate of change in M2 data for each country and the overall global aggregate, allowing you to gauge the momentum of monetary supply.
Customizable Display: Tailor your chart to display the data of specific countries, or focus on the total global M2 value based on your preferences.
Currency Selection: Choose your preferred currency for displaying the M2 data, making it easier to work with data in your currency of choice.
Interactive Overview Table: Get an overview of M2 data for each country and the global total in an interactive table, complete with color-coded indicators to help you quickly spot trends.
Precision and Clarity: The indicator provides precision to two decimal places and uses color coding to differentiate between positive and negative rate of change.
Whether you're a seasoned investor or a newcomer to the world of finance, the Global Leaders M2 indicator equips you with valuable data and insights to guide your financial decisions. Stay on top of global monetary supply trends, and trade with confidence using this user-friendly and informative tool.
Portfolio PnL Tracker
This is a personal portfolio tracker that helps you track your daily profits and losses. You can track up to 64 stocks or cryptocurrencies. You can set them by specifying the symbol and average price.
FEATURES
- Set up to 64 stock or crypto symbols.
- Shows the average price line
- Show profit or loss as a percentage
- Shows only when on the chart that matches the symbol settings.
HOW TO USE
1. Double click the PnL Tracker indicator at the top left of the chart
2. Enter your symbol and average cost
The average cost line shows your current position.
PnL is calculated based on the average cost you input.
The Profit and Loss (PnL) box and the average cost line will only be displayed when your input symbol matches the chart you are currently viewing.
Thunderbird BoSThe Thunderbird BoS script is meticulously crafted for those who thrive on higher timeframes (daily, weekly, monthly) and aim to capture the significant moves and trends in the market.
What does the Thunderbird BoS script do?
Breakouts are pivotal moments in investing, and the Thunderbird BoS script is your ally in identifying them. Here's how:
Breakout Detection: The script springs into action when there's a breakout of a specific Donchian setting, producing a signal.
Visual Aids: It doesn't just stop at signals. The script visually displays entry, stop, and compound levels right on your chart. This feature is especially handy when you hover over a bar, as it allows you to see levels from past signals, no matter how far back in time.
Trend Confirmation: The script is adept at producing entry signals in both confirmed bull and bear trends.
Filtering the Noise: Using the Donchian logic, the script confirms end-of-day entry points in a long-term trend and efficiently filters out fake breakouts and entry points in a sideways market.
How does BoS work?
The BoS is a product of meticulous calculations:
Breakout Signal: Upon detecting a breakout signal, the entry-level is determined. For a bullish breakout, it's calculated a specific % above the high, and for a bearish breakout, a specific % below.
Stop Calculation: Using the Average True Range (ATR) over a number of specific days, the stop loss is set below the entry for long positions and above for short positions.
Compound Levels: The compound level is also determined using an ATR formula above the entry for long positions and below for short ones.
What's the ideal timeframe for this script?
The Thunderbird BoS script is tailor-made for the daily timeframe. This ensures that breakout signals are derived from a comprehensive view of the market's movements.
What sets the Thunderbird BoS script apart?
The uniqueness of the Thunderbird BoS script lies in its:
Historical Insight: The ability to view levels from past signals by simply hovering over a bar. This feature aids in analysing entry levels from any point in the past and is displayed seamlessly in the data window.
Precision for Daily Timeframe: The script is specifically coded for the daily timeframe to:
Pinpoint the onset of potential long-term trends.
Confirm entry points at the end of the trading day, effectively filtering out intraday distractions.
Minimise the chances of fake breakouts in a trend.
Continuously generate entry points as the trend evolves, facilitating compounding.
Efficiently filter out breakouts in a sideways market.
In essence, the Thunderbird BoS script is an investor's tool for focusing on the quality of potential positions when investing in long-term market trends. It's not just about identifying trends; it's about making informed decisions based on them.
Thunderbird PoCWhat kind of traders/investors are we?
We are trend followers. Our scripts are designed to be used on the higher timeframes (daily/weekly/monthly) to catch significant moves/trends in the market. While many are aware of the power of trend following, not all have the tools to execute it effectively. Our scripts are tailored to pinpoint and capitalise on long-term market trends.
What does this script do?
The Thunderbird PoC is a tool for investors looking to capitalise on breakout opportunities. When a breakout of the Donchian occurs, the script produces a signal. This signal is then used to display the entry, stop, and compound levels in the data window. One of its standout features is its ability to show levels for the bar where the mouse is hovering. This allows investors to analyse entry levels from past signals retrospectively. All this information is also conveniently displayed in the data window.
How is the PoC produced?
The PoC is meticulously calculated using a formula the encapsulates ATR. Upon a breakout signal, an entry-level is determined. For a bullish breakout, the entry is set a fixed % leve above the high, and for a bearish breakout, at a fixed % level below. The stop loss level is then calculated by using the ATR formula below the entry for long positions and above for short positions. The compound level is also set using an ATR formula above the entry for long positions and below for short ones.
What is the best timeframe to use the script?
The Thunderbird PoC is optimised for the daily timeframe. This is where the breakout signals are most effective and reliable. By focusing on the daily timeframe, investors can capture significant market movements and avoid the noise of shorter timeframes.
What makes this script unique?
The Thunderbird PoC stands out in its ability to provide investors with a retrospective view of the market. By allowing users to see the levels for the bar where the mouse is, it offers a unique perspective on past signals, enabling investors to learn and adapt from historical data. This feature, combined with its detailed display in the data window, makes it an invaluable tool for those looking to use trend-following techniques.
This tool removes the need of manually having to calculate the entry, stop loss, compound and risk-free levels yourself.
This script has been coded specifically for the daily timeframe to:
Highlight the start of potential long-term trends.
Confirm entry points at the end of the trading day, absorbing intraday noise.
Reduce fake breakouts in a trend.
Continue to create entry points as the trend develops to allow for compounding.
Filter out breakouts in a sideways market.
This entry signal script helps investors focus on the quality of a potential position when investing in long-term market trends.
Portfolio HeatThe "Portfolio Heat" indicator offers a visual representation of potential risk exposure for a portfolio across up to eight different symbols. It dynamically calculates three risk metrics based on current price, the number of shares owned, your designated stop loss, and total account size.
Open Dollar Risk – the total dollar amount you will lose if your stop loss is hit.
Open % of Portfolio Risk – the risk as a percentage of your total account size.
Starting Capital Risk – the dollar amount risked based on the difference between the entry price and stop price.
These metrics adjust in real-time, allowing you to monitor and manage risk more effectively.
Open portfolio heat refers to how much you would lose if all your currently held stock positions hit their stop-losses, whether those stop-losses are below what you paid for them - referred to as your “cost basis” - at your cost basis (breakeven) or above your cost basis (in the money). Admittedly, it’s a pretty bad day when all your stops are hit at once, but as traders we need to prepare for the worst. To visualize what “open heat” looks like on a single stock position, please note the chart below:
In the example above you can see that if you were to purchase 100 shares of this stock at a cost-basis of $18/share, and your stop-loss is placed at $15, if the current price of the stock is at $20 and the stock price drops to hit your stop-loss, it would result in a $500 total drawdown in your portfolio. Keep in mind this is just one stock position. Hypothetically, if you were even holding two stocks that had the above open heat, with a $10,000 account size, you could experience a 10% drawdown quite fast if the market corrects.
The “Portfolio Heat” indicator is fully customizable allowing traders to select the number of positions in the portfolio, colors and a detailed or a summary view of risk.
Note if entering a short position, you will enter the number of shares owned as a negative number.
Curved Management (Zeiierman)█ Overview
The Curved Management (Zeiierman) is a trade management indicator tailored for traders looking to visualize their entry, stop loss, and take profit levels. Unique in its design, this indicator doesn't just display lines; it offers rounded or curved visualizations, setting it apart from conventional tools.
█ How It Works
At its core, this indicator leverages the power of the Average True Range (ATR), a metric for volatility, to establish logical stop-loss levels based on recent price action. By incorporating the ATR, the tool dynamically adapts to the market's changing volatility. What sets it apart is the unique curved visualization. Instead of the usual straight lines representing entry/sl levels, users can choose between rounded and straight edges for their take profit and stop loss levels. This aesthetic tweak gives the chart a cleaner look and offers a more intuitive understanding of risk management.
█ How to Apply the Indicator
Upon initially loading the indicator, a label appears that reads, "Set the 'xy' time and price for 'Curved Management (Zeiierman).'" This prompts you to click on the chart at your entry point. After selecting your entry point on the chart, the indicator will load. Ensure you adjust the trend direction in the settings panel based on whether you took a long or short position.
█ How to Use
Use the tool to manage your active position.
Long Entry
Short Entry
█ Settings
The indicator comes packed with various settings allowing customization:
Trade Direction
Decide the direction of the trade (long/short).
Reward multiplier
Sets the ratio for take profit relative to stop loss. Increasing this value will set your take profit further from the entry, and decreasing it will bring it closer.
Risk multiplier
Multiplier for calculating stop loss based on the ATR value. Increasing this makes your stop loss further from the entry, while decreasing brings it closer.
█ Related Free Scripts
Trade & Risk Management Tool
-----------------
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!
Risk Reward Optimiser [ChartPrime]█ CONCEPTS
In modern day strategy optimization there are few options when it comes to optimizing a risk reward ratio. Users frequently need to experiment and go through countless permutations in order to tweak, adjust and find optimal in their data.
Therefore we have created the Risk Reward Optimizer.
The Risk Reward Optimizer is a technical tool designed to provide traders with comprehensive insights into their trading strategies.
It offers a range of features and functionalities aimed at enhancing traders' decision-making process.
With a focus on comprehensive data, it is there to help traders quickly and efficiently locate Risk Reward optimums for inbuilt of custom strategies.
█ Internal and external Signals:
The script can optimize risk to reward ratio for any type of signals
You can utilize the following :
🔸Internal signals ➞ We have included a number of common indicators into the optimizer such as:
▫️ Aroon
▫️ AO (Awesome Oscillator)
▫️ RSI (Relative Strength Index)
▫️ MACD (Moving Average Convergence Divergence)
▫️ SuperTrend
▫️ Stochastic RSI
▫️ Stochastic
▫️ Moving averages
All these indicators have 3 conditions to generate signals :
Crossover
High Than
Less Than
🔸External signal
▫️ by incorporating your own indicators into the analysis. This flexibility enables you to tailor your strategy to your preferences.
◽️ How to link your signal with the optimizer:
In order to be able to analysis your signal we need to read it and to do so we would need to PLOT your signal with a defined value
plot( YOUR LONG Condition ? 100 : 0 , display = display.data_window)
█ Customizable Risk to Reward Ratios:
This tool allows you to test seven different customizable risk to reward ratios , helping you determine the most suitable risk-reward balance for your trading strategy. This data-driven approach takes the guesswork out of setting stop-loss and take-profit levels.
█ Comprehensive Data Analysis:
The tool provides a table displaying key metrics, including:
Total trades
Wins
Losses
Profit factor
Win rate
Profit and loss (PNL)
This data is essential for refining your trading strategy.
🔸 It includes a tooltip for each risk to reward ratio which gives data for the:
Most Profitable Trade USD value
Most Profitable Trade % value
Most Profitable Trade Bar Index
Most Profitable Trade Time (When it occurred)
Position and size is adjustable
█ Visual insights with histograms:
Visualize your trading performance with histograms displaying each risk to reward ratio trade space, showing total trades, wins, losses, and the ratio of profitable trades.
This visual representation helps you understand the strengths and weaknesses of your strategy.
It offers tooltips for each RR ratio with the average win and loss percentages for further analysis.
█ Dynamic Highlighting:
A drop-down menu allows you to highlight the maximum values of critical metrics such as:
Profit factor
Win rate
PNL
for quick identification of successful setups.
█ Stop Loss Flexibility:
You can adjust stop-loss levels using three different calculation methods:
ATR
Pivot
VWAP
This allows you to align risk-reward ratios with your preferred risk tolerance.
█ Chart Integration:
Visualize your trades directly on your price chart, with each trade displayed in a distinct color for easy tracking.
When your take-profit (TP) level is reached , the tool labels the corresponding risk-reward ratio for that specific TP, simplifying trade management.
█ Detailed Tooltips:
Tooltips provide deeper insights into your trading performance. They include information about the most profitable trade, such as the time it occurred, the bar index, and the percentage gain. Histogram tooltips also offer average win and loss percentages for further analysis.
█ Settings:
█ Code:
In summary, the Risk Reward Optimizer is a data-driven tool that offers traders the ability to optimize their risk-reward ratios, refine their strategies, and gain a deeper understanding of their trading performance. Whether you're a day trader, swing trader, or investor, this tool can help you make informed decisions and improve your trading outcomes.
S&P Sector PerformanceS&P Sector Performance calculate and display the logarithmic returns of SPX and each S&P Sector for a predefined timeframe or for a custom date.
IU SIP CALCULATORHow This Indicator Script Works:
1. This indicator script calculate the monthly SIP returns of any market over any user defined period.
2. SIP stands for Systematic Investment Plan. It is a way to invest in any asset by regularly investing a fixed amount of money at regular intervals for example Monthly, Weekly, Quarterly etc.
3. This indicator Calculate the following
# Average buy price
# Total quantity hold
# Yearly returns
# Monthly returns
# Total invested amount
# Total profits in amount
# Total portfolio value
# Total returns in per percentage term.
4. This script takes monthly SIP amount, starting month, starting year, ending year, ending month from the user and store the value for calculations.
5. After that it store the open price of every month into an array then it average the array and compare that price with the last month close price.
6. on the bases of this it performs all of the calculations.
7. The script plot every calculation into an table from.
8. It requires monthly chart timeframe for working.
9. The table is editable user can change the color and transparency.
How User Can Benefit From The Script:
1. User can get the past monthly SIP returns of any market he wants to invest this will give him an overview about what to expect from the market.
2. Once user understand the expected returns from the market he can adjust his investment strategy.
3. This help the user to Analyse various stocks and their past performance.
4. User can also short list the best performed stocks.
5. Over all this script will give complete SIP vision of any market.
Bonsai BX (Backtester)In today's trading landscape, traders need precision and deep analytical tools to navigate the sea of strategies. The Bonsai Backtester is one such tool, meticulously designed to evaluate multiple trading strategies in an integrated manner.
═════════════════════════════════════════════════════════════════════════
🌳 Bonsai BX 🌳 Universal Strategy Testing
📘 Overview
A product of collaboration with the Bonsai community, this backtester is both a reflection of collective insights and a means to provide traders with data-driven insights on TradingView.
📌 Current Backtest
• Dataset: BTCUSD daily candles from Coinbase, starting from March 2015.
• Source Signals: The Bonsai indicator signals are employed for both long and short entries. These are directly visible on the publication chart.
• Trading Assumptions:
• Initial Capital: $1,000
• Maximum Position Size: 10% of equity per trade
• Stop Loss: 10% per position
• Commission: 0.1%
• Slippage: 100 ticks (1.00)
🛠 Key Features
The Bonsai BX is equipped with a range of features aimed at providing traders with a more comprehensive analysis environment:
Features on Chart
• External Indicator Adaptability: Easily incorporate signals from both built-in and custom TradingView indicators.
• Snapshot Table: Delivers on-the-spot insights into crucial strategy performance metrics, including equity, open profit, position size, and entry price. While these details are available in TradingView's 'Performance Summary' panel, we've integrated them directly onto the chart for a more streamlined and accessible viewing experience.
• Trade Labels: Visualize profit metrics for individual trades directly on the chart, allowing for a more immediate grasp of trade outcomes.
• Long & Short Behaviors: Modify long behaviors to either open new long positions while closing short ones, or simply to close short positions. Conversely, for short behaviors, opt to either initiate new short positions while closing any active long ones or simply close long positions.
• Multiple Signals Integration: The tool can currently handle up to three different external signals for long and short trades.
• Condition-based Initiation: Define whether longs and shorts are triggered when 'All Conditions Met' or just 'Any Single Condition Met'. This flexibility allows for a more nuanced trading approach. For example, if you're using a trade signal alongside the RSI, you can specify that a long position should only open when the trade signal is active and the RSI is below 30 at the same time. This lets you combine multiple signals or conditions for more precise trade initiation.
• TP & SL Customization:
• Single TP: Set a specific Take Profit percentage.
• SL: Define a Stop Loss percentage and choose between a standard or trailing stop.
• Trail From: Specify the starting point of the trailing stop, be it the breakeven point or a certain percentage.
• Interface Theme: Users can select between light and dark themes for their interface.
Performance and Trailing
🎛 Using Bonsai BX
1. Add it to your TradingView chart.
2. Adjust script parameters and settings. Integrate external indicator signals as needed.
3. Activate the backtester to refine trading strategies.
Backtester Settings Menu
🪝 Webhook (Beta)
The Webhook functionality, now in beta, augments the Bonsai BX utility. This feature offers a more intuitive method for users to direct webhooks to trading bots, exchanges, and brokers. It simplifies the process by eliminating the need to adjust JSON structures or other payload formats, making alert automation more accessible.
📜 Feedback & Community
The feedback from the Bonsai community has been instrumental in the tool's development and will continue to shape its evolution. As part of our commitment to adaptive, smart trading, this script will continually be updated to meet the ever-changing requirements of traders.
❗️ Disclaimer
Backtesting tools, including the Bonsai BX , simulate trading strategies based on historical data. The following key points should be kept in mind:
1. Past Performance is Not Predictive: While backtesting can offer insights, it's essential to understand that past performance does not guarantee or predict future results. Historical data might not account for future market changes or unforeseen events.
2. External Influences: Market outcomes can be significantly influenced by various external factors like geopolitical events, economic announcements, and sudden shifts in market sentiment. Such factors are often not considered in backtesting simulations.
3. Market Dynamics: Elements like market volatility, liquidity constraints, and slippage can drastically alter expected outcomes. These dynamics might not always be accurately represented in backtest simulations.
4. Limitations of Simulated Trades: Backtesting operates under the assumption that historical trends and patterns will replicate. However, market conditions evolve, and what worked in the past might not necessarily be viable in the future.
5. Informed Decisions: Always base your trading decisions on a mix of comprehensive research, current market analysis, and risk assessment. Relying solely on backtested results can lead to misconstrued perceptions and potential pitfalls.
Trading involves risks, and it's crucial to be fully informed and cautious before making any investment decisions. Always consider seeking advice from financial experts or professionals when in doubt.
Abz US Real ratesThis indicator shows Fed Funds Rate vs US inflation. It also shows the US 10 year bond yield and provides a color indication that aims to indicate if this is a period where owning TLT is a good idea or not. It is not investment advice and it is only aiming to indicate whether the trend is supportive or not for long dated US bonds in comparison with short dated treasury bills and versus inflation.
Recessions: Recessions are indicated by a grey background.
Yield inversion: Periods where the Fed Funds Rate is above the US 10 year bond yield are shown as a maroon background and frequently are macro indicators of an upcoming recession. Like other macro signals, this can't be relied upon as a timing tool.
This is intended to be used as an indictor on a long term chart. Minimum would be weekly but could be even more valid to focus on a chart with monthly candles.
Forex & Stock Daily WatchList And Screener [M]Hi, this is a watchlist and screener indicator for Forex and Stocks.
This indicator is designed for traders who trade in the forex markets and monitor developments in indices and other currency pairs.
It includes information on 14 indices such as the volatility index, Baltic dry index, etc. You can customize the indices as you wish. The indices table contains the index's price (or points), daily change, stochastic value, and trend direction.
The second table is designed for trading forex and stock currency pairs.
In this table, you will find information such as price, volume, change, stochastic, RSI, trend direction, and MACD result for all traded pairs. You can customize all the currency pairs in this table as you wish, and you can also tailor the oscillator settings to your preferences.
In the settings section, you can use checkboxes to hide the pairs in both tables.
The "Customize" section in the settings allows you to personalize the table appearances according to your preferences.