HL2 Moving Average with BandsThis indicator is designed to assist traders in identifying potential trade entries and exits for S&P 500 (ES) and Nasdaq-100 (NQ) futures. It calculates a Simple Moving Average (SMA) based on the HL2 value (average of high and low prices) of the current candle over a user-defined lookback period (default: 200 periods). The indicator plots this SMA as a blue line, providing a smoothed reference for price trends.
Additionally, it includes upper and lower bands calculated as a percentage (default: 0.5%) above and below the SMA, plotted as green and red lines, respectively. These bands act as dynamic thresholds to identify overbought or oversold conditions. The indicator generates trade signals based on price action relative to these bands:
Long Entry: A green upward triangle is plotted below the candle when the close crosses above the upper band, signaling a potential buy.
Close Long: A red square is plotted above the candle when the close crosses back below the upper band, indicating an exit for the long position.
Short Entry: A red downward triangle is plotted above the candle when the close crosses below the lower band, signaling a potential sell.
Close Short: A green square is plotted below the candle when the close crosses back above the lower band, indicating an exit for the short position.
The script is customizable, allowing users to adjust the SMA length and band percentage to suit their trading style or market conditions. It is plotted as an overlay on the price chart for easy integration with other technical analysis tools.
Recommended Time Frame and Settings for Trading S&P 500 and Nasdaq-100 Futures
Based on research and market dynamics for S&P 500 (ES) and Nasdaq-100 (NQ) futures, the 5-minute chart is recommended as the optimal time frame for day trading with this indicator. This time frame strikes a balance between capturing intraday trends and filtering out excessive noise, which is critical for futures trading due to their high volatility and leverage. The 5-minute chart aligns well with periods of high liquidity and volatility, such as the U.S. market open (9:30 AM–11:00 AM EST) and the afternoon session (2:00 PM–4:00 PM EST), when institutional traders are most active.
Why 5-minute? It allows traders to react to short-term price movements while avoiding the rapid fluctuations of 1-minute charts, which can be prone to false signals in choppy markets. It also provides enough data points to make the SMA and bands meaningful without the lag associated with longer time frames like 15-minute or hourly charts.
Recommended Settings
SMA Length: Set to 200 periods. This longer lookback period smooths the HL2 data, reducing noise and providing a reliable trend reference for the 5-minute chart. A 200-period SMA helps identify significant trend shifts without being overly sensitive to minor price fluctuations.
Band Percentage: 0.5% is more suitable for the volatility of ES and NQ futures on a 5-minute chart, as it generates fewer but higher-probability signals. Wider bands (e.g., 1%) may miss short-term opportunities, while narrower bands (e.g., 0.1%) may produce excessive false signals.
Trading Session Recommendations
Futures markets for ES and NQ are open nearly 24 hours (Sunday 6:00 PM EST to Friday 5:00 PM EST, with a daily break from 4:00 PM–5:00 PM EST), but not all hours are equally optimal due to varying liquidity and volatility. The best times to trade with this indicator are:
U.S. Market Open (9:30 AM–11:00 AM EST): This period is characterized by high volume and volatility, driven by the opening of U.S. equity markets and economic data releases (e.g., 8:30 AM EST reports like CPI or GDP). The indicator’s signals are more reliable during this window due to strong order flow and price momentum.
Afternoon Session (2:00 PM–4:00 PM EST): After the lunchtime lull, volume picks up as institutional traders return, and news or FOMC announcements often drive price action. The indicator can capture breakout moves as prices test the upper or lower bands.
Pre-Market (7:30 AM–9:30 AM EST): For traders comfortable with lower liquidity, this period can offer opportunities, especially around 8:30 AM EST economic releases. However, use tighter risk management due to wider spreads and potential volatility spikes.
Additional Tips
Avoid Low-Volume Periods: Steer clear of trading during low-liquidity hours, such as the overnight session (11:00 PM–3:00 AM EST), when spreads widen and price movements can be erratic, leading to false signals from the indicator.
Combine with Other Tools: Enhance the indicator’s effectiveness by pairing it with support/resistance levels, Fibonacci retracements, or volume analysis to confirm signals. For example, a long entry signal above the upper band is stronger if it coincides with a breakout above a key resistance level.
Risk Management: Given the leverage in futures (e.g., Micro E-mini contracts require ~$1,200 margin for ES), use tight stop-losses (e.g., below the lower band for longs or above the upper band for shorts) to manage risk. Aim for a risk-reward ratio of at least 1:2.
Test Settings: Backtest the indicator on a demo account to optimize the SMA length and band percentage for your specific trading style and risk tolerance. Micro E-mini contracts (MES for S&P 500, MNQ for Nasdaq-100) are ideal for testing due to their lower capital requirements.
Why These Settings and Time Frame?
The 5-minute chart with a 200-period SMA and 0.5% bands is tailored for the volatility and liquidity of ES and NQ futures during peak trading hours. The longer SMA period ensures the indicator captures meaningful trends, while the 0.5% bands are tight enough to signal actionable breakouts but wide enough to avoid excessive whipsaws. Trading during high-volume sessions maximizes the likelihood of valid signals, as institutional participation drives clearer price action.
By focusing on these settings and time frames, traders can leverage the indicator to capitalize on the dynamic price movements of S&P 500 and Nasdaq-100 futures while managing the inherent risks of these markets.
HL2
It's All MidsIt's All Mids extends mid-lines of a candle forward until the price revisits (covers) the midpoint. A higher timeframe can be used for the mid candles than the chart (but not the reverse). There is no data to support this is a meaningful concept.
While this script is intended to be functional, correct and useful it is important that you understand that not only is this the first script I've written but also that "I am an idiot."(tm) Using a stranger's indicator is questionable, but using a self-proclaimed idiot's indicator to trade real money is unquestionably stupid. Don't be like me. Be smart. You are responsible for what you do with this script. The source is unlocked, so feel free to copy and modify it.
Terms:
- A "mid" is the (high+low)/2 price of a previous candle that has not been auctioned since the candle close. All candles will initially have a mid unless they close on exactly their midpoint.
- A "covered" mid is a mid for which the midpoint has been auctioned since the candle closed. There is an option to display a number of these so that when a mid is hit the line doesn't just disappear from the chart and you forget what you were doing.
- A "low priority" mid is the mid of a candle which was auctioned in the previous candle(s) (chart's timeframe, not the mid's timeframe)-- chopchopchop. I have no data to show that this matters, or really, that anything matters at all.
My use: I chart a 60m mid on ES on a 5 or 15 minute chart. I am lying. I use it for something else but if I tell you that then I give away my incredible alpha that has made me so rich I can spend my time crying in corner about all the money I've lost.
Hi/Lo Swing Index [by hajixde]Author: Hajixde
This indicator illustrates the High-to-Low variation. It works nicely on shorter time frames.
The index value is calculated based on the observation length (Memory Length). By changing this input, you can have a wider or shorter observation range.
MA Length is the moving average filter length, which smooths out the signal.
There is an additional smoothing function to make the output even smoother (Smoothing Length). Remember, that "Smoothing Length" is better to be less than "MA Length".
You may activate the trend direction.
Relative Price OscillatorHere is a new experimental indicator we've been working on. The idea was to compare two EMA's of period midpoints to the actual closing price. The steps that were taken are listed below:
1.Calculate an EMA based on each period's midpoint ((High * Low) /2) for the last 9 periods.
2.Calculate an EMA based on each period's midpoint for the last 100 periods.
3. Divide the difference of the two EMA's by the closing price. ((EMA1 - EMA2) / Close).
4. Smooth the value from step #3 with an 18 period EMA. Multiply by 1000 for better scaling/visibility.
Using:
Bullish when line is green, bearish when line is red. Buy on first green, then sell on first red.
There is also an option to color the candles based on the RPO line.
B3 HL2 Method Candle PainterThis script is similar to the "Hi-Lo" or "Clear" methods of painting bars. Instead of using the tips/edges of the candles like those two, the "(H+L)/2" method uses the change in (high+low)/2 to paint the bars. This gives you some similar results if you were to be binary with the candle coloring. However, my coloring scheme is not entirely binary. There are 5 possible colors:
HL2>LastHigh = Bright Green
HL2LastHL2 = Dull Green
HL2<LastHL2 = Dull Red
Bar Change (close - open) is going against the indicator = Gray
Free to share and enjoy!
~B3