4 Bar Momentum Reversal strategy█ STRATEGY DESCRIPTION
The "4 Bar Momentum Reversal Strategy" is a mean-reversion strategy designed to identify price reversals following a sustained downward move. It enters a long position when a reversal condition is met and exits when the price shows strength by exceeding the previous bar's high. This strategy is optimized for indices and stocks on the daily timeframe.
█ WHAT IS THE REFERENCE CLOSE?
The Reference Close is the closing price from X bars ago, where X is determined by the Lookback period. Think of it as a moving benchmark that helps the strategy assess whether prices are trending upwards or downwards relative to past performance. For example, if the Lookback is set to 4, the Reference Close is the closing price 4 bars ago (`close `).
█ SIGNAL GENERATION
1. LONG ENTRY
A Buy Signal is triggered when:
The close price has been lower than the Reference Close for at least `Buy Threshold` consecutive bars. This indicates a sustained downward move, suggesting a potential reversal.
The signal occurs within the specified time window (between `Start Time` and `End Time`).
2. EXIT CONDITION
A Sell Signal is generated when the current closing price exceeds the high of the previous bar (`close > high `). This indicates that the price has shown strength, potentially confirming the reversal and prompting the strategy to exit the position.
█ ADDITIONAL SETTINGS
Buy Threshold: The number of consecutive bearish bars needed to trigger a Buy Signal. Default is 4.
Lookback: The number of bars ago used to calculate the Reference Close. Default is 4.
Start Time and End Time: The time window during which the strategy is allowed to execute trades.
█ PERFORMANCE OVERVIEW
This strategy is designed for trending markets with frequent reversals.
It performs best in volatile conditions where price movements are significant.
Backtesting results should be analysed to optimize the Buy Threshold and Lookback parameters for specific instruments.
Indices
Turn around Tuesday on Steroids Strategy█ STRATEGY DESCRIPTION
The "Turn around Tuesday on Steroids Strategy" is a mean-reversion strategy designed to identify potential price reversals at the start of the trading week. It enters a long position when specific conditions are met and exits when the price shows strength by exceeding the previous bar's high. This strategy is optimized for ETFs, stocks, and other instruments on the daily timeframe.
█ WHAT IS THE STARTING DAY?
The Starting Day determines the first day of the trading week for the strategy. It can be set to either Sunday or Monday, depending on the instrument being traded. For ETFs and stocks, Monday is recommended. For other instruments, Sunday is recommended.
█ SIGNAL GENERATION
1. LONG ENTRY
A Buy Signal is triggered when:
The current day is the first day of the trading week (either Sunday or Monday, depending on the Starting Day setting).
The close price is lower than the previous day's close (`close < close `).
The previous day's close is also lower than the close two days ago (`close < close `).
The signal occurs within the specified time window (between `Start Time` and `End Time`).
If the MA Filter is enabled, the close price must also be above the 200-period Simple Moving Average (SMA).
2. EXIT CONDITION
A Sell Signal is generated when the current closing price exceeds the high of the previous bar (`close > high `). This indicates that the price has shown strength, potentially confirming the reversal and prompting the strategy to exit the position.
█ ADDITIONAL SETTINGS
Starting Day: Determines the first day of the trading week. Options are Sunday or Monday. Default is Sunday.
Use MA Filter: Enables or disables the 200-period SMA filter for long entries. Default is disabled.
Start Time and End Time: The time window during which the strategy is allowed to execute trades.
█ PERFORMANCE OVERVIEW
This strategy is designed for markets with frequent weekly reversals.
It performs best in volatile conditions where price movements are significant at the start of the trading week.
Backtesting results should be analysed to optimize the Starting Day and MA Filter settings for specific instruments.
3 Down, 3 Up Strategy█ STRATEGY DESCRIPTION
The "3 Down, 3 Up Strategy" is a mean-reversion strategy designed to capitalize on short-term price reversals. It enters a long position after consecutive bearish closes and exits after consecutive bullish closes. This strategy is NOT optimized and can be used on any timeframes.
█ WHAT ARE CONSECUTIVE DOWN/UP CLOSES?
- Consecutive Down Closes: A sequence of trading bars where each close is lower than the previous close.
- Consecutive Up Closes: A sequence of trading bars where each close is higher than the previous close.
█ SIGNAL GENERATION
1. LONG ENTRY
A Buy Signal is triggered when:
The price closes lower than the previous close for Consecutive Down Closes for Entry (default: 3) consecutive bars.
The signal occurs within the specified time window (between Start Time and End Time).
If enabled, the close price must also be above the 200-period EMA (Exponential Moving Average).
2. EXIT CONDITION
A Sell Signal is generated when the price closes higher than the previous close for Consecutive Up Closes for Exit (default: 3) consecutive bars.
█ ADDITIONAL SETTINGS
Consecutive Down Closes for Entry: Number of consecutive lower closes required to trigger a buy. Default = 3.
Consecutive Up Closes for Exit: Number of consecutive higher closes required to exit. Default = 3.
EMA Filter: Optional 200-period EMA filter to confirm long entries in bullish trends. Default = disabled.
Start Time and End Time: Restrict trading to specific dates (default: 2014-2099).
█ PERFORMANCE OVERVIEW
Designed for volatile markets with frequent short-term reversals.
Performs best when price oscillates between clear support/resistance levels.
The EMA filter improves reliability in trending markets but may reduce trade frequency.
Backtest to optimize consecutive close thresholds and EMA period for specific instruments.
Consecutive Bars Above/Below EMA Buy the Dip Strategy█ STRATEGY DESCRIPTION
The "Consecutive Bars Above/Below EMA Buy the Dip Strategy" is a mean-reversion strategy designed to identify potential buying opportunities when the price dips below a moving average for a specified number of consecutive bars. It enters a long position when the dip condition is met and exits when the price shows strength by exceeding the previous bar's high. This strategy is suitable for use on various timeframes.
█ WHAT IS THE MOVING AVERAGE?
The strategy uses either a Simple Moving Average (SMA) or an Exponential Moving Average (EMA) as a reference for identifying dips. The type and length of the moving average can be customized in the settings.
█ SIGNAL GENERATION
1. LONG ENTRY
A Buy Signal is triggered when:
The close price is below the selected moving average for a specified number of consecutive bars (`consecutiveBarsTreshold`).
The signal occurs within the specified time window (between `Start Time` and `End Time`).
2. EXIT CONDITION
A Sell Signal is generated when the current closing price exceeds the high of the previous bar (`close > high `). This indicates that the price has shown strength, potentially confirming the reversal and prompting the strategy to exit the position.
█ ADDITIONAL SETTINGS
Consecutive Bars Threshold: The number of consecutive bars the price must remain below the moving average to trigger a Buy Signal. Default is 3.
MA Type: The type of moving average used (SMA or EMA). Default is SMA.
MA Length: The length of the moving average. Default is 5.
Start Time and End Time: The time window during which the strategy is allowed to execute trades.
█ PERFORMANCE OVERVIEW
This strategy is designed for mean-reverting markets and performs best when the price frequently oscillates around the moving average.
It is sensitive to the number of consecutive bars below the moving average, which helps to identify potential dips.
Backtesting results should be analysed to optimize the Consecutive Bars Threshold, MA Type, and MA Length for specific instruments.
Internal Bar Strength (IBS) Strategy█ STRATEGY DESCRIPTION
The "Internal Bar Strength (IBS) Strategy" is a mean-reversion strategy designed to identify trading opportunities based on the closing price's position within the daily price range. It enters a long position when the IBS indicates oversold conditions and exits when the IBS reaches overbought levels. This strategy was designed to be used on the daily timeframe.
█ WHAT IS INTERNAL BAR STRENGTH (IBS)?
Internal Bar Strength (IBS) measures where the closing price falls within the high-low range of a bar. It is calculated as:
IBS = (Close - Low) / (High - Low)
- **Low IBS (≤ 0.2)**: Indicates the close is near the bar's low, suggesting oversold conditions.
- **High IBS (≥ 0.8)**: Indicates the close is near the bar's high, suggesting overbought conditions.
█ SIGNAL GENERATION
1. LONG ENTRY
A Buy Signal is triggered when:
The IBS value drops below the Lower Threshold (default: 0.2).
The signal occurs within the specified time window (between `Start Time` and `End Time`).
2. EXIT CONDITION
A Sell Signal is generated when the IBS value rises to or above the Upper Threshold (default: 0.8). This prompts the strategy to exit the position.
█ ADDITIONAL SETTINGS
Upper Threshold: The IBS level at which the strategy exits trades. Default is 0.8.
Lower Threshold: The IBS level at which the strategy enters long positions. Default is 0.2.
Start Time and End Time: The time window during which the strategy is allowed to execute trades.
█ PERFORMANCE OVERVIEW
This strategy is designed for ranging markets and performs best when prices frequently revert to the mean.
It is sensitive to extreme IBS values, which help identify potential reversals.
Backtesting results should be analyzed to optimize the Upper/Lower Thresholds for specific instruments and market conditions.
3-Bar Low Strategy█ STRATEGY DESCRIPTION
The "3-Bar Low Strategy" is a mean-reversion strategy designed to identify potential buying opportunities when the price drops below the lowest low of the previous three bars. It enters a long position when specific conditions are met and exits when the price exceeds the highest high of the previous seven bars. This strategy is suitable for use on various timeframes.
█ WHAT IS THE 3-BAR LOW?
The 3-Bar Low is the lowest price observed over the last three bars. This level is used as a reference to identify potential oversold conditions and reversal points.
█ WHAT IS THE 7-BAR HIGH?
The 7-Bar High is the highest price observed over the last seven bars. This level is used as a reference to identify potential overbought conditions and exit points.
█ SIGNAL GENERATION
1. LONG ENTRY
A Buy Signal is triggered when:
The close price is below the lowest low of the previous three bars (`close < _lowest `).
The signal occurs within the specified time window (between `Start Time` and `End Time`).
If the EMA Filter is enabled, the close price must also be above the 200-period Exponential Moving Average (EMA).
2. EXIT CONDITION
A Sell Signal is generated when the current closing price exceeds the highest high of the previous seven bars (`close > _highest `). This indicates that the price has shown strength, potentially confirming the reversal and prompting the strategy to exit the position.
█ ADDITIONAL SETTINGS
MA Period: The lookback period for the 200-period EMA used in the EMA Filter. Default is 200.
Use EMA Filter: Enables or disables the EMA Filter for long entries. Default is disabled.
Start Time and End Time: The time window during which the strategy is allowed to execute trades.
█ PERFORMANCE OVERVIEW
This strategy is designed for mean-reverting markets and performs best when the price frequently oscillates around key support and resistance levels.
It is sensitive to oversold conditions, as indicated by the 3-Bar Low, and overbought conditions, as indicated by the 7-Bar High.
Backtesting results should be analyzed to optimize the MA Period and EMA Filter settings for specific instruments.
Buy on 5 day low Strategy█ STRATEGY DESCRIPTION
The "Buy on 5 Day Low Strategy" is a mean-reversion strategy designed to identify potential buying opportunities when the price drops below the lowest low of the previous five days. It enters a long position when specific conditions are met and exits when the price exceeds the high of the previous day. This strategy is optimized for use on daily or higher timeframes.
█ WHAT IS THE 5-DAY LOW?
The 5-Day Low is the lowest price observed over the last five days. This level is used as a reference to identify potential oversold conditions and reversal points.
█ SIGNAL GENERATION
1. LONG ENTRY
A Buy Signal is triggered when:
The close price is below the lowest low of the previous five days (`close < _lowest `).
The signal occurs within the specified time window (between `Start Time` and `End Time`).
2. EXIT CONDITION
A Sell Signal is generated when the current closing price exceeds the high of the previous day (`close > high `). This indicates that the price has shown strength, potentially confirming the reversal and prompting the strategy to exit the position.
█ ADDITIONAL SETTINGS
Start Time and End Time: The time window during which the strategy is allowed to execute trades.
█ PERFORMANCE OVERVIEW
This strategy is designed for mean-reverting markets and performs best when the price frequently oscillates around key support levels.
It is sensitive to oversold conditions, as indicated by the 5-Day Low, and overbought conditions, as indicated by the previous day's high.
Backtesting results should be analyzed to optimize the strategy for specific instruments and market conditions.
Average High-Low Range + IBS Reversal Strategy█ STRATEGY DESCRIPTION
The "Average High-Low Range + IBS Reversal Strategy" is a mean-reversion strategy designed to identify potential buying opportunities when the price deviates significantly from its average high-low range and the Internal Bar Strength (IBS) indicates oversold conditions. It enters a long position when specific conditions are met and exits when the price shows strength by exceeding the previous bar's high. This strategy is suitable for use on various timeframes.
█ WHAT IS THE AVERAGE HIGH-LOW RANGE?
The Average High-Low Range is calculated as the Simple Moving Average (SMA) of the difference between the high and low prices over a specified period. It helps identify periods of increased volatility and potential reversal points.
█ WHAT IS INTERNAL BAR STRENGTH (IBS)?
Internal Bar Strength (IBS) is a measure of where the closing price is relative to the high and low of the bar. It is calculated as:
IBS = (Close - Low) / (High - Low)
A low IBS value (e.g., below 0.2) indicates that the close is near the low of the bar, suggesting oversold conditions.
█ SIGNAL GENERATION
1. LONG ENTRY
A Buy Signal is triggered when:
The close price has been below the buy threshold (calculated as `upper - (2.5 * hl_avg)`) for a specified number of consecutive bars (`bars_below_threshold`).
The IBS value is below the specified buy threshold (`ibs_buy_treshold`).
The signal occurs within the specified time window (between `Start Time` and `End Time`).
2. EXIT CONDITION
A Sell Signal is generated when the current closing price exceeds the high of the previous bar (`close > high `). This indicates that the price has shown strength, potentially confirming the reversal and prompting the strategy to exit the position.
█ ADDITIONAL SETTINGS
Length: The lookback period for calculating the average high-low range. Default is 20.
Bars Below Threshold: The number of consecutive bars the price must remain below the buy threshold to trigger a Buy Signal. Default is 2.
IBS Buy Threshold: The IBS value below which a Buy Signal is triggered. Default is 0.2.
Start Time and End Time: The time window during which the strategy is allowed to execute trades.
█ PERFORMANCE OVERVIEW
This strategy is designed for mean-reverting markets and performs best when the price frequently deviates from its average high-low range.
It is sensitive to oversold conditions, as indicated by the IBS, which helps to identify potential reversals.
Backtesting results should be analyzed to optimize the Length, Bars Below Threshold, and IBS Buy Threshold parameters for specific instruments.
Consecutive Bearish Candle Strategy█ STRATEGY DESCRIPTION
The "Consecutive Bearish Candle Strategy" is a momentum-based strategy designed to identify potential reversals after a sustained bearish move. It enters a long position when a specific number of consecutive bearish candles occur and exits when the price shows strength by exceeding the previous bar's high. This strategy is optimized for use on various timeframes and instruments.
█ SIGNAL GENERATION
1. LONG ENTRY
A Buy Signal is triggered when:
The close price has been lower than the previous close for at least `Lookback` consecutive bars. This indicates a sustained bearish move, suggesting a potential reversal.
The signal occurs within the specified time window (between `Start Time` and `End Time`).
2. EXIT CONDITION
A Sell Signal is generated when the current closing price exceeds the high of the previous bar (`close > high `). This indicates that the price has shown strength, potentially confirming the reversal and prompting the strategy to exit the position.
█ ADDITIONAL SETTINGS
Lookback: The number of consecutive bearish bars required to trigger a Buy Signal. Default is 3.
Start Time and End Time: The time window during which the strategy is allowed to execute trades.
█ PERFORMANCE OVERVIEW
This strategy is designed for markets with frequent momentum shifts.
It performs best in volatile conditions where price movements are significant.
Backtesting results should be analysed to optimize the `Lookback` parameter for specific instruments.
DMI Strategy█ STRATEGY DESCRIPTION
The "DMI Strategy" is a trend-following strategy that uses the Directional Movement Index (DMI) and a 200-period Exponential Moving Average (EMA) to identify potential long entries. It enters a long position when specific conditions are met and exits when the Relative Strength Index (RSI) indicates overbought conditions. This strategy is designed for use on daily or higher timeframes.
█ WHAT IS THE DMI?
The Directional Movement Index (DMI) consists of three components:
- **DI+ (Plus Directional Indicator)**: Measures upward trend strength.
- **DI- (Minus Directional Indicator)**: Measures downward trend strength.
- **ADX (Average Directional Index)**: Measures overall trend strength, regardless of direction.
In this strategy, only the DI+ and DI- components are used to identify potential entry signals.
█ SIGNAL GENERATION
1. LONG ENTRY
A Buy Signal is triggered when:
The DI+ value is less than 5, indicating weak upward momentum.
The close price is above the 200-period EMA, confirming a bullish trend.
The signal occurs within the specified time window (between `Start Time` and `End Time`).
2. EXIT CONDITION
A Sell Signal is generated when the 2-period RSI exceeds 65, indicating overbought conditions. This prompts the strategy to exit the position.
█ ADDITIONAL SETTINGS
DI Length: The lookback period for calculating the DMI components. Default is 3.
Start Time and End Time: The time window during which the strategy is allowed to execute trades.
█ PERFORMANCE OVERVIEW
This strategy is designed for trending markets and performs best when the price is above the 200-period EMA.
It is sensitive to overbought conditions, as indicated by the RSI, which helps to lock in profits.
Backtesting results should be analysed to optimize the DI Length and RSI parameters for specific instruments.
Turn of the Month Strategy on Steroids█ STRATEGY DESCRIPTION
The "Turn of the Month Strategy on Steroids" is a seasonal mean-reversion strategy designed to capitalize on price movements around the end of the month. It enters a long position when specific conditions are met and exits when the Relative Strength Index (RSI) indicates overbought conditions. This strategy is optimized for use on daily or higher timeframes.
█ WHAT IS THE TURN OF THE MONTH EFFECT?
The Turn of the Month effect refers to the observed tendency of stock prices to rise around the end of the month. This strategy leverages this phenomenon by entering long positions when the price shows signs of a reversal during this period.
█ SIGNAL GENERATION
1. LONG ENTRY
A Buy Signal is triggered when:
The current day of the month is greater than or equal to the specified `dayOfMonth` threshold (default is 25).
The close price is lower than the previous day's close (`close < close `).
The previous day's close is also lower than the close two days ago (`close < close `).
The signal occurs within the specified time window (between `Start Time` and `End Time`).
There is no existing open position (`strategy.position_size == 0`).
2. EXIT CONDITION
A Sell Signal is generated when the 2-period RSI exceeds 65, indicating overbought conditions. This prompts the strategy to exit the position.
█ ADDITIONAL SETTINGS
Day of Month: The day of the month threshold for triggering a Buy Signal. Default is 25.
Start Time and End Time: The time window during which the strategy is allowed to execute trades.
█ PERFORMANCE OVERVIEW
This strategy is designed to exploit seasonal price patterns around the end of the month.
It performs best in markets where the Turn of the Month effect is pronounced.
Backtesting results should be analyzed to optimize the `dayOfMonth` threshold and RSI parameters for specific instruments.
Bollinger Bands Reversal + IBS Strategy█ STRATEGY DESCRIPTION
The "Bollinger Bands Reversal Strategy" is a mean-reversion strategy designed to identify potential buying opportunities when the price deviates below the lower Bollinger Band and the Internal Bar Strength (IBS) indicates oversold conditions. It enters a long position when specific conditions are met and exits when the IBS indicates overbought conditions. This strategy is suitable for use on various timeframes.
█ WHAT ARE BOLLINGER BANDS?
Bollinger Bands consist of three lines:
- **Basis**: A Simple Moving Average (SMA) of the price over a specified period.
- **Upper Band**: The basis plus a multiple of the standard deviation of the price.
- **Lower Band**: The basis minus a multiple of the standard deviation of the price.
Bollinger Bands help identify periods of high volatility and potential reversal points.
█ WHAT IS INTERNAL BAR STRENGTH (IBS)?
Internal Bar Strength (IBS) is a measure of where the closing price is relative to the high and low of the bar. It is calculated as:
IBS = (Close - Low) / (High - Low)
A low IBS value (e.g., below 0.2) indicates that the close is near the low of the bar, suggesting oversold conditions. A high IBS value (e.g., above 0.8) indicates that the close is near the high of the bar, suggesting overbought conditions.
█ SIGNAL GENERATION
1. LONG ENTRY
A Buy Signal is triggered when:
The IBS value is below 0.2, indicating oversold conditions.
The close price is below the lower Bollinger Band.
The signal occurs within the specified time window (between `Start Time` and `End Time`).
2. EXIT CONDITION
A Sell Signal is generated when the IBS value exceeds 0.8, indicating overbought conditions. This prompts the strategy to exit the position.
█ ADDITIONAL SETTINGS
Length: The lookback period for calculating the Bollinger Bands. Default is 20.
Multiplier: The number of standard deviations used to calculate the upper and lower Bollinger Bands. Default is 2.0.
Start Time and End Time: The time window during which the strategy is allowed to execute trades.
█ PERFORMANCE OVERVIEW
This strategy is designed for mean-reverting markets and performs best when the price frequently deviates from the Bollinger Bands.
It is sensitive to oversold and overbought conditions, as indicated by the IBS, which helps to identify potential reversals.
Backtesting results should be analyzed to optimize the Length and Multiplier parameters for specific instruments.
Closing Prices for Indices AMMOthe "Closing Prices for Indices" indicator displays the daily closing prices of four major stock indices: FTSE 100, DAX 40, Dow Jones Industrial Average, and NASDAQ Composite. The indicator updates the prices based on their respective market closing times:
FTSE 100 and DAX 40: Updates at 4:30 PM UK time.
Dow Jones and NASDAQ Composite: Updates at 9:00 PM UK time.
Key features:
Customizable Labels: Option to display labels showing the closing prices directly on the chart.
Color-Coded Lines: Plots each index's closing price using distinct, customizable colors for easy differentiation.
User-Friendly Settings: Includes options for customizing line and label colors.
This indicator is perfect for traders and analysts looking to monitor and compare key index closing prices visually on their charts.
Market MonitorOverview
The Market Monitor Indicator provides a customisable view of dynamic percentage changes across selected indices or sectors, calculated by comparing current and previous closing prices over the chosen timeframe.
Key Features
Choose up to 20 predefined indices or your own selected indices/stocks.
Use checkboxes to show or hide individual entries.
Monitor returns over daily, weekly, monthly, quarterly, half-yearly, or yearly timeframes
Sort by returns (descending) to quickly identify top-performing indices or alphabetically for an organised and systematic review.
Customisation
Switch between Light Mode (Blue or Green themes) and Dark Mode for visual clarity.
Adjust the table’s size, position, and location.
Customise the table title to your own choice e.g. Sectoral, Broad, Portfolio etc.
Use Cases
Use multiple instances of the script with varying timeframes to study sectoral rotation and trends.
Customise the stocks to see your portfolio returns for the day or over the past week, or longer.
Sessioned EMA - Frozen EMA in post market hoursWhy I develop this indicator?
In future indices, post market data with little volume distort the moving average seriously. This indicator is to eliminate the distortion of data during low volume post market hours.
How to use?
There is a time session setting in the indicator, you can set the cash hour time, moving average outside the session will be frozen.
What this indicator gives you
This indicator give you a more make sense ema pattern, the ema lines are more respected by the prices when you set the session properly.
Setup
1. Session setting
In US indices, such as NQ, ES etc, when there was data release at 0830 hr, huge volume transaction order appears, that makes the 0830 price data important that should be included in your ema trend line calculating. If that is the case, I will set the session begin from 0830, otherwise, I start the session at 0930. Golden rule : Price with huge volume counts.
2. Time zone
The coding is decided for GMT+8 time zone, you may amend the code to fit your timezone.
Percent of U.S. Stocks Above VWAPThis indicator plots a line reflecting the percentage of all U.S. stocks above or below their VWAP for the given candle. Horizontal lines have been placed at 40% (oversold), 50% (mid-line), and 60% (overbought). I recommend using this indicator as a market breadth indicator when trading individual stocks. In my experience, this indicator is best utilized while trading the major indices (SPX, SPY, QQQ, IWM) or their futures (ES, NQ, RTY) in the following manner:
- When the line crosses 50%, a green or red triangle is plotted indicating the majority of market momentum has turned bullish or bearish based on price positioning vs. VWAP. Look for longs when the line is rising (green) or above 50%, or shorts when the line is falling (red) or below 50%.
- When the line is below 40%, indicator shows red shading; I would not be long anything during this period. When the line exits this level, I begin looking for long entries. This line is adjustable in the indicator settings if you prefer to use a tighter or looser oversold level.
- When the line is above 60%, indicator shows green shading; I would not be short anything during this period. When the line exits this level, I begin looking for short entries. This line is adjustable in the indicator settings if you prefer to use a tighter or looser overbought level.
This indicator uses the TradingView ticker “PCTABOVEVWAP.US”, thus it only updates during NY market hours. If trading futures, I recommend applying VWAP to your chart and using that as the level to trade against in a similar manner, along with your personal price action analysis and other indicators you find useful.
5 Minute TF 200 EMA Retest by Grantwww.tradingview.com
This indicator is a simple script meant to find retests on the 200 period moving average. It's current state is optimized for the 5 minute timeframe.
This works in all markets and all timeframes as long as you adjust certain rules for higher timeframes.
It's strengths and weaknesses
- Good at trend continuation in strong markets
- Bad in ranging markets (not surprising)
How does it work?
- It first identifies an overall trend by using the 200 ema.
- For long positions, it waits for price to close below the 200 ema, and then shortly closing back above the ema. For short positions its the opposite.
- For lower timeframes there are some other factors that help filter out bad signals that include:
- Makes sure that volume is increasing.
- Makes sure that volume is higher than average volume.
- For higher timeframes, the more specific factors aren't required.
How to use this indicator:
- Green triangles mean long positions
- Red triangles mean short positions
- Always trade with stoplosses and never risk too much of your account, please practice proper risk managment.
DISCLAIMER: Trading is inherently dangerous and carries lot's of risk. What you decide to do with my script has nothing to do with me. I am not responsible for any financial gains or losses made using this script. It is important to recognize other factors in the market to make better decisions.
Sort array alphabetically - educational🔶 OVERVIEW
• This educational script will sort an array of tickers alphabetically and place these values in an table , together with the according current price value next to each ticker .
🔶 SORT ALPHABETICALLY
🔹 I. We make a User Defined Type (UDT) obj , with:
· ticker - the string name of the ticker
· price - the current price (close)
• From this UDT we make an object obj.new() for each ticker
🔹 II. 2 array's are made:
• array of objects aObj , containing obj type obj.new() for every ticker
• array of strings sort , the ticker part of each object obj.new()
🔹 III. Now we make an object of each ticker with the createObject(sym ) function
object_1 = createObject("TICKER")
• the object object_1 consists off:
· ticker -> "TICKER"
· price -> current Daily close through request.security("TICKER") (non-repainting)
• object_1 will be added to the aObj array
• "TICKER" ( string ticker part of object ) will be added to the sort array
🔹 IV. The latter array is sorted alphabetically by using array.sort_indices()
EXAMPLE
originalArray = array.from("B", "A", "C")
indicesArray = // sorted indices
array.get(originalArray, 1) -> "A"
array.get(originalArray, 0) -> "B"
array.get(originalArray, 2) -> "C"
IMPORTANT
Alphabetically sorting is case sensitive , just like Java compareTo(String anotherString) !
• The comparison is based on the Unicode value of each character in the string, the lowest "Dec" values are sorted first in line.
• Comparing the "Dec" values at unicodelookup explains why default CAPITAL lettres will be sorted first,
• Default you would get this (A= 65, B= 66, a= 97, b= 98)
Aa
Ba
ab
bb
• Adding str.lower(string) in the toLowerCase() function will result to the following:
Aa
ab
Ba
bb
• (A= 65 is transformed to a= 97, ...)
• As a side note, should you write "AMZN" as "ÀMZN" this would be placed at the end, even after transforming to lower case the "Dec" values are higher (À= 192, à= 224).
• You can toggle "To Lower Case" to verify.
🔹 V. Values are placed in a table , using these sorted indices.
• With the usage of UDTs and objects , the current price has the same index in the aObj as their ticker ,
giving the advantage it is fairly easy to place every value correctly next to each other.
• The same can be done by make 2 separate arrays , 1 for the current price , the other for "TICKER" .
🔶 OTHER TECHNIQUES USED
• Alternative technique for adding comment
Instead of
// this is a comment
You can also do this:
_=" this is a comment "
• Alternate colour
· During a loop , alternate colour when i is even or odd , using the modulo operation (%) .
· This is the remainder when dividing.
EXAMPLE
· 3 % 2 = 1 -> 3 / 2 -> 1 * 2, 1 left (remainder)
· 4 % 2 = 0 -> 4 / 2 -> 2 * 2, 0 left (remainder)
· 5 % 2 = 1 -> 5 / 2 -> 2 * 2, 1 left (remainder)
for i = 0 to 10
even = i % 2 == 0
col = even ? thisColor : otherColor
• Adjust colour in script by using colour picker
Cheers!
Fiat Currency and Gold Indices (FGXY) CandlesA modification of my previous indicator "Crypto Index (DXY) Candles". The idea was to create a similar currency basket to the standard DXY, but from the perspective of other currencies. Still using the standard DXY weights, this indicator allows you to create a tailored index for other currencies, provided that a currency pair exists for each of the 6 components. This means that even currencies that aren't included should work in theory; just find the 3 character currency prefix used by tradingview and give it a shot! This indicator is useful for gauging how well countries/currencies are holding up and when paired with the standard DXY may help see potential inflection points. For use on longer time frames (~1h-~3d) as some of the data being pulled seems to have issues on lower timeframes.
Background ZonesThis script provides up to 5 zones to apply background colors. This is especially useful for applying to indices such as USI:TICK , USI:ADD , and USI:VOLD , where certain levels provides significant meaning to market sentiment and directions. This script will give you the visual cue to help with your trading.
All levels and colors are fully customizable.
Enjoy~!!
Example:
ICT KillZone [Index futures edition] Guided by new ICT Mentorship I create this versatile timezone or strikezone indicator to identify this without changing timezone (is based on America/New_York timezone, not your current timezone or GMT)
Sessions & Days Of The WeekTraders tend to focus their energy on specific sessions or time periods. This indicator will plot the days of the week, and also highlight the following sessions: Frankfurt (2:00am - 11:00am EST), London (3:00am - 12:00pm EST), New York (8:00am - 5:00pm EST), Sydney (5:00pm - 2:00am EST), Tokyo (7:00pm - 4:00am EST).
It’s important to be aware that Session Open and Close times will vary based on the time of year, as countries shift over to daylight savings time.
BANK NIFTY Constituents Technical Rating [tanayroy]Banknifty comprises 12 companies listed on the National Stock Exchange of India (NSE). Movement of Banknifty depends on these stocks. The script depicts Technical rating and price change stats of Banknifty constituents.
I have calculated the weight factor using annual floating stock stats available in Tradingview. So, it may differ considerably from the actual weight. It is just for reference.
I have found this useful in my trading.
Please like, share, and comment.