Buffett Quality Score [Energy]The Buffett Quality Score for the Energy sector is designed to meticulously evaluate the financial health and quality of companies operating within this dynamic industry. Each selected financial ratio is specifically chosen based on its relevance and significance within the Energy sector context.
Selected Financial Ratios and Criteria:
1. Return on Assets (ROA) > 5%
Relevance: In the Energy sector, where asset-intensive operations are common (e.g., oil exploration and infrastructure), a robust ROA above 5% indicates efficient asset utilization, crucial for profitability.
2. Debt to Equity Ratio < 1.0
Relevance: Energy companies often require substantial capital for projects and operations. A low Debt to Equity Ratio (<1.0) suggests prudent financial management with less reliance on debt financing, vital in a capital-intensive industry vulnerable to economic cycles.
3.Interest Coverage Ratio > 3.0
Relevance: Given the capital-intensive nature of Energy projects, maintaining a healthy Interest Coverage Ratio (>3.0) ensures the company's ability to service debt obligations, particularly important during periods of economic volatility affecting commodity prices.
4. Gross Margin % > 25%
Relevance: Energy companies face varying production costs and pricing pressures. A Gross Margin exceeding 25% reflects efficient cost management and pricing power, critical in mitigating volatility in commodity prices.
5. Current Ratio > 1.5
Relevance: Energy projects often require substantial working capital. A Current Ratio > 1.5 indicates sufficient liquidity to cover short-term obligations, essential for operational continuity in an industry susceptible to market fluctuations.
6. EBITDA Margin % > 15%
Relevance: Energy companies must manage operating costs effectively. An EBITDA Margin > 15% signifies strong operational efficiency and profitability, crucial for sustaining growth amidst market uncertainties.
7. Altman Z-Score > 2.0
Relevance: The Energy sector experiences cyclical downturns and price volatility. An Altman Z-Score > 2.0 indicates financial stability and resilience, vital for weathering industry-specific challenges.
8. EPS Basic One-Year Growth % > 5%
Relevance: Energy companies' earnings growth is closely tied to commodity prices and market demand. EPS growth > 5% indicates positive momentum and adaptability to industry shifts.
9. Revenue One-Year Growth % > 5%
Relevance: Energy companies operate in a dynamic market influenced by geopolitical factors and global demand. Revenue growth > 5% reflects market adaptability and expansion potential.
10. Piotroski F-Score > 6
Relevance: Fundamental strength is paramount in the Energy sector, characterized by capital-intensive projects. A Piotroski F-Score > 6 highlights solid operational and financial performance, critical for long-term sustainability.
Score Interpretation:
0-4 Points: Indicates potential weaknesses across critical financial areas, necessitating closer scrutiny.
5 Points: Suggests average performance based on industry-specific criteria.
6-10 Points: Signifies strong overall financial health and quality, aligning with the demanding requirements of the Energy sector.
Development and Context:
The selection and weighting of these specific financial metrics underwent rigorous industry-specific research to ensure their applicability and reliability within the unique operational environment of the Energy sector. This scoring framework aims to provide actionable insights for stakeholders navigating the complexities of Energy industry investments and operations.
Disclaimer: This information serves as an educational resource on financial evaluation methodology tailored for the Energy sector. It does not constitute financial advice or a guarantee of future performance. Consult qualified professionals for personalized financial guidance based on your specific circumstances and investment objectives.
Statistics
Buffett Quality Score [Industry]The Buffett Quality Score is a composite indicator developed to assess the financial health and quality of companies operating within the Industrial sector. It combines a carefully selected set of financial ratios, each weighted with specific thresholds, to provide a comprehensive evaluation of company performance.
Selected Financial Ratios and Criteria:
1. Return on Assets (ROA) > 5%
ROA measures a company's profitability by evaluating how effectively it utilizes its assets. An ROA exceeding 5% earns 1 point.
2. Debt to Equity Ratio < 1.0
The Debt to Equity Ratio reflects a company's leverage. A ratio below 1.0 earns 1 point, indicating lower reliance on debt financing.
3. Interest Coverage Ratio > 3.0
The Interest Coverage Ratio assesses a company's ability to meet interest payments. A ratio above 3.0 earns 1 point, indicating strong financial health.
4. Gross Margin % > 25%
Gross Margin represents the profitability of sales after deducting production costs. A margin exceeding 25% earns 1 point, indicating better pricing power.
5. Current Ratio > 1.5
The Current Ratio evaluates a company's liquidity by comparing current assets to current liabilities. A ratio above 1.5 earns 1 point, indicating sufficient short-term liquidity.
6. EBITDA Margin % > 15%
EBITDA Margin measures operating profitability, excluding non-operating expenses. A margin exceeding 15% earns 1 point, indicating efficient operations.
7. Altman Z-Score > 2.0
The Altman Z-Score predicts bankruptcy risk based on profitability, leverage, liquidity, solvency, and activity. A score above 2.0 earns 1 point, indicating financial stability.
8. EPS Basic One-Year Growth % > 5%
EPS One-Year Growth reflects the percentage increase in earnings per share over the past year. Growth exceeding 5% earns 1 point, indicating positive earnings momentum.
9. Revenue One-Year Growth % > 5%
Revenue One-Year Growth represents the percentage increase in revenue over the past year. Growth exceeding 5% earns 1 point, indicating healthy sales growth.
10. Piotroski F-Score > 6
The Piotroski F-Score evaluates fundamental strength based on profitability, leverage, liquidity, and operating efficiency. A score above 6 earns 1 point, indicating strong fundamental performance.
Score Calculation Process:
Each company is evaluated against these criteria.
For every criterion met or exceeded, 1 point is assigned.
The total points accumulated determine the Buffett Quality Score out of a maximum of 10.
Interpretation of Scores:
0-4 Points: Indicates potential weaknesses across multiple financial areas.
5 Points: Suggests average performance based on the selected criteria.
6-10 Points: Signifies strong overall financial health and quality, meeting or exceeding most of the performance thresholds.
Research and Development:
The selection and weighting of these specific financial ratios underwent extensive research to ensure relevance and applicability to the Industrial sector. This scoring methodology aims to provide valuable insights for investors and analysts seeking to evaluate company quality and financial robustness within the Industrial landscape.
The information provided about the Buffett Quality Score is for educational purposes only. This document serves as an illustrative example of financial evaluation methodology and should not be construed as financial advice, investment recommendation, or a guarantee of future performance. Actual results may vary based on individual circumstances and specific factors affecting each company. We recommend consulting qualified professionals for personalized financial advice tailored to your individual situation.
Seasonality Widget [LuxAlgo]The Seasonality Widget tool allows users to easily visualize seasonal trends from various data sources.
Users can select different levels of granularity as well as different statistics to express seasonal trends.
🔶 USAGE
Seasonality allows us to observe general trends occurring at regular intervals. These intervals can be user-selected from the granularity setting and determine how the data is grouped, these include:
Hour
Day Of Week
Day Of Month
Month
Day Of Year
The above seasonal chart shows the BTCUSD seasonal price change for every hour of the day, that is the average price change taken for every specific hour. This allows us to obtain an estimate of the expected price move at specific hours of the day.
Users can select when data should start being collected using the "From Date" setting, any data before the selected date will not be included in the calculation of the Seasonality Widget.
🔹 Data To Analyze
The Seasonality Widget can return the seasonality for the following data:
Price Change
Closing price minus the previous closing price.
Price Change (%)
Closing price minus the previous closing price, divided by the
previous closing price, then multiplied by 100.
Price Change (Sign)
Sign of the price change (-1 for negative change, 1 for positive change), normalized in a range (0, 100). Values above 50 suggest more positive changes on average.
Range
High price minus low price.
Price - SMA
Price minus its simple moving average. Users can select the SMA period.
Volume
Amount of contracts traded. Allow users to see which periods are generally the most /least liquid.
Volume - SMA
Volume minus its simple moving average. Users can select the SMA period.
🔹 Filter
In addition to the "From Date" threshold users can exclude data from specific periods of time, potentially removing outliers in the final results.
The period type can be specified in the "Filter Granularity" setting. The exact time to exclude can then be specified in the "Numerical Filter Input" setting, multiple values are supported and should be comma separated.
For example, if we want to exclude the entire 2008 period we can simply select "Year" as filter granularity, then input 2008 in the "Numerical Filter Input" setting.
Do note that "Sunday" uses the value 1 as a day of the week.
🔶 DETAILS
🔹 Supported Statistics
Users can apply different statistics to the grouped data to process. These include:
Mean
Median
Max
Min
Max-Min Average
Using the median allows for obtaining a measure more robust to outliers and potentially more representative of the actual central tendency of the data.
Max and Min do not express a general tendency but allow obtaining information on the highest/lowest value of the analyzed data for specific periods.
🔶 SETTINGS
Granularity: Periods used to group data.
From Data: Starting point where data starts being collected
🔹 Data
Analyze: Specific data to be processed by the seasonality widget.
SMA Length: Period of the simple moving average used for "Price - SMA" and "Volume - SMA" options in "Analyze".
Statistic: Statistic applied to the grouped data.
🔹 Filter
Filter Granularity: Period type to exclude in the processed data.
Numerical Filter Input: Determines which of the selected hour/day of week/day of month/month/year to exclude depending on the selected Filter Granularity. Only numerical inputs can be provided. Multiple values are supported and must be comma-separated.
Simple Volatility MomentumOverview:
The Simple Volatility Momentum indicator calculates the mean and standard deviation of the changes of price (returns) using various types of moving averages (Incremental, Rolling, and Exponential). With quantifying the dispersion of price data around the mean, statistical insights are provided on the volatility and the movements of price and returns. The indicator also ranks the mean absolute value of the changes of price over a specified time period which helps you assess the strength of the "trend" and "momentum" regardless of the direction of returns.
Simple Volatility Momentum
This indicator can be used for mean reversion strategies and "momentum" or trend based strategies.
The indicator calculates the average return as the momentum metric and then gets the moving average of the average return and standard deviations from average return average. On the options you can determine if you want to use 1 or 2 standard deviation bands or have both of them enabled.
Settings:
Source: By default it's at close.
M Length: This is the length of the "momentum".
Rank Length: This is the length of the rank calculation of absolute value of the average return
MA Type: This is the different type of calculations for the mean and standard deviation. By default its at incremental.
Smoothing factor: (Only used if you choose the exponential MA type.)
The absolute value of the average return helps you see the strength of the "momentum" and trend. If there is a low ranking of the absolute value of the average return then you can eventually expect it to increase which means that the average return is trending, leading to trending price moves. If the Mean ABS rank value is at or near the maximum value 100 and the average return is at -2 standard deviation from the mean, you can see it as the negative momentum or trend being "finished". Similarly, if the Mean ABS value is near or at the maximum value 100 and the average return is at +2 standard deviation from the mean, you can view the uptrend, as "finished" and the Mean ABS rank can't really go higher than 100.
Moving Average Calculations type:
Incremental: Incremental moving averages use an incremental approach to update the moving average by adding the newest data point and subtracting the oldest one.
Exponential: The exponential moving average gives more weight to recent data points while still considering older ones. This is achieved by applying a smooth factor to the previous EMA value and the current data point. EMA's react more quickly to recent changes in the data compared to simple moving averages, making them useful for short term trends and momentum in financial markets.
Rolling: The moving average is calculated by taking the average of a fixed number of data points within a defined window. As new data becomes available, the window moves forward and the average is recalculated. Rolling Moving Averages are useful for smoothing out short-fluctuations and identifying trends over time.
Important thing to note about indicators involving bands and "momentum" or "trend" or prices:
For the explanation we will assume that stock returns follow a normal distribution and price follows a log normal distribution. Please note that in the live market this assumption isn't always true. Many people incorrectly use standard deviations on prices and trade them as mean reversion strategies or overbought or oversold levels which is not what standard deviations are meant for. Assuming you have applied the log transformation on the standard deviation bands (if your input is raw price then you should use a log transformation to remove the skewness of price), and you have a range of 2 standard deviations from the mean, under the empirical rule with enough occurrences 95% of the values will be within the 2 standard deviation range. This doesn't mean that if price falls to the bottom of the 2 standard deviation bound, there is a 95% chance it will revert back to mean, this is incorrect and not how standard deviations or mean reversion works.
"MOMENTUM"
In finance "momentum" refers to the rate of change of a time series data point. It shows the persistence or tendency for a data series to continue moving in its current direction. In finance, "momentum" based strategies capitalize on the observed tendency of assets that have performed well (or poorly) in the recent past to continue performing well (or poorly) in the near future. This persistence is often observed in various financial instruments including stocks, currencies and commodities.
"Momentum" is commonly calculated with the average return, and relies on the assumption that assets with positive "momentum" or a positive average return will likely continue to perform well in the short to medium term, while assets with a negative average return are expected to continue underperforming. This average return or expected value is derived from historical observations and statistical analysis of previous price movements. However, real markets are subject to levels of efficiencies, market fluctuations, randomness, and may not always produce consistent returns over time involving momentum based strategies.
Mean Reversion:
In finance, the average return is an important parameter in mean reversion strategies. Using statistical methodologies, mean reversion strategies aim to exploit the deviations from the historical average return by identifying instances where current prices and their changes diverge from their expected levels based on past performance. This approach involves statistical analysis and predictive modelling techniques to check where and when the average rate of change is likely to revert towards the mean. It's important to know that mean reversion is a temporary state and will not always be present in a specific timeseries.
Using the average return over price offers several advantages in finance and trading since it is less sensitive to extreme price movements or outliers compared to raw price data. Price itself contains a distribution that is usually positively-skewed and has no upper bound. Mean reversion typically occurs in distributions where extreme values are followed by a tendency for the variable to return towards its mean over time, however the probability distribution of price has no tendency for values to revert towards any specific level. Instead, values may continue to increase without a bound. Returns themself contain more stationary behavior than price levels. Mean reversion strategies rely on the assumption that deviations from the mean will eventually revert back to the mean. Returns, being more likely to exhibit stationary, are better suited for mean reversion based strategies.
The distribution of returns are often more symmetrically distributed around their mean compared to price distributions. This symmetry makes it easier to identify deviations from the mean and assess the likelihood of mean reversion occurrence. Returns are also less sensitive to trends and long-term price movements compared to price levels. Mean reversion strategies aim to exploit deviations from mean, which can be obscured when analyzing raw price data since raw price is almost always trending. Returns can filter out the trend component of price movements, making it easier to identify opportunities.
Stationary Process: Implication that properties like mean and variance remain relatively constant over time.
Profitability Power RatioProfitability Power Ratio
The Profitability Power Ratio is a financial metric designed to assess the efficiency of a company's operations by evaluating the relationship between its Enterprise Value (EV) and Return on Equity (ROE). This ratio provides insights into how effectively a company generates profits relative to its equity and overall valuation.
Qualities and Interpretations:
1. Efficiency Benchmark: The Profitability Power Ratio serves as a benchmark for evaluating how efficiently a company utilizes its equity capital to generate profits. A higher ratio indicates that the company is generating significant profits relative to its valuation, reflecting efficient use of invested capital.
2. Financial Health Indicator: This ratio can be used as an indicator of financial health. A consistently high or improving ratio over time suggests strong operational efficiency and sustainable profitability.
3. Investment Considerations: Investors can use this ratio to assess the attractiveness of an investment opportunity. A high ratio may signal potential for good returns, but it's important to consider the underlying reasons for the ratio's level to avoid misinterpretation.
4. Risk Evaluation: An excessively high Profitability Power Ratio could also signal elevated risk. It may indicate aggressive financial leveraging or unsustainable growth expectations, which could pose risks during economic downturns or market fluctuations.
Interpreting the Ratio:
1. Higher Ratio: A higher Profitability Power Ratio typically signifies efficient capital utilization and strong profitability relative to the company's valuation.
2. Lower Ratio: A lower ratio may suggest inefficiencies in capital allocation or lower profitability relative to enterprise value.
3. Benchmarking: Compare the company's ratio with industry peers and historical performance to gain deeper insights into its financial standing and operational efficiency.
Using the Indicator:
The Profitability Power Ratio is plotted on a chart to visualize trends and fluctuations over time. Users can customize the color of the plot to emphasize this metric and integrate it into their financial analysis toolkit for comprehensive decision-making.
Disclaimer: The Profitability Power Ratio is a financial metric designed for informational purposes only and should not be considered as financial or investment advice. Users should conduct thorough research and analysis before making any investment decisions based on this indicator. Past performance is not indicative of future results. All investments involve risks, and users are encouraged to consult with a qualified financial advisor or professional before making investment decisions.
Dividend-to-ROE RatioDividend-to-ROE Ratio Indicator
The Dividend-to-ROE Ratio indicator offers valuable insights into a company's dividend distribution relative to its profitability, specifically comparing the Dividend Payout Ratio (proportion of earnings as dividends) to the Return on Equity (ROE), a measure of profitability from shareholder equity.
Interpretation:
1. Higher Ratio: A higher Dividend-to-ROE Ratio suggests a stable dividend policy, where a significant portion of earnings is returned to shareholders. This can indicate consistent dividend payments, often appealing to income-seeking investors.
2. Lower Ratio: Conversely, a lower ratio implies that the company retains more earnings for growth, potentially signaling a focus on reinvestment for future expansion rather than immediate dividend payouts.
3. Excessively High Ratio: An exceptionally high ratio may raise concerns. While it could reflect a generous dividend policy, excessively high ratios might indicate that a company is distributing more earnings than it can sustainably afford. This could potentially hinder the company's ability to reinvest in its operations, research, or navigate economic downturns effectively.
Utility and Applications:
The Dividend-to-ROE Ratio can be particularly useful in the following scenarios:
1. Income-Oriented Investors: For investors seeking consistent dividend income, a higher ratio signifies a company's commitment to distributing profits to shareholders, potentially aligning with income-oriented investment strategies.
2. Financial Health Assessment: Analysts and stakeholders can use this ratio to gauge a company's financial health and dividend sustainability. It provides insights into management's capital allocation decisions and strategic focus.
3. Comparative Analysis: When comparing companies within the same industry, this ratio helps in benchmarking dividend policies and identifying outliers with unusually high or low ratios.
Considerations:
1. Contextual Analysis: Interpretation should be contextualized within industry standards and the company's financial history. Comparing the ratio with peers in the same sector can provide meaningful insights.
2. Financial Health: It's crucial to evaluate this indicator alongside other financial metrics (like cash flow, debt levels, and profit margins) to grasp the company's overall financial health and sustainability of its dividend policy.
Disclaimer: This indicator is for informational purposes only and does not constitute financial advice. Investors should conduct thorough research and consult with financial professionals before making investment decisions based on this ratio.
Fourier Adjusted Average True Range [BackQuant]Fourier Adjusted Average True Range
1. Conceptual Foundation and Innovation
The FA-ATR leverages the principles of Fourier analysis to dissect market prices into their constituent cyclical components. By applying Fourier Transform to the price data, the FA-ATR captures the dominant cycles and trends which are often obscured in noisy market data. This integration allows the FA-ATR to adapt its readings based on underlying market dynamics, offering a refined view of volatility that is sensitive to both market direction and momentum.
2. Technical Composition and Calculation
The core of the FA-ATR involves calculating the traditional ATR, which measures market volatility by decomposing the entire range of price movements. The FA-ATR extends this by incorporating a Fourier Transform of price data to assess cyclical patterns over a user-defined period 'N'. This process synthesizes both the magnitude of price changes and their rhythmic occurrences, resulting in a more comprehensive volatility indicator.
Fourier Transform Application: The Fourier series is calculated using price data to identify the fundamental frequency of market movements. This frequency helps in adjusting the ATR to reflect more accurately the current market conditions.
Dynamic Adjustment: The ATR is then adjusted by the magnitude of the dominant cycle from the Fourier analysis, enhancing or reducing the ATR value based on the intensity and phase of market cycles.
3. Features and User Inputs
Customizability: Traders can modify the Fourier period, ATR period, and the multiplication factor to suit different trading styles and market environments.
Visualization : The FA-ATR can be plotted directly on the chart, providing a visual representation of volatility. Additionally, the option to paint candles according to the trend direction enhances the usability and interpretative ease of the indicator.
Confluence with Moving Averages: Optionally, a moving average of the FA-ATR can be displayed, serving as a confluence factor for confirming trends or potential reversals.
4. Practical Applications
The FA-ATR is particularly useful in markets characterized by periodic fluctuations or those that exhibit strong cyclical trends. Traders can utilize this indicator to:
Adjust Stop-Loss Orders: More accurately set stop-loss orders based on a volatility measure that accounts for cyclical market changes.
Trend Confirmation: Use the FA-ATR to confirm trend strength and sustainability, helping to avoid false signals often encountered in volatile markets.
Strategic Entry and Exit: The indicator's responsiveness to changing market dynamics makes it an excellent tool for planning entries and exits in a trend-following or a breakout trading strategy.
5. Advantages and Strategic Value
By integrating Fourier analysis, the FA-ATR provides a volatility measure that is both adaptive and anticipatory, giving traders a forward-looking tool that adjusts to changes before they become apparent through traditional indicators. This anticipatory feature makes it an invaluable asset for traders looking to gain an edge in fast-paced and rapidly changing market conditions.
6. Summary and Usage Tips
The Fourier Adjusted Average True Range is a cutting-edge development in technical analysis, offering traders an enhanced tool for assessing market volatility with increased accuracy and responsiveness. Its ability to adapt to the market's cyclical nature makes it particularly useful for those trading in highly volatile or cyclically influenced markets.
Traders are encouraged to integrate the FA-ATR into their trading systems as a supplementary tool to improve risk management and decision-making accuracy, thereby potentially increasing the effectiveness of their trading strategies.
INDEX:BTCUSD
INDEX:ETHUSD
BINANCE:SOLUSD
CAPEX RatioUnderstanding the CAPEX Ratio: An Essential Financial Metric
Introduction
In the world of finance, understanding how companies allocate their resources and reinvest their earnings is crucial for investors and analysts. One fundamental metric used to assess a company's investment behavior is the CAPEX Ratio. This article delves into what the CAPEX Ratio signifies, its advantages, and how to interpret its implications.
What is the CAPEX Ratio?
The CAPEX Ratio, short for Capital Expenditure Ratio, is a financial indicator that measures the proportion of a company's capital expenditures (CAPEX) relative to various financial metrics such as revenue, free cash flow, net income, or total assets. CAPEX represents investments made by a company to acquire or maintain its physical assets.
Interpreting the Results
Each variant of the CAPEX Ratio provides unique insights into a company's financial strategy:
• CAPEX to Revenue Ratio: This ratio shows what portion of a company's revenue is being reinvested into capital investments. A higher ratio might indicate aggressive expansion plans or a need for infrastructure upgrades.
• CAPEX to Free Cash Flow Ratio: By comparing CAPEX with free cash flow, this ratio reveals how much of a company's available cash is dedicated to capital investments. It helps assess financial health and sustainability.
• CAPEX to Net Income Ratio: This ratio measures how much of a company's net income is being channeled back into capital expenditures. A high ratio relative to net income could signal a company's commitment to growth and development.
• CAPEX to Total Assets Ratio: This metric assesses the proportion of total assets being allocated towards capital expenditures. It provides a perspective on the company's investment intensity relative to its overall asset base.
Advantages of Using CAPEX Ratios
• Insight into Investment Strategy: Helps investors understand where a company is directing its resources.
• Evaluation of Financial Health: Indicates how efficiently a company is reinvesting profits or available cash.
• Comparative Analysis: Enables comparisons across companies or industries to gauge investment priorities.
How to Use the CAPEX Ratio
• Comparative Analysis: Compare the CAPEX Ratios over time or against industry peers to spot trends or outliers.
• Investment Decision-Making: Consider CAPEX Ratios alongside other financial metrics when making investment decisions.
Conclusion
In conclusion, the CAPEX Ratio is a valuable financial metric that offers deep insights into a company's investment behavior and financial health. By analyzing different variants of this ratio, investors and analysts can make informed decisions about a company's growth prospects and financial stability.
Useful_lib_publicLibrary "Useful_lib_public"
Useful functions
CountBarsOfDay()
count bars for one for the diffrent time frames
Returns: number of bars for one day
LastBarsOfDay()
Index number for the las bar for one day
Returns: TRUE is that the last bar from day
isTuesday()
TRUE is tuesday
Returns: TRUE is tuesday else FALSE
Rsi(src, len)
RSI calulation
Parameters:
src (float) : RSI Source
len (simple int) : RSI Length
Returns: RSI Value
CalcIndex(netPos, weeks)
Index calulation
Parameters:
netPos (float) : Source
weeks (simple int) : Length
Returns: "COT Index"
RsiStock(src, len, smoothK)
TRUE is tuesday
Parameters:
src (float)
len (simple int)
smoothK (int)
Returns: RSI Stochastik
Offset()
Use Offset for Day time frame
Returns: Offset
PercentChange(Data, LastData)
Calc different in Percent
Parameters:
Data (float)
LastData (float)
Returns: Change in percent
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.
Turn of the Month Strategy [Honestcowboy]The end of month effect is a well known trading strategy in the stock market. Quite simply, most stocks go up at the end of the month. What's even better is that this effect spills over to the next phew days of the next month.
In this script we backtest this theory which should work especially well on SP500 pair.
By default the strategy buys 2 days before the end of each month and exits the position 3 days into the next month.
The strategy is a long only strategy and is extremely simple. The SP500 is one of the #1 assets people use for long term investing due to it's "9.8%" annualised return. However as a trader you want the best deal possible. This strategy is only inside the market for about 25% of the time while delivering a similar return per exposure with a lower drawdown.
Here are some hypothesis why turn of the month effect happens in the stock markets:
Increased inflow from savings accounts to stocks at end of month
Rebalancing of portfolios by fund managers at end of month
The timing of monthly cash flows received by pension funds, which are reinvested in the stock market.
The script also has some inputs to define how many days before end of the month you want to buy the asset and how long you want to hold it into the next month.
It is not possible to buy the asset exactly on this day every month as the market closes on the weekend. I've added some logic where it will check if that day is a friday, saturdady or sunday. If that is the case it will send the buy signal on the end of thursday, this way we enter on the friday and don't lose that months trading opportunity.
The backtest below uses 4% exposure per trade as to show the equity curve more clearly and because of publishing rules. However, most fund managers and investors use 100% exposure. This way you actually risk money to earn money. Feel free to adjust the settings to your risk profile to get a clearer picture of risks and rewards before implementing in your portfolio.
strategy_helpersThis library is designed to aid traders and developers in calculating risk metrics efficiently across different asset types like equities, futures, and forex. It includes comprehensive functions that calculate the number of units or contracts to trade, the value at risk, and the total value of the position based on provided entry prices, stop levels, and risk percentages. Whether you're managing a portfolio or developing trading strategies, this library provides essential tools for risk management. Functions also automatically select the appropriate risk calculation method based on asset type, calculate leverage levels, and determine potential liquidation points for leveraged positions. Perfect for enhancing the precision and effectiveness of your trading strategies.
Library "strategy_helpers"
Provides tools for calculating risk metrics across different types of trading strategies including equities, futures, and forex. Functions allow for precise control over risk management by calculating the number of units or contracts to trade, the value at risk, and the total position value based on entry prices, stop levels, and desired risk percentage. Additional utilities include automatic risk calculation based on asset type, leverage level calculations, and determination of liquidation levels for leveraged trades.
calculate_risk(entry, stop_level, stop_range, capital, risk_percent, trade_direction, whole_number_buy)
Calculates risk metrics for equity trades based on entry, stop level, and risk percent
Parameters:
entry (float) : The price at which the position is entered. Use close if you arent adding to a position. Use the original entry price if you are adding to a position.
stop_level (float) : The price level where the stop loss is placed
stop_range (float) : The price range from entry to stop level
capital (float) : The total capital available for trading
risk_percent (float) : The percentage of capital risked on the trade. 100% is represented by 100.
trade_direction (bool) : True for long trades, false for short trades
whole_number_buy (bool) : True to adjust the quantity to whole numbers
Returns: A tuple containing the number of units to trade, the value at risk, and the total value of the position:
calculate_risk_futures(risk_capital, stop_range)
Calculates risk metrics for futures trades based on the risk capital and stop range
Parameters:
risk_capital (float) : The capital allocated for the trade
stop_range (float) : The price range from entry to stop level
Returns: A tuple containing the number of contracts to trade, the value at risk, and the total value of the position:
calculate_risk_forex(entry, stop_level, stop_range, capital, risk_percent, trade_direction)
Calculates risk metrics for forex trades based on entry, stop level, and risk percent
Parameters:
entry (float) : The price at which the position is entered. Use close if you arent adding to a position. Use the original entry price if you are adding to a position.
stop_level (float) : The price level where the stop loss is placed
stop_range (float) : The price range from entry to stop level
capital (float) : The total capital available for trading
risk_percent (float) : The percentage of capital risked on the trade. 100% is represented by 100.
trade_direction (bool) : True for long trades, false for short trades
Returns: A tuple containing the number of lots to trade, the value at risk, and the total value of the position:
calculate_risk_auto(entry, stop_level, stop_range, capital, risk_percent, trade_direction, whole_number_buy)
Automatically selects the risk calculation method based on the asset type and calculates risk metrics
Parameters:
entry (float) : The price at which the position is entered. Use close if you arent adding to a position. Use the original entry price if you are adding to a position.
stop_level (float) : The price level where the stop loss is placed
stop_range (float) : The price range from entry to stop level
capital (float) : The total capital available for trading
risk_percent (float) : The percentage of capital risked on the trade. 100% is represented by 100.
trade_direction (bool) : True for long trades, false for short trades
whole_number_buy (bool) : True to adjust the quantity to whole numbers, applicable only for non-futures and non-forex trades
Returns: A tuple containing the number of units or contracts to trade, the value at risk, and the total value of the position:
leverage_level(account_equity, position_value)
Calculates the leverage level used based on account equity and position value
Parameters:
account_equity (float) : Total equity in the trading account
position_value (float) : Total value of the position taken
Returns: The leverage level used in the trade
calculate_liquidation_level(entry, leverage, trade_direction, maintenance_margine)
Calculates the liquidation price level for a leveraged trade
Parameters:
entry (float) : The price at which the position is entered
leverage (float) : The leverage level used in the trade
trade_direction (bool) : True for long trades, false for short trades
maintenance_margine (float) : The maintenance margin requirement, expressed as a percentage
Returns: The price level at which the position would be liquidated, or na if leverage is zero
OrderFlow [Probabilities] | FractalystWhat's the indicator's purpose and functionality?
The indicator is designed to incorporate probabilities with buyside and sellside liquidity, as well as premium and discount ranges within the market. It also provides traders with a multi-timeframe functionality for observing liquidity levels and probabilities across two timeframes without the need to manually switch between them.
These levels are often used in smart money trading concepts for identifying key areas of interest, such as potential reversal points, areas of accumulation or distribution, and zones of high liquidity.
----
What's the purpose of these levels? What are the underlying calculations?
1. Understanding Swing highs and Swing Lows
Swing High: A Swing High is formed when there is a high with 2 lower highs to the left and right.
Swing Low: A Swing Low is formed when there is a low with 2 higher lows to the left and right.
2. Understanding the purpose and the underlying calculations behind Buyside , Sellside and Equilibrium levels.
3. Identifying Discount and Premium Zones.
4. Importance of Risk-Reward in Premium and Discount Ranges
----
How does the script calculate probabilities?
The script calculates the probability of each liquidity level individually. Here's the breakdown:
1. Upon the formation of a new range, the script waits for the price to reach and tap into equilibrium or the 50% level. Status: "⏸" - Inactive
2. Once equilibrium is tapped into, the equilibrium status becomes activated and it waits for either liquidity side to be hit. Status: "▶" - Active
3. If the buyside liquidity is hit, the script adds to the count of successful buyside liquidity occurrences. Similarly, if the sellside is tapped, it records successful sellside liquidity occurrences.
5. Finally, the number of successful occurrences for each side is divided by the overall count individually to calculate the range probabilities.
Note: The calculations are performed independently for each directional range. A range is considered bearish if the previous breakout was through a sellside liquidity. Conversely, a range is considered bullish if the most recent breakout was through a buyside liquidity.
----
What does the multi-timeframe functionality offer?
Enabling and selecting a higher timeframe in the indicator's user-input settings allows you to access not only the current range information but also the liquidity sides, status, price levels, and probabilities of a higher timeframe without needing to switch between timeframes and mark up the levels manually.
----
What are the multi-timeframe underlying calculations?
The script uses the same calculations (mentioned above) and requests the data such as price levels, bar time, probabilities and booleans from the user-input timeframe.
Non-repainting Security Function with Lookahead ON
//Function to fetch data for a given timeframe
getHTFData(timeframe_,exp_) =>
request.security(syminfo.tickerid, timeframe_,exp_ ,lookahead = barmerge.lookahead_on)
----
How to use the indicator?
1. Add the indicator to your TradingView chart.
2. Choose the pair you want to analyze/trade.
3. Enable the HTF in user-input settings and choose a timeframe as for your higher timeframe bias.
4. (Important) : Ensure that the probabilities on both timeframes are aligned in one direction. If not, switch between timeframes until you find a pair of timeframes that are in line with each other and have higher probabilities on one liquidity side.
For Swing traders:
Use Hourly timeframes (1H/2H/4H/8H/12H) as your current timeframe and 1D/3D/1W/2W for your higher timeframe (HTF).
Entry: Hourly Equilibrium level. (Limit order)
Stoploss: Place it on the side where the probability is lower than 50%.
Break-even level/TP1: Hourly breakout of the liquidity.
TP2: Target the Higher Timeframe (HTF) liquidity level where the probability is higher than 50%.
2H/1D COINBASE:BTCUSD
For Day traders:
Use minutely timeframes (5m/15m/30m) as your current timeframe and 1H/2H/4H/8H/12H for your higher timeframe (HTF).
Entry: Minutely Equilibrium level. (Limit order)
Stoploss: Place it on the side where the probability is lower than 50%.
Break-even level/TP1: Minutely breakout of the liquidity.
TP2: Target the Higher Timeframe (HTF) liquidity level where the probability is higher than 50%.
1H/5m COINBASE:BTCUSD
----
User-input settings and customizations
----
What makes this indicator original?
1. Real-time calculation of probabilities directly on your charts.
2. Multi-timeframe functionality, enabling effortless observation of liquidity levels and probabilities across two timeframes.
3. Status label for clear identification of whether price has reached equilibrium.
4. All levels are updated only upon candle closure above or below liquidity levels, ensuring it remains a non-repainting indicator.
----
Terms and Conditions | Disclaimer
Our charting tools are provided for informational and educational purposes only and should not be construed as financial, investment, or trading advice. They are not intended to forecast market movements or offer specific recommendations. Users should understand that past performance does not guarantee future results and should not base financial decisions solely on historical data.
By continuing to use our charting tools, the user acknowledges and accepts the Terms and Conditions outlined in this legal disclaimer.
US Net LiquidityAnalysis of US Net Liquidity: A Comprehensive Overview
Introduction:
The "US Net Liquidity" indicator offers a detailed analysis of liquidity conditions within the United States, drawing insights from critical financial metrics related to the Federal Reserve (FED) and other government accounts. This tool enables economists to assess liquidity dynamics, identify trends, and inform economic decision-making.
Key Metrics and Interpretation:
1. Smoothing Period: This parameter adjusts the level of detail in the analysis by applying a moving average to the liquidity data. A longer smoothing period results in a smoother trend line, useful for identifying broader liquidity patterns over time.
2. Data Source (Timeframe): Specifies the timeframe of the data used for analysis, typically daily (D). Different timeframes can provide varying perspectives on liquidity trends.
3. Data Categories:
- FED Balance Sheet: Represents the assets and liabilities of the Federal Reserve, offering insights into monetary policy and market interventions.
- US Treasury General Account (TGA): Tracks the balance of the US Treasury's general account, reflecting government cash management and financial stability.
- Overnight Reverse Repurchase Agreements (RRP): Highlights short-term borrowing and lending operations between financial institutions and the Federal Reserve, influencing liquidity conditions.
- Earnings Remittances to the Treasury: Indicates revenues transferred to the US Treasury from various sources, impacting government cash flow and liquidity.
4. Moving Average Length: Determines the duration of the moving average applied to the data. A longer moving average length smoothens out short-term fluctuations, emphasizing longer-term liquidity trends.
Variation Lookback Length: Specifies the historical period used to assess changes and variations in liquidity. A longer lookback length captures more extended trends and fluctuations.
Interpretation:
1. Data Retrieval: Real-time data from specified financial instruments (assets) is retrieved to calculate balances for each category (FED, TGA, RRP, Earnings Remittances).
2. Global Balance Calculation: The global liquidity balance is computed by aggregating the balances of individual categories (FED Balance - TGA Balance - RRP Balance - Earnings Remittances Balance). This metric provides a comprehensive view of net liquidity.
3. Smoothed Global Balance (SMA): The Simple Moving Average (SMA) is applied to the global liquidity balance to enhance clarity and identify underlying trends. A rising SMA suggests improving liquidity conditions, while a declining SMA may indicate tightening liquidity.
Insight Generation and Decision-Making:
1. Trend Analysis: By analyzing smoothed liquidity trends over time, economists can identify periods of liquidity surplus or deficit, which can inform monetary policy decisions and market interventions.
2. Forecasting: Understanding liquidity dynamics aids in economic forecasting, particularly in predicting market liquidity, interest rate movements, and financial stability.
3. Policy Implications: Insights derived from this analysis tool can guide policymakers in formulating effective monetary policies, managing government cash flow, and ensuring financial stability.
Conclusion:
The "US Net Liquidity" analysis tool serves as a valuable resource for economists, offering a data-driven approach to understanding liquidity dynamics within the US economy. By interpreting key metrics and trends, economists can make informed decisions and contribute to macroeconomic stability and growth.
Disclaimer: This analysis is based on real-time financial data and should be used for informational purposes only. It is not intended as financial advice or a substitute for professional expertise.
mathLibrary "math"
It's a library of discrete aproximations of a price or Series float it uses Fourier Discrete transform, Laplace Discrete Original and Modified transform and Euler's Theoreum for Homogenus White noice operations. Calling functions without source value it automatically take close as the default source value.
Here is a picture of Laplace and Fourier approximated close prices from this library:
Copy this indicator and try it yourself:
import AutomatedTradingAlgorithms/math/1 as math
//@version=5
indicator("Close Price with Aproximations", shorttitle="Close and Aproximations", overlay=false)
// Sample input data (replace this with your own data)
inputData = close
// Plot Close Price
plot(inputData, color=color.blue, title="Close Price")
ltf32_result = math.LTF32(a=0.01)
plot(ltf32_result, color=color.green, title="LTF32 Aproximation")
fft_result = math.FFT()
plot(fft_result, color=color.red, title="Fourier Aproximation")
wavelet_result = math.Wavelet()
plot(wavelet_result, color=color.orange, title="Wavelet Aproximation")
wavelet_std_result = math.Wavelet_std()
plot(wavelet_std_result, color=color.yellow, title="Wavelet_std Aproximation")
DFT3(xval, _dir)
Discrete Fourier Transform with last 3 points
Parameters:
xval (float) : Source series
_dir (int) : Direction parameter
Returns: Aproxiated source value
DFT2(xval, _dir)
Discrete Fourier Transform with last 2 points
Parameters:
xval (float) : Source series
_dir (int) : Direction parameter
Returns: Aproxiated source value
FFT(xval)
Fast Fourier Transform once. It aproximates usig last 3 points.
Parameters:
xval (float) : Source series
Returns: Aproxiated source value
DFT32(xval)
Combined Discrete Fourier Transforms of DFT3 and DTF2 it aproximates last point by first
aproximating last 3 ponts and than using last 2 points of the previus.
Parameters:
xval (float) : Source series
Returns: Aproxiated source value
DTF32(xval)
Combined Discrete Fourier Transforms of DFT3 and DTF2 it aproximates last point by first
aproximating last 3 ponts and than using last 2 points of the previus.
Parameters:
xval (float) : Source series
Returns: Aproxiated source value
LFT3(xval, _dir, a)
Discrete Laplace Transform with last 3 points
Parameters:
xval (float) : Source series
_dir (int) : Direction parameter
a (float) : laplace coeficient
Returns: Aproxiated source value
LFT2(xval, _dir, a)
Discrete Laplace Transform with last 2 points
Parameters:
xval (float) : Source series
_dir (int) : Direction parameter
a (float) : laplace coeficient
Returns: Aproxiated source value
LFT(xval, a)
Fast Laplace Transform once. It aproximates usig last 3 points.
Parameters:
xval (float) : Source series
a (float) : laplace coeficient
Returns: Aproxiated source value
LFT32(xval, a)
Combined Discrete Laplace Transforms of LFT3 and LTF2 it aproximates last point by first
aproximating last 3 ponts and than using last 2 points of the previus.
Parameters:
xval (float) : Source series
a (float) : laplace coeficient
Returns: Aproxiated source value
LTF32(xval, a)
Combined Discrete Laplace Transforms of LFT3 and LTF2 it aproximates last point by first
aproximating last 3 ponts and than using last 2 points of the previus.
Parameters:
xval (float) : Source series
a (float) : laplace coeficient
Returns: Aproxiated source value
whitenoise(indic_, _devided, minEmaLength, maxEmaLength, src)
Ehler's Universal Oscillator with White Noise, without extra aproximated src.
It uses dinamic EMA to aproximate indicator and thus reducing noise.
Parameters:
indic_ (float) : Input series for the indicator values to be smoothed
_devided (int) : Divisor for oscillator calculations
minEmaLength (int) : Minimum EMA length
maxEmaLength (int) : Maximum EMA length
src (float) : Source series
Returns: Smoothed indicator value
whitenoise(indic_, dft1, _devided, minEmaLength, maxEmaLength, src)
Ehler's Universal Oscillator with White Noise and DFT1.
It uses src and sproxiated src (dft1) to clearly define white noice.
It uses dinamic EMA to aproximate indicator and thus reducing noise.
Parameters:
indic_ (float) : Input series for the indicator values to be smoothed
dft1 (float) : Aproximated src value for white noice calculation
_devided (int) : Divisor for oscillator calculations
minEmaLength (int) : Minimum EMA length
maxEmaLength (int) : Maximum EMA length
src (float) : Source series
Returns: Smoothed indicator value
smooth(dft1, indic__, _devided, minEmaLength, maxEmaLength, src)
Smoothing source value with help of indicator series and aproximated source value
It uses src and sproxiated src (dft1) to clearly define white noice.
It uses dinamic EMA to aproximate src and thus reducing noise.
Parameters:
dft1 (float) : Value to be smoothed.
indic__ (float) : Optional input for indicator to help smooth dft1 (default is FFT)
_devided (int) : Divisor for smoothing calculations
minEmaLength (int) : Minimum EMA length
maxEmaLength (int) : Maximum EMA length
src (float) : Source series
Returns: Smoothed source (src) series
smooth(indic__, _devided, minEmaLength, maxEmaLength, src)
Smoothing source value with help of indicator series
It uses dinamic EMA to aproximate src and thus reducing noise.
Parameters:
indic__ (float) : Optional input for indicator to help smooth dft1 (default is FFT)
_devided (int) : Divisor for smoothing calculations
minEmaLength (int) : Minimum EMA length
maxEmaLength (int) : Maximum EMA length
src (float) : Source series
Returns: Smoothed src series
vzo_ema(src, len)
Volume Zone Oscillator with EMA smoothing
Parameters:
src (float) : Source series
len (simple int) : Length parameter for EMA
Returns: VZO value
vzo_sma(src, len)
Volume Zone Oscillator with SMA smoothing
Parameters:
src (float) : Source series
len (int) : Length parameter for SMA
Returns: VZO value
vzo_wma(src, len)
Volume Zone Oscillator with WMA smoothing
Parameters:
src (float) : Source series
len (int) : Length parameter for WMA
Returns: VZO value
alma2(series, windowsize, offset, sigma)
Arnaud Legoux Moving Average 2 accepts sigma as series float
Parameters:
series (float) : Input series
windowsize (int) : Size of the moving average window
offset (float) : Offset parameter
sigma (float) : Sigma parameter
Returns: ALMA value
Wavelet(src, len, offset, sigma)
Aproxiates srt using Discrete wavelet transform.
Parameters:
src (float) : Source series
len (int) : Length parameter for ALMA
offset (simple float)
sigma (simple float)
Returns: Wavelet-transformed series
Wavelet_std(src, len, offset, mag)
Aproxiates srt using Discrete wavelet transform with standard deviation as a magnitude.
Parameters:
src (float) : Source series
len (int) : Length parameter for ALMA
offset (float) : Offset parameter for ALMA
mag (int) : Magnitude parameter for standard deviation
Returns: Wavelet-transformed series
LaplaceTransform(xval, N, a)
Original Laplace Transform over N set of close prices
Parameters:
xval (float) : series to aproximate
N (int) : number of close prices in calculations
a (float) : laplace coeficient
Returns: Aproxiated source value
NLaplaceTransform(xval, N, a, repeat)
Y repetirions on Original Laplace Transform over N set of close prices, each time N-k set of close prices
Parameters:
xval (float) : series to aproximate
N (int) : number of close prices in calculations
a (float) : laplace coeficient
repeat (int) : number of repetitions
Returns: Aproxiated source value
LaplaceTransformsum(xval, N, a, b)
Sum of 2 exponent coeficient of Laplace Transform over N set of close prices
Parameters:
xval (float) : series to aproximate
N (int) : number of close prices in calculations
a (float) : laplace coeficient
b (float) : second laplace coeficient
Returns: Aproxiated source value
NLaplaceTransformdiff(xval, N, a, b, repeat)
Difference of 2 exponent coeficient of Laplace Transform over N set of close prices
Parameters:
xval (float) : series to aproximate
N (int) : number of close prices in calculations
a (float) : laplace coeficient
b (float) : second laplace coeficient
repeat (int) : number of repetitions
Returns: Aproxiated source value
N_divLaplaceTransformdiff(xval, N, a, b, repeat)
N repetitions of Difference of 2 exponent coeficient of Laplace Transform over N set of close prices, with dynamic rotation
Parameters:
xval (float) : series to aproximate
N (int) : number of close prices in calculations
a (float) : laplace coeficient
b (float) : second laplace coeficient
repeat (int) : number of repetitions
Returns: Aproxiated source value
LaplaceTransformdiff(xval, N, a, b)
Difference of 2 exponent coeficient of Laplace Transform over N set of close prices
Parameters:
xval (float) : series to aproximate
N (int) : number of close prices in calculations
a (float) : laplace coeficient
b (float) : second laplace coeficient
Returns: Aproxiated source value
NLaplaceTransformdiffFrom2(xval, N, a, b, repeat)
N repetitions of Difference of 2 exponent coeficient of Laplace Transform over N set of close prices, second element has for 1 higher exponent factor
Parameters:
xval (float) : series to aproximate
N (int) : number of close prices in calculations
a (float) : laplace coeficient
b (float) : second laplace coeficient
repeat (int) : number of repetitions
Returns: Aproxiated source value
N_divLaplaceTransformdiffFrom2(xval, N, a, b, repeat)
N repetitions of Difference of 2 exponent coeficient of Laplace Transform over N set of close prices, second element has for 1 higher exponent factor, dynamic rotation
Parameters:
xval (float) : series to aproximate
N (int) : number of close prices in calculations
a (float) : laplace coeficient
b (float) : second laplace coeficient
repeat (int) : number of repetitions
Returns: Aproxiated source value
LaplaceTransformdiffFrom2(xval, N, a, b)
Difference of 2 exponent coeficient of Laplace Transform over N set of close prices, second element has for 1 higher exponent factor
Parameters:
xval (float) : series to aproximate
N (int) : number of close prices in calculations
a (float) : laplace coeficient
b (float) : second laplace coeficient
Returns: Aproxiated source value
[BT] NedDavis Series: CPI Minus 5-Year Moving Average🟧 GENERAL
The script works on the Monthly Timeframe and has 2 main settings (explained in FEATURES ). It uses the US CPI data, reported by the Bureau of Labour Statistics.
🔹Functionality 1: The main idea is to plot the distance between the CPI line and the 5 year moving average of the CPI line. This technique in mathematics is called "deviation from the moving average". This technique is used to analyse how has CPI previously acted and can give clues at what it might do in the future. Economic historians use such analysis, together with specific period analysis to predict potential risks in the future (see an example of such analysis in HOW TO USE section. The mathematical technique is a simple subtraction between 2 points (CPI - 5yr SMA of CPI).
▶︎Interpretation for deviation from a moving average:
Positive Deviation: When the line is above its moving average, it indicates that the current value is higher than the average, suggesting potential strength or bullish sentiment.
Negative Deviation: Conversely, when the line falls below its moving average, it suggests weakness or bearish sentiment as the current value is lower than the average.
▶︎Applications:
Trend Identification: Deviations from moving averages can help identify trends, with sustained deviations indicating strong trends.
Reversal Signals: Significant deviations from moving averages may signal potential trend reversals, especially when combined with other technical indicators.
Volatility Measurement: Monitoring the magnitude of deviations can provide insights into market volatility and price movements.
Remember the indicator is applying this only for the US CPI - not the ticker you apply the indicator on!
🔹Functionality 2: It plots on a new pane below information about the Consumer Price Index. You can also find the information by plotting the ticker symbol USACPIALLMINMEI on TradingView, which is a Monthly economic data by the OECD for the CPI in the US. The only addition you would get from the indicator is the plot of the 5 year Simple Moving Average.
🔹What is the US Consumer Price Index?
Measures the change in the price of goods and services purchased by consumers;
Traders care about the CPI because consumer prices account for a majority of overall inflation. Inflation is important to currency valuation because rising prices lead the central bank to raise interest rates out of respect for their inflation containment mandate;
It is measured as the average price of various goods and services are sampled and then compared to the previous sampling.
Source: Bureau of Labor Statistics;
FEATURES OF INDICATOR
1) The US Consumer Price Index Minus the Five Year Moving Average of the same.
As shown on the picture above and explained in previous section. Here a more detailed view.
2) The actual US Consumer Price Index (Annual Rate of change) and the Five year average of the US Consumer Price Index. Explained above and shown below:
To activate 2) go into settings and toggle the check box.
HOW TO USE
It can be used for a fundamental analysis on the relationship between the stock market, the economy and the Feds decisions to hike or cut rates, whose main mandate is to control inflation over time.
I have created this indicator to show my analysis in this idea:
What does a First Fed Rate cut really mean?
CREDITS
I have seen such idea in the past posted by the institutional grade research of NedDavis and have recreated it for the TradingView platform, open-source for the community.
Order Block Refiner [TradingFinder]🔵 Introduction
The "Refinement" feature allows you to adjust the width of the order block according to your strategy. There are two modes, "Aggressive" and "Defensive," in the "Order Block Refine". The difference between "Aggressive" and "Defensive" lies in the width of the order block.
For risk-averse traders, the "Defensive" mode is suitable as it provides a lower loss limit and a greater reward-to-risk ratio. For risk-taking traders, the "Aggressive" mode is more appropriate. These traders prefer to enter trades at higher prices, and this mode, which has a wider order block width, is more suitable for this group of individuals.
Important :
One of the advantages of using this library is increased code accuracy. Not only does it have the capability to create order blocks, but you can also simply define the condition for order block creation (true/false) and "bar_index," and you'll find the primary range without applying any filters.
🟣 Order Block Refinement Algorithm
The order block ranges are filtered in two stages. In the first stage, the "Open," "High," "Low," and "Close" of the current order block candle, its two or three previous candles, and one subsequent candle (if available) are examined. In this stage, minimum and maximum distances are calculated, and logical range filters are applied.
In the second stage, two modes, "Aggressive" and "Defensive," are calculated.
For the "Defensive" mode, the width of these ranges is compared with the "ATR" (Average True Range) of period 55, and if they are smaller than "ATR" or 1 to more than 4 times "ATR," the width of the range is reduced from 0 to 80 percent.
For the "Aggressive" mode, you get the same output as the first filter, which usually has a wider width than the "Defensive" mode.
• Order Block Refiner : Off
• Order Block Refiner : On / "Aggressive Mode"
• Order Block Refiner : On / "Defensive Mode"
🔵 How to Use
OBRefiner(string OBType, string OBRefine, string RefineMethod, bool TriggerCondition, int Index) =>
Parameters:
• OBType (string)
• OBRefine (string)
• RefineMethod (string)
• TriggerCondition (bool)
• Index (int)
To add "Order Block Refiner Library", you must first add the following code to your script.
import TFlab/OrderBlockRefiner_TradingFinder/1
OBType : This parameter receives 2 inputs. If the order block you want to "Refine" is of type demand, you should enter "Demand," and if it's of type supply, you should enter "Supply."
OBRefine : Set to "On" if you want the "Refine" operation to be performed. Otherwise, set to "Off."
RefineMethod : This input receives 2 modes, "Aggressive" and "Defensive." You can switch between these modes according to your needs.
TriggerCondition : Enter the condition with which the order block is formed in this parameter.
Index : Enter the "bar_index" of the candle where the order block is formed in this parameter.
🟣 Function Outputs
This function has 6 outputs: "bar_index" at the beginning of the "Distal" line, "bar_index+1" at the end of the "Distal" line, "Price" at the "Distal" line, "bar_index" at the beginning of the "Proximal" line, "bar_index+1" at the end of the "Proximal" line, and "Price" at the "Proximal" line, which can be used to draw order blocks.
Sample :
= Refiner.OBRefiner('Demand', 'Off', 'Aggressive',BuMChMain_Trigger, BuMChMain_Index)
if BuMChMain_Trigger
BuMChHlineMain := line.new(BuMChMain_Xp1 , BuMChMain_Yp12 , bar_index , BuMChMain_Yp12, color = color.black , style = line.style_dotted)
BuMChLlineMain := line.new(BuMChMain_Xd1 , BuMChMain_Yd12 , bar_index , BuMChMain_Yd12, color = color.black , style = line.style_dotted)
BuMChFilineMain := linefill.new(BuMChHlineMain ,BuMChLlineMain , color = color.rgb(76, 175, 80 , 75 ) )
Range Sentiment | FractalystWhat’s the purpose of this indicator?
This indicator aims to calculate the percentage level of bullish or bearish fluctuations within equally divided price sections, in the latest price range.
----
How does this indicator calculate the current sentiment?
This indicator calculates the current sentiment by identifying the highest swing high and the lowest swing low, then evenly dividing the distance between them into percentage amounts. If the price is above the 50% mark, it indicates bullishness, whereas if it's below 50%, it suggests bearishness.
----
Is this sentiment the same as the ones on online websites?
No, the sentiment as discussed earlier, is based on analyzing price action on charts and calculating the current range in percentage.
----
What methods do other websites typically use to determine market sentiment?
1. Broker Data Aggregation: Compiling data from various forex brokers to assess the percentage of long and short positions taken by traders.
2. Lot Size Analysis: Considering the size of positions taken by traders, where a significant number of large positions in one direction may indicate strong bullish or bearish sentiment.
3. Order Flow Analysis: Tracking the flow of orders in the forex market, with an increase in buy orders suggesting bullish sentiment and a surge in sell orders indicating bearish sentiment.
4. Sentiment Surveys: Conducting surveys among forex traders to gather opinions about future price movements and gauge sentiment.
----
What are the options to display the current market sentiment?
1. Table - located at top centre of your charts
2. Label - indicating the 50% level of the current range mentioned above
----
How can I analyze how the sentiment worked on historical data?
There are 3 available options:
1. Shapes
2. Candles
3. Background
- White colour/transparent background denote a weak or uncertain trend, where the bullish or bearish degree is less than 60%.
- Blue colour indicates that the price is trading bullish.
- Red colour indicates that the price is trading bearish.
----
On what market and timeframe this indicator operates on?
The Range Sentiment indicator is applicable to all markets and timeframes.
When switching between timeframes, the values remain consistent because it utilizes the daily bias to determine the sentiment for the current day.
----
How can I use this indicator?
1. Add "Range Sentiment | Fractalyst" to your TradingView chart.
2. Choose the pair you want to analyze or trade intraday/during session.
3. Make sure the sentiment is showing you a bullish or a bearish degree of higher than 60%.
(To avoid potentially choppy price action)
4. Use your favourite entry model to trade in the same direction that the sentiment is showing you.
5. Determine your take profit based on the daily swing level OR previous daily high if the bullish degree is above +60% and previous daily low if the bearish degree is +60%.
6. Risk adjustment and Trade management based on your personal preferences.
Example:
----
User-input settings and customizations
----
What makes this indicator original?
1. It utilizes the daily timeframe's current range to determine the day's bias degree in percentage.
2. Apart from presenting the current sentiment in a sentimental table, it also visualizes the 50% threshold as a label, indicating where price may shift direction from a sentiment perspective.
3. It offers the feature to analyze historical data, allowing users to observe indicator performance through shapes, candles, and background colors.
4. By integrating market sentiment directly into the charts, it simplifies the trading process, removing the reliance on online websites and services for sentiment analysis, which often rely on limited brokerage data and resources.
5. Unlike most sentiment websites that primarily focus on forex pairs sentiment data, this indicator stands out by its capability to analyze sentiment across all markets. Moreover, it provides real-time updates, ensuring traders have access to the latest sentiment information regardless of the market they are trading in.
----
Terms and Conditions | Disclaimer
Our charting tools are provided for informational and educational purposes only and should not be construed as financial, investment, or trading advice. They are not intended to forecast market movements or offer specific recommendations. Users should understand that past performance does not guarantee future results and should not base financial decisions solely on historical data.
By continuing to use our charting tools, the user acknowledges and accepts the Terms and Conditions outlined in this legal disclaimer.
Trend Crawler with Dynamic TP and Trailing Stop### Description of "Trend Crawler with Dynamic TP and Trailing Stop"
#### Overview
The "Trend Crawler with Dynamic TP and Trailing Stop" is a comprehensive trading strategy designed for medium-frequency trading on various timeframes and markets. It utilizes a combination of trend identification and volatility analysis to determine optimal entry and exit points, aiming to maximize profitability by adapting to changing market conditions.
#### Strategy Mechanics
1. **Moving Averages**: Users can select between Simple Moving Average (SMA) and Exponential Moving Average (EMA) to define the trend. The strategy uses two moving averages (fast and slow) to identify the trend direction. A crossover of the fast MA above the slow MA signals a potential bullish trend, while a crossunder signals a bearish trend.
2. **Volume Analysis**: The strategy incorporates volume analysis to confirm the strength of the trend. It calculates a standard deviation of volume from its moving average to detect significant increases in trading activity, which supports the trend direction indicated by the MAs.
3. **Price Spread and RSI**: It uses the price spread (difference between the close and open of each bar) and the Relative Strength Index (RSI) to filter entries based on market momentum and overbought/oversold conditions. This helps in refining the entries to avoid weak or overly extended moves.
4. **Dynamic Take Profit and Trailing Stop**:
- **Trailing Stop**: As the position moves into profit, the strategy adjusts the stop loss dynamically to protect gains, using a trailing stop mechanism.
- **Dynamic Take Profit**: The take profit levels are adjusted based on the volatility (measured by the standard deviation of the price spread) to capture maximum profit from significant moves.
#### Usage
To use the strategy:
- Set the desired moving average type and lengths according to the asset and timeframe being traded.
- Adjust the RSI thresholds to match the market's volatility and trading style.
- Set the base take profit and stop loss levels along with the trailing stop distance based on risk tolerance and trading objectives.
#### Justification for Originality
While the use of moving averages, RSI, and volume analysis may be common, the integration of these elements with dynamic adjustments for take profit and trailing stops based on real-time volatility analysis offers a unique approach. The strategy adapts not just to trend direction but also to the market's momentum and volatility, providing a tailored trading solution that goes beyond standard indicator-based strategies.
#### Strategy Results and Settings
Backtesting should be conducted with realistic account sizes and include considerations for commission and slippage to ensure that the results are not misleading. Risk per trade should be kept within a sustainable range (ideally less than 5% of account equity), and the strategy should be tested over a sufficient sample size (at least 100 trades) to validate its effectiveness.
#### Chart Presentation
The script’s output includes:
- Colored backgrounds to indicate bullish or bearish market conditions.
- Plots of trailing stops to visually manage risk.
- Entry points are marked with shapes on the chart, providing clear visual cues for trading decisions.
#### Conclusion
This strategy offers traders a robust framework for trend following with enhanced risk management through dynamic adjustments based on real-time market analysis. It's designed to be versatile and adaptable to a wide range of markets and trading styles, providing traders with a tool that not only follows trends but also adapts to market changes to secure profits and reduce losses.
RSI Crypto Average W/AnalysisThis is an indicator designed to find the limits and stricture of an array of different crypto coins. It finds the average Relative Strength Index (RSI) across 20 different crypto coins and then plots the average.
This also uses arrays and averages across the coins to output the number of bars the RSI usually stays above or below the specified bands. Using this information you can predict when the RSI is about to start loosing momentum or even crash.
Cryptos included in the average:
Bitcoin (BTC)
Ethereum (ETH)
Ripple (XRP)
Binance Coin (BNB)
Cardano (ADA)
Solana (SOL)
Polkadot (DOT)
Dogecoin (DOGE)
Uniswap (UNI)
Avalanche (AVAX)
Terra (LUNA)
Chainlink (LINK)
Bitcoin Cash (BCH)
Ethereum Classic (ETC)
Filecoin (FIL)
Stellar (XLM)
TRON (TRX)
EOS (EOS)
Cosmos (ATOM)
Tezos (XTZ)
Monty3192_LibraryLibrary "Monty3192_Library"
Libreria Monty3192 - MontyTrader
calc_func(inversion1, inversion2, inversion3, inversion4, inversion5, inversion6, inversion7, inversion8, inversion9, inversion10, precio1, precio2, precio3, precio4, precio5, precio6, precio7, precio8, precio9, precio10, act_1, act_2, act_3, act_4, act_5, act_6, act_7, act_8, act_9, act_10)
Parameters:
inversion1 (float)
inversion2 (float)
inversion3 (float)
inversion4 (float)
inversion5 (float)
inversion6 (float)
inversion7 (float)
inversion8 (float)
inversion9 (float)
inversion10 (float)
precio1 (float)
precio2 (float)
precio3 (float)
precio4 (float)
precio5 (float)
precio6 (float)
precio7 (float)
precio8 (float)
precio9 (float)
precio10 (float)
act_1 (bool)
act_2 (bool)
act_3 (bool)
act_4 (bool)
act_5 (bool)
act_6 (bool)
act_7 (bool)
act_8 (bool)
act_9 (bool)
act_10 (bool)
rend_func(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, po)
Parameters:
p1 (float)
p2 (float)
p3 (float)
p4 (float)
p5 (float)
p6 (float)
p7 (float)
p8 (float)
p9 (float)
p10 (float)
po (float)
f_drawLine(cond, x1, y1, x2, y2, colorr, txt, act, offset, txtc, txts)
Parameters:
cond (bool)
x1 (int)
y1 (float)
x2 (int)
y2 (float)
colorr (color)
txt (string)
act (bool)
offset (int)
txtc (color)
txts (string)
f_Vline(cond, x1, y1, x2, y2, colorr, txt, sel, txts, txtc)
Parameters:
cond (bool)
x1 (int)
y1 (float)
x2 (int)
y2 (float)
colorr (color)
txt (string)
sel (bool)
txts (string)
txtc (color)
get_all_time_high()
Stochastic Z-Score Oscillator Strategy [TradeDots]The "Stochastic Z-Score Oscillator Strategy" represents an enhanced approach to the original "Buy Sell Strategy With Z-Score" trading strategy. Our upgraded Stochastic model incorporates an additional Stochastic Oscillator layer on top of the Z-Score statistical metrics, which bolsters the affirmation of potential price reversals.
We also revised our exit strategy to when the Z-Score revert to a level of zero. This amendment gives a much smaller drawdown, resulting in a better win-rate compared to the original version.
HOW DOES IT WORK
The strategy operates by calculating the Z-Score of the closing price for each candlestick. This allows us to evaluate how significantly the current price deviates from its typical volatility level.
The strategy first takes the scope of a rolling window, adjusted to the user's preference. This window is used to compute both the standard deviation and mean value. With these values, the strategic model finalizes the Z-Score. This determination is accomplished by subtracting the mean from the closing price and dividing the resulting value by the standard deviation.
Following this, the Stochastic Oscillator is utilized to affirm the Z-Score overbought and oversold indicators. This indicator operates within a 0 to 100 range, so a base adjustment to match the Z-Score scale is required. Post Stochastic Oscillator calculation, we recalibrate the figure to lie within the -4 to 4 range.
Finally, we compute the average of both the Stochastic Oscillator and Z-Score, signaling overpriced or underpriced conditions when the set threshold of positive or negative is breached.
APPLICATION
Firstly, it is better to identify a stable trading pair for this technique, such as two stocks with considerable correlation. This is to ensure conformance with the statistical model's assumption of a normal Gaussian distribution model. The ideal performance is theoretically situated within a sideways market devoid of skewness.
Following pair selection, the user should refine the span of the rolling window. A broader window smoothens the mean, more accurately capturing long-term market trends, while potentially enhancing volatility. This refinement results in fewer, yet precise trading signals.
Finally, the user must settle on an optimal Z-Score threshold, which essentially dictates the timing for buy/sell actions when the Z-Score exceeds with thresholds. A positive threshold signifies the price veering away from its mean, triggering a sell signal. Conversely, a negative threshold denotes the price falling below its mean, illustrating an underpriced condition that prompts a buy signal.
Within a normal distribution, a Z-Score of 1 records about 68% of occurrences centered at the mean, while a Z-Score of 2 captures approximately 95% of occurrences.
The 'cool down period' is essentially the number of bars that await before the next signal generation. This feature is employed to dodge the occurrence of multiple signals in a short period.
DEFAULT SETUP
The following is the default setup on EURAUD 1h timeframe
Rolling Window: 80
Z-Score Threshold: 2.8
Signal Cool Down Period: 5
Stochastic Length: 14
Stochastic Smooth Period: 7
Commission: 0.01%
Initial Capital: $10,000
Equity per Trade: 40%
FURTHER IMPLICATION
The Stochastic Oscillator imparts minimal impact on the current strategy. As such, it may be beneficial to adjust the weightings between the Z-Score and Stochastic Oscillator values or the scale of Stochastic Oscillator to test different performance outcomes.
Alternative momentum indicators such as Keltner Channels or RSI could also serve as robust confirmations of overbought and oversold signals when used for verification.
RISK DISCLAIMER
Trading entails substantial risk, and most day traders incur losses. All content, tools, scripts, articles, and education provided by TradeDots serve purely informational and educational purposes. Past performances are not definitive predictors of future results.
Pivot Profit Target [Mxwll]Introducing the Pivot Profit Target!
This script identifies recent pivot highs/lows and calculates the expected minimum distance for the next pivot, which acts as an approximate profit target.
The image above details the indicator's output.
The image above shows a table consisting of projection statistics.
How to use
The Pivot Profit Targets can be used to approximate a profit target for your trade.
Identify where your entry is relative to the most recent pivot, and assess whether the minimum expected distance for the most recent pivot has been exceeded. Treat the zones as an approximation.
If your trade aligns with the most recent pivot - treat the minimum expected distance zone as a potential profit target area. Of course, price might stop short or continue beyond the projection area!
That's it! Just a short and sweet script; thank you!