USD BRL Exchange Rate Discrepancy Analysis ScriptThe script is designed to visualize and analyze discrepancies in the exchange rates of USDT to BRL (Tether to Brazilian Real) and USDT to BRZ (Tether to Brazilian Digital Token) across various trading platforms. It fetches the closing prices of multiple trading pairs from different platforms like Bybit, Binance, and Uniswap. The primary focus is to calculate and plot the conversion rate of BTCBRZ (Bitcoin to Brazilian Real) to USD. Additionally, the script highlights the differences in buy and sell rates for USDT-BRL and USDT-BRZ pairs, including fees and percentage adjustments. Visual elements like lines and areas are used to represent these rates, offering a comprehensive view of potential arbitrage opportunities in the Bitcoin market across different exchanges.
Educational
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.
LBR-Volatility Breakout BarsThe originator of this script is Linda Raschke of LBR Group.
This Pine Script code is the version 5 of LBR Paintbars for TradingView, called "LBR-Bars." It was originally coded for TradingView in version 3 by LazyBear. It is a complex indicator that combines various features such as coloring bars based on different conditions, displaying Keltner channels, and showing volatility lines.
Let me break down the key components and explain how it works:
1. Inputs Section: This section defines various input parameters that users can adjust when adding the indicator to their charts. These parameters allow users to customize the behavior and appearance of the indicator. Here are some of the key input parameters:
- Users can control whether to color bars under different conditions. For example,
they can choose to color LBR bars, color bars above/below Kelts, or color non-LBR
bars.
- Users can choose whether to show volatility lines or shade Keltner channels' area
with the Mid being the moving average on the chart.
- In the calculation of Keltner channels, users can set the length of the moving
average that the Keltner channels use as the mid and then set the Keltner multiplier.
If users want to use "True Range" to determine calculations, they can turn it on or
off; it defaults to off.
- Users can change the calculation of volatility lines and set the length for finding the
lowest and highest prices. The user sets the ATR length and multiplier for the ATR.
2. Calculation Section: This section defines the calculation of the upper and lower standard deviation bands based on the input parameters. It uses Exponential Moving Averages (EMAs) and optionally True Range to calculate these bands if turned on. These bands are used in the Keltner channel calculation.
3. Keltner Channel Section: This section calculates the upper, middle, and lower lines of the Keltner channels. It also plots these lines on the chart. The colors and visibility of these lines are controlled by user inputs.
4. Volatility Lines Section: This section calculates the upper and lower volatility lines based on the lowest and highest prices over a specified period and the ATR. It also checks whether the current close price is above or below these lines accordingly. The colors and visibility of these lines are controlled by user inputs.
5. Bar Colors Section: This section determines the color of the bars on the chart based on various conditions. It checks whether the current bar meets conditions like being an LBR bar, being above or below volatility lines, or being in "No Man's Land." The color of the bars is set accordingly based on user inputs.
This Pine Script creates an indicator that provides visual cues on the chart based on Keltner channels, volatility lines, and other customizable conditions. Users can adjust the input parameters to tailor the indicator's behavior and appearance to their trading preferences.
Heatmap MACD Strategy - Pineconnector (Dynamic Alerts)Hello traders
This script is an upgrade of this template script.
Heatmap MACD Strategy
Pineconnector
Pineconnector is a trading bot software that forwards TradingView alerts to your Metatrader 4/5 for automating trading.
Many traders don't know how to dynamically create Pineconnector-compatible alerts using the data from their TradingView scripts.
Traders using trading bots want their alerts to reflect the stop-loss/take-profit/trailing-stop/stop-loss to breakeven options from your script and then create the orders accordingly.
This script showcases how to create Pineconnector alerts dynamically.
Pineconnector doesn't support alerts with multiple Take Profits.
As a workaround, for 2 TPs, I had to open two trades.
It's not optimal, as we end up paying more spreads for that extra trade - however, depending on your trading strategy, it may not be a big deal.
TradingView Alerts
1) You'll have to create one alert per asset X timeframe = 1 chart.
Example : 1 alert for EUR/USD on the 5 minutes chart, 1 alert for EUR/USD on the 15-minute chart (assuming you want your bot to trade the EUR/USD on the 5 and 15-minute timeframes)
2) For each alert, the alert message is pre-configured with the text below
{{strategy.order.alert_message}}
Please leave it as it is.
It's a TradingView native variable that will fetch the alert text messages built by the script.
3) Don't forget to set the webhook URL in the Notifications tab of the TradingView alerts UI.
EA configuration
The Pyramiding in the EA on Metatrader must be set to 2 if you want to trade with 2 TPs => as it's opening 2 trades.
If you only want 1 TP, set the EA Pyramiding to 1.
Regarding the other EA settings, please refer to the Pineconnector documentation on their website.
Logger
The Pineconnector commands are logged in the TradingView logger.
You'll find more information about it from this TradingView blog post
Important Notes
1) This multiple MACDs strategy doesn't matter much.
I could have selected any other indicator or concept for this script post.
I wanted to share an example of how you can quickly upgrade your strategy, making it compatible with Pineconnector.
2) The backtest results aren't relevant for this educational script publication.
I used realistic backtesting data but didn't look too much into optimizing the results, as this isn't the point of why I'm publishing this script.
3) This template is made to take 1 trade per direction at any given time.
Pyramiding is set to 1 on TradingView.
The strategy default settings are:
Initial Capital: 100000 USD
Position Size: 1 contract
Commission Percent: 0.075%
Slippage: 1 tick
No margin/leverage used
For example, those are realistic settings for trading CFD indices with low timeframes but not the best possible settings for all assets/timeframes.
Concept
The Heatmap MACD Strategy allows selecting one MACD in five different timeframes.
You'll get an exit signal whenever one of the 5 MACDs changes direction.
Then, the strategy re-enters whenever all the MACDs are in the same direction again.
It takes:
long trades when all the 5 MACD histograms are bullish
short trades when all the 5 MACD histograms are bearish
You can select the same timeframe multiple times if you don't need five timeframes.
For example, if you only need the 30min, the 1H, and 2H, you can set your timeframes as follow:
30m
30m
30m
1H
2H
Risk Management Features
All the features below are pips-based.
Stop-Loss
Trailing Stop-Loss
Stop-Loss to Breakeven after a certain amount of pips has been reached
Take Profit 1st level and closing X% of the trade
Take Profit 2nd level and close the remaining of the trade
Custom Exit
I added the option ON/OFF to close the opened trade whenever one of the MACD diverges with the others.
Help me help the community
If you see any issue when adding your strategy logic to that template regarding the orders fills on your Metatrader, please let me know in the comments.
I'll use your feedback to make this template more robust. :)
What's next?
I'll publish a more generic template built as a connector so you can connect any indicator to that Pineconnector template.
Then, I'll publish a template for Capitalise AI, ProfitView, AutoView, and Alertatron.
Thank you
Dave
Interactive MA Stop Loss [TANHEF]This indicator is "Interactive." Once added to the chart, you need to click the start point for the moving average stoploss. Dragging it afterward will modify its position.
Why choose this indicator over a traditional Moving Average?
To accurately determine that a wick has crossed a moving average, you must examine the moving average's range on that bar (blue area on this indicator) and ensure the wick fully traverses this area.
When the price moves away from a moving average, the average also shifts towards the price. This can make it look like the wick crossed the average, even if it didn't.
How is the moving average area calculated?
For each bar, the moving average calculation is standard, but when the current bar is involved, its high or low is used instead of the close. For precise results, simply setting the source in a typical moving average calculation to 'Low' or 'High' is not sufficient in calculating the moving average area on a current bar.
Moving Average Options:
Simple Moving Average
Exponential Moving Average
Relative Moving Average
Weighted Moving Average
Indicator Explanation
After adding indicator to chart, you must click on a location to begin an entry.
The moving average type can be set and length modified to adjust the stoploss. An optional profit target may be added.
A symbol is display when the stoploss and profit target are hit. If a position is create that is not valid, "Overlapping MA and Bar" is displayed.
Alerts
'Check' alerts to use within indicator settings (stop hit and/or profit target hit).
Select 'Create Alert'
Set the condition to 'Interactive MA''
Select create.
Alert messages can have additional details using these words in between two Curly (Brace) Brackets:
{{stop}} = MA stop-loss (price)
{{upper}} = Upper MA band (price)
{{lower}} = Lower MA band (price)
{{band}} = Lower or Upper stoploss (word)
{{type}} = Long or Short stop-loss (word)
{{stopdistance}} = Stoploss Distance (%)
{{targetdistance}} = Target Distance (%)
{{starttime}} = Start time of stoploss (day:hour:minute)
{{maLength}} = MA Length (input)
{{maType}} = MA Type (input)
{{target}} = Price target (price)
{{trigger}} = Wick or Close Trigger input (input)
{{ticker}} = Ticker of chart (word)
{{exchange}} = Exchange of chart (word)
{{description}} = Description of ticker (words)
{{close}} = Bar close (price)
{{open}} = Bar open (price)
{{high}} = Bar high (price)
{{low}} = Bar low (price)
{{hl2}} = Bar HL2 (price)
{{volume}} = Bar volume (value)
{{time}} = Current time (day:hour:minute)
{{interval}} = Chart timeframe
{{newline}} = New line for text
I will add further moving averages types in the future. If you suggestions post them below.
Clone Pivots. Oct_2023Conceptually very simple.
The all time high or low of the chart (this indicator can be used with non-price sources as well), is used to divide the price pane continuously by 2.
For example the first pivot is (All Time High + All Time Low)/2.
From this point the price chart is further divided by 2.
The user can set the depth of division, and the lines for depth are only shown around the price.
About clone pivots.
- they can be used for ladder trading
- they are based on the range of the stock or instrument price
An alternative is available to use Fib divisions rather than simple divide by 2 method.
Labels may be placed with price or without. And depth of labelling is also an option.
Clone pivots at 50% tend to work very well with price structures - give it a try and see if it helps your trading!
Pine source uses UDTs, Methods, Arrays and Maps.
Double RSI 00 1.0This script creates a custom indicator, visualizes two RSI values (RSI1 and RSI2) on the chart and generates alerts based on different RSI-related conditions, which can be used for technical analysis and trading strategies. Users can customize the RSI parameters and alert levels according to their preferences.
It includes several input parameters that allow the user to customize the RSI calculations and overbought/oversold levels. These parameters include:
length_1: RSI1 Length (default: 7)
length_2: RSI2 Length (default: 12)
overbought_1: Overbought Signal level for RSI1 (default: 75)
oversold_1: Oversold Signal level for RSI1 (default: 25)
overbought_2: High Overbought Signal level for RSI1 (default: 85)
oversold_2: High Oversold Signal level for RSI1 (default: 15)
The script calculates two RSI values: rsi_1 and rsi_2, based on the high and low prices averaged (hl2) and the specified RSI lengths.
It plots these RSI values on the chart using different colors and line widths.
Several horizontal lines are drawn on the chart to represent key levels:
h0: 0 (Lower Band)
h1: 50 (Middle Band)
h2: 100 (Upper Band)
h3: The Oversold level (customizable)
h4: The Overbought level (customizable)
h5: The High Oversold level (customizable)
h6: The High Overbought level (customizable)
The script defines alert conditions for various signals, including overbought, oversold, high overbought, high oversold, long (crossover between RSI1 and RSI2), and short (crossunder between RSI1 and RSI2).
It sends alerts when these conditions are met, indicating potential trading signals.
Please note that this script is meant for educational purposes and should be used cautiously in a real trading environment. It's important to have a thorough understanding of technical analysis and risk management when using such indicators in actual trading.
IU Break of any session StrategyHow this script works:
1. This script is an intraday trading strategy script which buy and sell on the bases of user-defined intraday session range breakout and gives alert(if the alert is set) message too when the new position is open.
2. It calculate the session as per the user inputs or user defined custom session.
3. The script stores the highest and lowest value of the whole session.
4. It take a long position on the first break and close above the highest value.
5. It take a short position on the break and close below the lowest value.
6. The script takes one position in one day.
7. The stop loss for this script is the previous low(if long) or high(if short).
8. Take profit is 1:2 and it's adjustable.
9. This script work on every kind of market.
How The Useful For The User :
1. User can backtest any session range breakout he wants to trade.
2. User can get alert when the new position is open.
3. User can change the Risk to Reward in order to find the best Risk to Reward.
4. User can see the highest and lowest value of the session with respect to analyzing his trading objective.
5. This strategy script highlights which session range breakout performs best and which performs worst.
SizeblockPrice change indicator in the form of diagonal rows.
The calculation is based on the percentage or tick deviation of the price movement (indicated in the "Deviation" parameter), which is displayed on the chart in the form of rows.
The row consists of the base middle line, upper and lower limits:
The middle line is the basis for the upper and lower limits of the current row.
The upper and lower limits are deviations from the base middle line of the current row.
The base middle line is equal to the upper or lower limits of the previous row (if the price changes rapidly in one time interval, then the base middle line of the current row is greater than the upper limit of the previous row or less than the lower limit of the previous row by an equal number of deviations depending on the direction of price movement). At the beginning of the calculation, the base middle line is equal to the initial value of the first row.
The "Quantity" parameter determines the deviation for the upper or lower limits depending on the direction of the price movement, and the "U-turn" parameter determines the deviation for changing the direction of the price movement.
The rule for constructing a new row:
The "Source" parameter accepts, depending on the choice, the price of high, low values or the closing price from the time interval of the chart.
When the price reaches the upper or lower limits of the row and goes beyond them, a new row is formed with the same parameters for deviation of the upper and lower limits from the base middle line, depending on the direction of price movement.
By adjusting certain deviations, you can clearly see the local trend and reversal points on the chart.
A useful tool for tracking price direction.
Thanks for your attention!
IU Probability CalculatorHow This Script Works:
1. This script calculate the probability of price reaching a user-defined price level within one candle with the help Normal Distribution Probability Table.
2. Normal Distribution Probability Table is use for calculating probability of events, it's very powerful for calculation of probability and this script is fully based on that table.
3. It takes the Average True Range value or Standard Deviation value of past user-defined length bar.
4. After that it take this formula z = ( price_level - close ) / (ATR or Standard Deviation) and return the value for z, for the bearish side it take z = (close - price level) / (ATR or Standard Deviation ) formula.
5. Once we have the z it look into Normal Distribution Probability Table and match the value.
6. Now the value of z is multiple buy 100 in order to make it look in percentage term.
7. After that this script subtract the final value with 100 because probability always comes under 100%
8. finally we plot the probability at the bottom of the chart the red line indicates "The probability of price not reaching that price level", While the green line indicates "Probability of price Reaching that level " .
9. This script will work fine for both of the directions
How This Is Useful For The User:
1. With this script user can know the probability of price reaching the certain level within one candle for both Directions .
2. This is useful while creating options hedging strategies
3. This can be helpful for deciding stop loss level.
4. It's useful for scalpers for managing their traders and it can be use by binary option traders.
IU Average move How The Script Works :
1. This script calculate the average movement of the price in a user defined custom session and plot the data in a table from on top left corner of the chart.
2. The script takes highest and lowest value of that custom session and store their difference into an array.
3. Then the script average the array thus gets the average price.
4. Addition to that the script converter the price pip change into percentage in order to calculate the value in percentage form.
5. This script is pure price action based the script only take price value and doesn't take any indicator for calculation.
6. The script works on every type of market.
7. If the session is invalid it returns nothing
8. The background color, text color and transparency is changeable.
How User Can Benefit From This Script:
1. User can understand the volatility of any session that he/she wish to trade.
2. It can be helpful for understanding the average price moment of any tradeble asset.
3. It will give the average price movement both in percentage and points bases.
4. By understanding the volatility user can adjust his stop loss or take profit with respect his risk management.
Global Central Banks Balance Sheet USD-AdjustedSumming up central banks balance sheet of:
US , China, EU, Japan, UK,
Swiss, Australia, Canada, Norway
Brazil, Russia, India, Mexico, Indonesia
Taiwan, HK, Korea, SG, Thailand
Then adjusting it to USD as the common denominator for comparison.
Net Foreign Assets (or foreign reserves) + Net Domestic Assets (or domestic credit, usually Money Supply M1) = Total Assets of the Central Bank Balance Sheet
In some way, the central bank balance sheet could be M2. However, I find some of the indicators don't add up and I don't have the time to check them out. This indicator is just a proxy. The issue with using central bank balance sheet to determine liquidity in the system is that it doesn't account for 1) collateral used for liquidity management in the public and private system, 2) shadow-banking financial system. As usual, US + EU + Japan publishes their data every weekly and the rest of the central banks publish monthly. I have removed any country with hard-pegged currencies except HK.
Additional materials to aid understanding:
www.imf.org
Tops & Bottoms - Time of Day Report█ OVERVIEW
The indicator tracks and reports the percentage of occurrence of daily tops and bottoms by the time of the day.
█ CONCEPTS
At certain times during the trading day, the market reverses and marks the high or low of the day. Tops and bottoms are vital when entering a trade, as they will decide if you are catching the train or being straight offside. They are equally crucial when exiting a position, as they will determine if you are closing at the optimal price or seeing your unrealized profits vanish.
This indicator is before all for educational purposes. It aims to make the knowledge available to all traders, facilitate understanding of the various markets, and ultimately get to know your trading pairs by heart.
Tops and bottoms percentage of occurrence on EURGBP (London time).
Up days versus down days on EURUSD (London time).
█ FEATURES
Selectable time zones
Present the column chart in your local time zone (or other market participants).
Configurable time range filter
Select the period to report from.
Day type filter
Analyze all days, or filter only up days or down days.
█ HOW TO USE
Plot the indicator and visit the 1-hour or 30-minute timeframe.
█ NOTES
Timeframe choice
The 1-hour timeframe produces a higher number of days sampled. Prefer the usage of the 30-minute timeframe when your market starts at 9:30 AM.
Daylight Saving Time (DST)
The exchange time and geographical time zone options may observe Daylight Saving Time, unlike UTC+0.
BearMetricsLooking at the financial health of a company is a critical aspect of stock analysis because it provides essential insights into the company's ability to generate profits, meet its financial obligations, and sustain its operations over the long term. Here are several reasons why assessing a company's financial health is important when evaluating a stock:
1. **Profitability and Earnings Growth**: A company's financial statements, particularly the income statement, provide information about its profitability. Analyzing earnings and revenue trends over time can help you assess whether the company is growing or declining. Investors generally prefer companies that show consistent earnings growth.
2. **Risk Assessment**: Financial statements, including the balance sheet and income statement, offer a comprehensive view of a company's assets, liabilities, and equity. By evaluating these components, you can gauge the level of financial risk associated with the stock. A healthy balance sheet typically includes a manageable debt load and strong equity.
3. **Cash Flow Analysis**: Cash flow statements reveal how effectively a company manages its cash, which is crucial for day-to-day operations, debt servicing, and future investments. Positive cash flow is essential for a company's stability and growth prospects.
4. **Debt Levels**: Examining a company's debt levels and debt-to-equity ratio can help you determine its leverage. High debt levels can be a cause for concern, as they may indicate that the company is at risk of financial distress, especially if it struggles to meet interest payments.
5. **Liquidity**: Liquidity is vital for a company's short-term survival. By assessing a company's current assets and current liabilities, you can gauge its ability to meet its short-term obligations. Companies with low liquidity may face difficulties during economic downturns or unexpected financial challenges.
6. **Dividend Sustainability**: If you're an income-oriented investor interested in dividend-paying stocks, you'll want to ensure that the company can sustain its dividend payments. A healthy balance sheet and consistent cash flow can provide confidence in dividend sustainability.
7. **Investment Confidence**: A company with a strong financial position is more likely to attract investor confidence and positive sentiment. This can lead to higher stock prices and a lower cost of capital for the company, which can be beneficial for its growth initiatives.
8. **Risk Mitigation**: By assessing a company's financial health, you can mitigate investment risk. Understanding a company's financial position allows you to make more informed decisions about the level of risk you are comfortable with and whether a particular stock aligns with your risk tolerance.
9. **Long-Term Viability**: Ultimately, investors are interested in companies that have the potential for long-term success. A company with a healthy financial foundation is more likely to weather economic downturns, adapt to industry changes, and thrive over the years.
In summary, examining a company's financial health is a fundamental aspect of stock analysis because it provides a comprehensive picture of the company's current state and its ability to navigate future challenges and capitalize on opportunities. It helps investors make informed decisions and assess the long-term prospects of a stock in their portfolio.
sᴛᴀɢᴇ ᴀɴᴀʏʟsɪsStage analysis is a technical analysis approach that involves categorizing a stock's price movements into different stages to help traders and investors make more informed decisions. It was popularized by Stan Weinstein in his book, "Secrets for Profiting in Bull and Bear Markets." The stages are used to identify the overall trend and to time entries and exits in the market. Here's an explanation of the typical stages in stage analysis:
1. **Stage 1: Accumulation Phase**
- In this stage, the stock is in a downtrend or has been trading sideways for an extended period.
- Volume is relatively low, indicating that institutions and smart money may be quietly accumulating shares.
- The stock may test and hold support levels, showing signs of stability.
- The goal for traders in this stage is to identify the potential for a trend reversal.
2. **Stage 2: Markup (Bull Market) Phase**
- This is the stage where the stock starts a significant uptrend.
- Volume increases as institutional and retail investors become more interested in the stock.
- Technical indicators like moving averages and trendlines confirm the uptrend.
- Traders and investors look for buying opportunities during pullbacks or consolidations within the uptrend.
3. **Stage 3: Distribution Phase**
- In this stage, the stock's price begins to show signs of weakness.
- Volume might decrease as institutions and smart money start selling their positions.
- The stock may start forming a trading range or exhibit bearish chart patterns.
- Traders should consider taking profits or reducing exposure to the stock as it may enter a downtrend.
4. **Stage 4: Markdown (Bear Market) Phase**
- This is the stage where the stock enters a significant downtrend.
- Volume may remain elevated as selling pressure dominates.
- Technical indicators confirm the downtrend.
- Traders and investors should avoid buying the stock and may consider short-selling or staying on the sidelines.
Stage analysis helps traders and investors make decisions based on the current stage of a stock's price movement. The goal is to enter during the accumulation phase or early in the markup phase and exit during the distribution phase or before the markdown phase to maximize profits and minimize losses.
=============================================================
try to just show the Stage number in a table, but always double check for yourself
skThis Pine Script is an indicator designed to mark and highlight specific trading sessions on a TradingView chart. Here's a description of the script's functionality:
1. *Session Selection*: The script allows you to select a session time frame using the `session_input` input. The available options for session time frames are "D" (daily), "W" (weekly), "M" (monthly), "H" (hourly), "15" (15 minutes), "5" (5 minutes), and "1" (1 minute).
2. *Session Times*: You can specify the start and end times for three different trading sessions - CBDR (Central Bank Dealer Range), Asia, and London - using the corresponding input options. These times are specified in Indian Standard Time (IST).
3. *Time Calculation*: The script calculates the start and end times for each session based on the specified hours and minutes. It uses the `timestamp` function to create time objects for these sessions.
4. *Session Highlighting*: The script creates rectangles on the chart to highlight each session:
- CBDR Session: A gray rectangle is drawn during the CBDR session time.
- Asia Session: Another gray rectangle is drawn during the Asia session time.
- London Session: A green rectangle is drawn at the top of the chart during the London session time.
5. *Transparency*: The rectangles have a transparency level of 90%, allowing you to see the price data beneath them while still marking the sessions.
6. *Overlay*: The indicator is set to overlay on the price chart, so it doesn't obstruct the price data.
7. *Customization*: You can customize the session times and appearance by adjusting the input values in the settings panel of the indicator.
Overall, this script provides a visual way to identify and highlight specific trading sessions on your TradingView chart, helping traders understand price action in different market sessions.
Double MACD Pattern 1.0This script is designed to assist traders in identifying potential trading signals and trends based on the MACD indicator. Users can adjust the input parameters to fine-tune the indicator to their trading preferences. When specific conditions are met, alerts are generated to notify the user of potential trading opportunities.
Indicator Description:
The script defines a custom indicator that calculates and plots two sets of Moving Average Convergence Divergence (MACD) lines along with their signal lines.
It allows users to configure various parameters for MACD calculation, such as fast and slow lengths for both MACD 1 and MACD 2, as well as signal lengths for both.
Plotting:
The script plots the MACD lines and signal lines for both MACD 1 and MACD 2 on the chart with different colors and line styles.
It also plots a middle line at zero for reference.
Alerts:
The script defines conditions for generating alerts based on MACD crossover and crossunder events for both MACD 1 and MACD 2.
Alerts are generated for the following scenarios:
A long signal is generated when MACD 1 crosses under its signal line while MACD 2 crosses over its signal line.
A short signal is generated when MACD 1 crosses over its signal line while MACD 2 crosses under its signal line.
An up trend signal is generated when MACD 2 crosses over MACD 1.
A down trend signal is generated when MACD 1 crosses over MACD 2.
Alerts are included in the script to notify users of these specific trading signals.
Please note that this script is meant for educational purposes and should be used cautiously in a real trading environment. It's important to have a thorough understanding of technical analysis and risk management when using such indicators in actual trading.
Rule of 16 - LowerThe "Rule of 16" is a simple guideline used by traders and investors to estimate the expected annualized volatility of the S&P 500 Index (SPX) based on the level of the CBOE Volatility Index (VIX). The VIX, often referred to as the "fear gauge" or "fear index," measures the market's expectations for future volatility. It is calculated using the implied volatility of a specific set of S&P 500 options.
The Rule of 16 provides a rough approximation of the expected annualized percentage change in the S&P 500 based on the VIX level. Here's how it works:
Find the VIX level: Look up the current value of the VIX. Let's say it's currently at 20.
Apply the Rule of 16: Divide the VIX level by 16. In this example, 20 divided by 16 equals 1.25.
Result: The result of this calculation represents the expected annualized percentage change in the S&P 500. In this case, 1.25% is the estimated annualized volatility.
So, according to the Rule of 16, a VIX level of 20 suggests an expected annualized volatility of approximately 1.25% in the S&P 500.
Here's how you can use the Rule of 16:
Market Sentiment: The VIX is often used as an indicator of market sentiment. When the VIX is high (above its historical average), it suggests that investors expect higher market volatility, indicating potential uncertainty or fear in the markets. Conversely, when the VIX is low, it suggests lower expected volatility and potentially more confidence in the markets.
Risk Management: Traders and investors can use the Rule of 16 to estimate the potential risk associated with their portfolios. For example, if you have a portfolio of S&P 500 stocks and the VIX is at 20, you can use the Rule of 16 to estimate that the annualized volatility of your portfolio may be around 1.25%. This information can help you make decisions about position sizing and risk management.
Option Pricing: Options traders may use the Rule of 16 to get a quick estimate of the implied annualized volatility priced into S&P 500 options. It can help them assess whether options are relatively expensive or cheap based on the VIX level.
It's important to note that the Rule of 16 is a simplification and provides only a rough estimate of expected volatility. Market conditions and the relationship between the VIX and the S&P 500 can change over time. Therefore, it should be used as a guideline rather than a precise forecasting tool. Traders and investors should consider other factors and use additional analysis to make informed decisions.
Median of Means Estimator Median of Means (MoM) is a measure of central tendency like mean (average) and median. However, it could be a better and robust estimator of central tendency when the data is not normal, asymmetric, have fat tails (like stock price data) and have outliers. The MoM can be used as a robust trend following tool and in other derived indicators.
Median of means (MoM) is calculated as follows, the MoM estimator shuffles the "n" data points and then splits them into k groups of m data points (n= k*m). It then computes the Arithmetic Mean of each group (k). Finally, it calculate the median over the resulting k Arithmetic Means. This technique diminishes the effect that outliers have on the final estimation by splitting the data and only considering the median of the resulting sub-estimations. This preserves the overall trend despite the data shuffle.
Below is an example to illustrate the advantages of MoM
Set A Set B Set C
3 4 4
3 4 4
3 5 5
3 5 5
4 5 5
4 5 5
5 5 5
5 5 5
6 6 8
6 6 8
7 7 10
7 7 15
8 8 40
9 9 50
10 100 100
Median 5 5 5
Mean 5.5 12.1 17.9
MoM 5.7 6.0 17.3
For all three sets the median is the same, though set A and B are the same except for one outlier in set B (100) it skews the mean but the median is resilient. However, in set C the group has several high values despite that the median is not responsive and still give 5 as the central tendency of the group, but the median of means is a value of 17.3 which is very close to the group mean 17.9. In all three cases (set A, B and C) the MoM provides a better snapshot of the central tendency of the group. Note: The MoM is dependent on the way we split the data initially and the value might slightly vary when the randomization is done sevral time and the resulting value can give the confidence interval of the MoM estimator.
Average True Range (ATR) % KTSLSome traders calculate using percentages when trading. The original ATR indicator calculates using price movements, so it differs for each stock. To avoid this, I changed the ATR indicator to show price movement as a percentage. The red line is the percentage value of the volatility of the original ATR indicator. The white line is 1.6 times the original indicator. The green line is 2.5 times the white line. These values can be adjusted. I wish you good luck.
Position calculator [krazke]This indicator will help you calculate your position. This will automatically calculate potential liquidation price and select leverage for your stop loss and risk size.
How to use it:
1. Select position direction. (long checkmark - selected if it's long)
2. Select entry. If you want to use custom entry price select checkmark and set value. (Current price is default entry)
3. Enter stop loss.
4. Enter risk.
5. Enter max leverage for current ticker.
P.S. Liquidation price is not 100% correct but it almost.
Alxuse Supertrend 4EMA Buy and Sell for tutorialAll abilities of Supertrend, moreover :
Drawing 4 EMA band & the ability to change values, change colors, turn on/off show.
Sends Signal Sell and Buy in multi timeframe.
The ability used in the alert section and create customized alerts.
To receive valid alerts the replay section , the timeframe of the chart must be the same as the timeframe of the indicator.
Supertrend with a simple EMA Filter can improve the performance of the signals during a strong trend.
For detecting the continuation of the downward and upward trend we can use 4 EMA colors.
In the upward trend , the EMA lines are in order of green, blue, red, yellow from bottom to top.
In the downward trend, the EMA lines are in order of yellow, red, blue, green from bottom to top.
How it works:
x1 = MA1 < MA2 and MA2 < MA3 and MA3 < MA4 and ta.crossunder(MA3, MA4)
x2 = MA1 < MA2 and MA2 < MA3 and MA3 < MA4 and ta.crossunder(MA2, MA3)
x3 = MA1 < MA2 and MA2 < MA3 and MA3 < MA4 and ta.crossunder(MA1, MA2)
y1 = MA4 < MA3 and MA3 < MA2 and MA2 < MA1 and ta.crossover(MA3, MA4)
y2 = MA4 < MA3 and MA3 < MA2 and MA2 < MA1 and ta.crossover(MA2, MA3)
y3 = MA4 < MA3 and MA3 < MA2 and MA2 < MA1 and ta.crossover(MA1, MA2)
Red triangle = x1 or x2 or x3
Green triangle = y1 or y2 or y3
Long = BUY signal and followed by a Green triangle
Exit Long = SELL signal
Short = SELL signal and followed by a Red triangle
Exit Short = BUY signal
It is also possible to get help from the Stochastic RSI and MACD indicators for confirmation.
For receiving a signal with these two conditions or more conditions, i am making a video tutorial that I will release soon.
Supertrend
Definition
Supertrend is a trend-following indicator based on Average True Range (ATR). The calculation of its single line combines trend detection and volatility. It can be used to detect changes in trend direction and to position stops.
The basics
The Supertrend is a trend-following indicator. It is overlaid on the main chart and their plots indicate the current trend. A Supertrend can be used with varying periods (daily, weekly, intraday etc.) and on varying instruments.
The Supertrend has several inputs that you can adjust to match your trading strategy. Adjusting these settings allows you to make the indicator more or less sensitive to price changes.
For the Supertrend inputs, you can adjust atrLength and multiplier:
the atrLength setting is the lookback length for the ATR calculation;
multiplier is what the ATR is multiplied by to offset the bands from price.
When the price falls below the indicator curve, it turns red and indicates a downtrend. Conversely, when the price rises above the curve, the indicator turns green and indicates an uptrend. After each close above or below Supertrend, a new trend appears.
Summary
The Supertrend helps you make the right trading decisions. However, there are times when it generates false signals. Therefore, it is best to use the right combination of several indicators. Like any other indicator, Supertrend works best when used with other indicators such as MACD, Parabolic SAR, or RSI.
Exponential Moving Average
Definition
The Exponential Moving Average (EMA) is a specific type of moving average that points towards the importance of the most recent data and information from the market. The Exponential Moving Average is just like it’s name says - it’s exponential, weighting the most recent prices more than the less recent prices. The EMA can be compared and contrasted with the simple moving average.
Similar to other moving averages, the EMA is a technical indicator that produces buy and sell signals based on data that shows evidence of divergence and crossovers from general and historical averages. Additionally, the EMA tries to amplify the importance that the most recent data points play in a calculation.
It is common to use more than one EMA length at once, to provide more in-depth and focused data. For example, by choosing 10-day and 200-day moving averages, a trader is able to determine more from the results in a long-term trade, than a trader who is only analyzing one EMA length.
It’s best to use the EMA when for trending markets, as it shows uptrends and downtrends when a market is strong and weak, respectively. An experienced trader will know to look both at the line the EMA projects, as well as the rate of change that comes from each bar as it moves to the next data point. Analyzing these points and data streams correctly will help the trader determine when they should buy, sell, or switch investments from bearish to bullish or vice versa.
Short-term averages, on the other hand, is a different story when analyzing Exponential Moving Average data. It is most common for traders to quote and utilize 12- and 26-day EMAs in the short-term. This is because they are used to create specific indicators. Look into Moving Average Convergence Divergence (MACD) for more information. Similarly, the 50- and 200-day moving averages are most common for analyzing long-term trends.
Moving averages can be very useful for traders using technical analysis for profit. It is important to identify and realize, however, their shortcomings, as all moving averages tend to suffer from recurring lag. It is difficult to modify the moving average to work in your favor at times, often having the preferred time to enter or exit the market pass before the moving average even shows changes in the trend or price movement for that matter.
All of this is true, however, the EMA strives to make this easier for traders. The EMA is unique because it places more emphasis on the most recent data. Therefore, price movement and trend reversals or changes are closely monitored, allowing for the EMA to react quicker than other moving averages.
Limitations
Although using the Exponential Moving Average has a lot of advantages when analyzing market trends, it is also uncertain whether or not the use of most recent data points truly affects technical and market analysis. In addition, the EMA relies on historical data as its basis for operating and because news, events, and other information can change rapidly the indicator can misinterpret this information by weighting the current prices higher than when the event actually occurred.
Summary
The Exponential Moving Average (EMA) is a moving average and technical indicator that reflects and projects the most recent data and information from the market to a trader and relies on a base of historical data. It is one of many different types of moving averages and has an easily calculable formula.
The added features to the indicator are made for training, it is advisable to use it with caution in tradings.
Alxuse Stochastic RSI for tutorial All abilities of Stochastic RSI, moreover :
Drawing upper band and lower band & the ability to change values, change colors, turn on/off show.
Crossing K line and D line in multi timeframe & there are symbols (Circles) with green color (Buy) and red color (Sell) & the ability to change colors, turn on/off show.
Crossing K line and D line in multi timeframe according to the values of upper band and lower band & there are symbols (Triangles) with green color (Long) and red color (Short) & the ability to change colors, turn on/off show.
The ability used in the alert section and create customized alerts.
To receive valid alerts the replay section , the timeframe of the chart must be the same as the timeframe of the indicator.
Stochastic RSI (STOCH RSI)
Definition
The Stochastic RSI indicator (Stoch RSI) is essentially an indicator of an indicator. It is used in technical analysis to provide a stochastic calculation to the RSI indicator. This means that it is a measure of RSI relative to its own high/low range over a user defined period of time. The Stochastic RSI is an oscillator that calculates a value between 0 and 1 which is then plotted as a line. This indicator is primarily used for identifying overbought and oversold conditions.
The basics
It is important to remember that the Stoch RSI is an indicator of an indicator making it two steps away from price. RSI is one step away from price and therefore a stochastic calculation of the RSI is two steps away. This is important because as with any indicator that is multiple steps away from price, Stoch RSI can have brief disconnects from actual price movement. That being said, as a range bound indicator, the Stoch RSI's primary function is identifying crossovers as well as overbought and oversold conditions.
The basics
It is important to remember that the Stoch RSI is an indicator of an indicator making it two steps away from price. RSI is one step away from price and therefore a stochastic calculation of the RSI is two steps away. This is important because as with any indicator that is multiple steps away from price, Stoch RSI can have brief disconnects from actual price movement. That being said, as a range bound indicator, the Stoch RSI's primary function is identifying crossovers as well as overbought and oversold conditions.
Overbought/Oversold
Overbought and Oversold conditions are traditionally different than the RSI. While RSI overbought and oversold conditions are traditionally set at 70 for overbought and 30 for oversold, Stoch RSI are typically .80 and .20 respectively. When using the Stoch RSI, overbought and oversold work best when trading along with the underlying trend.
During an uptrend, look for oversold conditions for points of entry.
During a downtrend, look for overbought conditions for points of entry.
Summary
When using Stoch RSI in technical analysis, a trader should be careful. By adding the Stochastic calculation to RSI, speed is greatly increased. This can generate many more signals and therefore more bad signals as well as the good ones. Stoch RSI needs to be combined with additional tools or indicators in order to be at its most effective. Using trend lines or basic chart pattern analysis can help to identify major, underlying trends and increase the Stoch RSI's accuracy. Using Stoch RSI to make trades that go against the underlying trend is a dangerous proposition.
The added features to the indicator are made for training, it is advisable to use it with caution in tradings.