4H Bollinger Breakout StrategyThis strategy leverages Bollinger Bands on the 4-hour timeframe for long and short trades in trending or ranging markets. Entries trigger on BB breakouts with optional filters for volume, trend, and RSI. Exits occur on opposite BB crosses. Customizable for long-only, short-only, or indicator mode via code comments. Supports forex, stocks, or crypto with full equity allocation and 0.1% commission.
Length (Default: 20): Period for BB basis and std dev; shorter for sensitivity, longer for smoothing.
Basis MA Type (Default: SMA): Selects MA for middle band (SMA, EMA, etc.); EMA for faster response.
Source (Default: Close): Price input for calculations; use close for standard accuracy.
StdDev Multiplier (Default: 1.8): Band width control; higher for fewer signals, lower for more.
Offset (Default: 0): Shifts BB plots; typically unchanged.
Use Filters (Default: True): Applies volume, trend, RSI checks to filter signals.
Volume MA Length (Default: 20): For volume filter (long: >105% avg, short: >120%).
Trend MA Length (Default: 80): SMA for trend filter (long: above MA, short: below).
RSI Length (Default: 14): For short filter (entry if RSI <85).
Use Long/Short Signals (Defaults: True): Toggles directions; long entry on lower BB crossover, short on upper crossunder.
Visuals: BB plots (blue basis, red upper, green lower), orange trend MA, filled background.
Labels/Alerts: Green/red for long entry/exit, yellow/purple for short; alert conditions included.
4hourchart
4-Hour Moving AveragesTitle: 4-Hour Moving Averages Indicator
Description:
The "4-Hour Moving Averages" indicator is designed to help traders easily visualize key moving averages derived from the 4-hour timeframe, regardless of the chart interval they are using. This indicator plots four moving averages: a 15-period SMA (Short-Term), a 35-period SMA (Intermediate-Term), an 80-period SMA (Long-Term), and a 130-period SMA (Confirmation).
These moving averages provide a balanced approach for identifying short, medium, and long-term trends, as well as confirming significant market movements. Ideal for swing traders and those looking for clear trend signals, the indicator can be used for various markets, including stocks, forex, and cryptocurrencies.
The 4-hour moving averages overlay directly on the price chart, allowing for easy analysis of current price movements relative to important trend indicators. Use this script to enhance your trading decisions, identify opportunities, and avoid market traps by relying on consistent moving average trends.
Features:
- 15 SMA for Short-Term Trends (in red)
- 35 SMA for Intermediate-Term Trends (in orange)
- 80 SMA for Long-Term Trends (in green)
- 130 SMA for Confirmation (in blue)
Feel free to modify the settings to suit your specific strategy and market conditions.