Hyper MA Loop | QuantEdgeBIntroducing Hyper MA Loop by QuantEdgeB
Hyper MA Loop | QuantEdgeB is an advanced trend-following indicator that leverages a custom Hyper Moving Average (HyMA) and an innovative loop-based scoring system to assess trend strength and direction. This tool is designed to provide a dynamic perspective on market momentum, allowing traders to capture trends effectively while filtering out market noise.
Key Features:
1. Hyper Moving Average (HyMA) 🟣
- A weighted moving average that enhances trend responsiveness by applying a custom
weight function.
- Ensures smoother trend detection while maintaining reactivity to price changes.
2. Loop-Based Trend Scoring 🔄
- Utilizes a for-loop function to analyze the movement of HyMA over a specified period.
- Compares current values to past values, generating a cumulative score indicating bullish or
bearish momentum.
- Dynamic thresholds adjust to market conditions for better trend filtering.
3. Threshold-Based Signal System ✅❌
- Long Signals: Triggered when the loop score exceeds the long threshold.
- Short Signals: Activated when the score falls below the short threshold.
- Avoids false signals by requiring sustained strength before confirming a trend.
4. Customizable Visualization & Colors 🎨
- Multiple color modes (Default, Solar, Warm, Cool, Classic) for tailored aesthetics.
- Extra plot options enhance visualization of market structure and volatility.
________
How It Works:
- HyMA Calculation : A unique moving average with a specialized weighting function to
smooth out price action.
- Loop Function : Iterates over past HyMA values, assessing whether price is consistently
higher or lower.
- Threshold Comparison : The loop score is compared against pre-set thresholds to
determine bullish or bearish conditions.
- Signal Generation :
1. Bullish (🔵): If the score crosses the long threshold
2. Bearish (🔴): If the score drops below the short threshold.
- Plotting & Styling : Dynamic candles and gradient overlays provide an intuitive
visualization of rend shifts.
________
Use Cases:
✅ Ideal for trend-following traders looking for solid trends confirmation.
✅ Helps filter out choppy market conditions by adjusting sensitivity dynamically.
✅ Works well with other indicators (e.g., ADX, volume-based filters) for added confirmation.
✅ Suitable for both short-term and long-term trend analysis.
________
Customization Options:
- Adjustable HyMA Length: Modify the responsiveness of the moving average. Default se to 2.
- For-Loop Parameters: Fine-tune how far back the trend analysis should consider. Default se to Start = 1 , End = -1.
- Thresholds for Long & Short: Control signal sensitivity to market fluctuations. Default set to Long = 40, Short = 8.
- Color Modes & Extra Plots: Personalize visualization for better clarity.
________
Conclusion:
The Hyper MA Loop | QuantEdgeB is a powerful, adaptive indicator that combines custom moving averages with loop-based trend analysis to deliver accurate, visually intuitive market signals. Whether you're looking to ride strong trends or filter out weak setups, this tool provides the precision and flexibility needed for effective decision-making. 🚀📈
🔹 Disclaimer: Past performance is not indicative of future results. No trading indicator can guarantee success in financial markets.
🔹 Strategic Consideration: As always, backtesting and strategic adjustments are essential to fully optimize this indicator for real-world trading. Traders should consider risk management practices and adapt settings to their specific market conditions and trading style.
Volatility
Improved SupertrendThe Improved Supertrend indicator is an improved version of the standard Supertrend indicator, which is used to identify market trends and provide trade entry signals. It combines the principles of ATR (Average True Range) to calculate volatility and trend direction.
Weekly Pivot Strategy (LONG ONLY STRATEGY)Strategy Overview: Weekly Pivot Trading System
Core Concept:
A mean-reversion strategy that trades between weekly pivot levels. It uses calculated support (S1-S4) and resistance (R1-R4) levels derived from the previous week's price action to identify entry and exit points.
Just know, every market is different. You may need to play with the settings to suit you're market
---------------------------------------------------------------------------------------------------------------------
1. Key Features
Weekly Pivot Calculation
Pivot Point = (Previous Week’s High + Low + Close) / 3
Support/Resistance Levels: User-adjustable distances from the pivot (Measured in points).
2. Entry Rules
Buys when price touches S1-S4 (lower = more aggressive).
Each support level triggers a separate entry ("Entry1" at S1, "Entry2" at S2, etc.).
3. Exit Rules
Profit targets set at corresponding R1-R4 levels (R1 for S1 entry, etc.).
No stop-loss (positions remain open until targets are hit).
4. Position Management
Up to 4 concurrent trades per week.
Trades reset weekly with new pivot levels.
No time-based exits.
5.Customization
Adjustable distances for S/R levels.
Position sizing as percentage of equity.
---------------------------------------------------------------------------------------------------------------------
Anticipated FAQs & Answers
Q1: How does this strategy work?
A: It exploits price reversals at weekly support/resistance zones. When price dips to a support level (S1-S4), the strategy buys, expecting a bounce to the corresponding resistance (R1-R4).
Q2: Why use weekly pivots instead of daily?
A: Weekly levels act as stronger psychological zones, reducing noise from short-term fluctuations. This aligns with swing trading/institutional order flow.
Q3: Where are the stop-losses?
A: The original strategy has no stop-loss to allow positions to ride to targets. However, users can add their own stop rules (e.g., below S4 or ATR-based stops).
Q4: How do I adjust risk?
A: Two key controls:
1. default_qty_value: Reduce from 25% to lower position size.
2. S/R distances: Widen offsets for larger buffers.
Q5: Why do trades sometimes not close?
A: Positions remain open indefinitely until price reaches the profit target. This works best in ranging markets but may tie up capital in trends.
Q6: How is this different from standard pivot strategies?
A: Three unique aspects:
1.Weekly reset: Fresh levels every Monday.
2. Multiple entries: Up to 4 trades/week.
3. No repainting: Levels fixed at week start.
Q7: What markets/timeframes does this work on?
A: Best results in:
Markets: Forex, indices, crypto (high liquidity).
Timeframes: 1H or higher (avoids intraweek noise).
Q8: Can I combine this with other indicators?
A: Popular additions:
Trend filter: Only trade S1-S4 in uptrends (e.g., 50 SMA).
Volume confirmation: Require rising volume at support.
RSI divergence: Avoid entries during overextension.
Q9: Why does it enter on touch (not close)?
A: By design, it mimics "limit order" behavior. To require a close below/above, modify the entry condition:
// Replace:
if low <= level
// With:
if close < level // More conservative
Q10: How to avoid whipsaws during volatility?
A: Two solutions:
1.Add a buffer (e.g., require price to close 1% below S1).
2.Use multiple timeframes: Confirm with daily pivot alignment.
Pro Tips for Users
1. Backtest Across Market Phases: Test in both trending and ranging conditions.
2. Adjust Offsets Volatility: Widen S/R distances for high-volatility assets.
Pair with Correlation: Avoid overlapping trades in correlated markets.
This framework balances simplicity with customization potential.
---------------------------------------------------------------------------------------------------------------------
Thank you for taking the time to review this strategy. This is my first finished product. I hope people enjoy testing it.
P.S. Please feel free to change or add whatever you like. If you feel up to the task. Im 100% confident that there are better coders than me that can improve this. :D
AyebaleJohnBob-Trading-BotAyebale John Bob - Trading-Bot Overview:
This trading strategy is designed to automate trades based on the "Smart Money Concepts" and "Fair Value Gaps" (FVG). The bot leverages multiple technical indicators and logic to execute buy and sell trades with dynamic stop-loss and take-profit (TP) levels.
Key Features:
User Inputs:
Bull & Bear Colors: Customizable colors for bullish and bearish trends.
Fair Value Gap (FVG) Color: Customizable color for visualizing FVG zones.
ATR Multiplier: Defines the sensitivity of stop-loss calculations based on Average True Range (ATR).
Take-Profit Multipliers: A set of five multipliers that scale take-profit levels dynamically.
Trade Signals:
Buy Signal: Generated when the price crosses above a certain low or when a bullish Fair Value Gap (FVG) is detected.
Sell Signal: Triggered when the price crosses below a high or when a bearish FVG is identified.
Stop-Loss & Take-Profit Logic:
Stop-loss levels are calculated using ATR and the specified multiplier.
Take-profit levels are dynamically determined based on the ATR multipliers, with five different levels for each trade.
Trade Execution:
The strategy allows for five simultaneous buy or sell entries, with each having its own take-profit and stop-loss levels.
The bot operates continuously, without any session restrictions, allowing trades at any time.
Visual Indicators:
Entry Signals: Visual shapes (green for buy and red for sell) appear on the chart to indicate entry points.
Progress Bar: A real-time progress bar is plotted, tracking the percentage gain/loss from the entry price.
Trade Information Table:
A dynamic table is used to display important trade information, including entry price, take-profit levels, and stop-loss. This table updates for each new trade (buy or sell), and shows real-time trade progress.
Risk Management:
The stop-loss is dynamically adjusted based on the ATR calculation, ensuring that the bot adapts to changing market volatility.
Take-profit levels are spread across five increments, offering multiple opportunities for profit capture.
Summary:
The Ayebale John Bob - Trading-Bot is designed to implement a sophisticated strategy that combines smart money concepts, fair value gap analysis, and robust risk management. It provides real-time trade information, progress tracking, and a flexible approach to stop-loss and take-profit strategies. The bot is ideal for traders looking to automate trades and visually track their progress directly on the chart.
Anchored VWAPAnchored VWAP with 3 Standard Deviation Bands
📈 Version: Pine Script v5
📌 Author: Aymen Haddaji
🔍 Overview
This indicator calculates an Anchored Volume-Weighted Average Price (AVWAP), allowing traders to anchor the VWAP calculation from a user-defined date and time. It also plots three standard deviation bands above and below the AVWAP to help identify potential areas of overbought and oversold conditions.
📊 Features & Functionality
✔ Custom Anchor Point: Select a specific date and time to start the AVWAP calculation.
✔ OHLC/4 Calculation: Uses the average of Open, High, Low, and Close to smooth the price input.
✔ Three Standard Deviation Bands:
1st Deviation (Green): Moderate volatility zone.
2nd Deviation (Orange): High volatility zone.
3rd Deviation (Red): Extreme overbought/oversold areas.
✔ Real-Time Calculation: Updates dynamically with each price movement.
✔ Clear Visuals:
AVWAP (Blue Line) represents the fair market price from the anchor.
Deviation Bands (Dashed Lines) show potential support and resistance levels.
🛠 How It Works
VWAP Calculation
Uses a cumulative sum of price × volume divided by cumulative volume.
Calculation starts from the user-defined anchor time.
Standard Deviation Bands
Measures the price dispersion around the AVWAP.
The wider the bands, the higher the volatility.
When price touches or exceeds the 3rd deviation, a potential reversal zone is indicated.
Trading Strategies with AVWAP & Deviation Bands
Trend Confirmation:
Price above AVWAP = Uptrend (bullish).
Price below AVWAP = Downtrend (bearish).
Support & Resistance:
AVWAP acts as dynamic support or resistance.
1st & 2nd deviations often act as secondary levels.
Mean Reversion Trading:
When price reaches the 3rd standard deviation, a pullback is likely.
Breakout Confirmation:
A strong close above/below the 3rd deviation may indicate trend continuation.
⚙️ Input Settings
📍 Anchor Time: Allows you to set the exact date and time to start the AVWAP calculation.
🎯 Ideal For
✅ Intraday traders looking for short-term mean reversion plays.
✅ Swing traders identifying key support/resistance zones.
✅ Trend traders confirming long-term market direction.
✅ Volatility traders using standard deviation for trade entries.
Simplified MA Crossover Strategy with toggle RSI/ATR options1. Strategy Overview
MA Crossover Logic: The strategy uses two simple moving averages (short and long) to generate buy/sell signals.
Buy Signal: When the short MA crosses above the long MA.
Sell Signal: When the short MA crosses below the long MA.
Filters: The strategy includes optional RSI and ATR filters to refine entry conditions.
Risk Management: Includes stop-loss, take-profit, and position sizing based on a percentage of equity.
2. Inputs
MA Lengths:
shortLength: Length of the short MA (default: 9).
longLength: Length of the long MA (default: 21).
RSI Filter:
enableRSI: Toggle to enable/disable the RSI filter.
rsiLength: RSI calculation period (default: 14).
rsiOverbought: Overbought threshold (default: 70).
rsiOversold: Oversold threshold (default: 30).
ATR Filter:
enableATR: Toggle to enable/disable the ATR filter.
atrLength: ATR calculation period (default: 14).
minATR: Minimum ATR threshold for trade entry (default: 0.005).
Risk Management:
stopLossPerc: Stop-loss percentage (default: 0.5%).
riskRewardRatio: Risk-reward ratio for take-profit calculation (default: 2).
riskPercentage: Percentage of equity to risk per trade (default: 2%).
3. Indicators
Moving Averages:
shortMA: Short-term simple moving average.
longMA: Long-term simple moving average.
RSI: Relative Strength Index for filtering overbought/oversold conditions.
ATR: Average True Range for volatility filtering.
4. Trade Conditions
Long Condition:
Short MA crosses above the long MA.
RSI is below the overbought level (if RSI filter is enabled).
ATR is above the minimum threshold (if ATR filter is enabled).
Short Condition:
Short MA crosses below the long MA.
RSI is above the oversold level (if RSI filter is enabled).
ATR is above the minimum threshold (if ATR filter is enabled).
5. Risk Management
Position Sizing:
positionSize: Calculated based on the percentage of equity to risk and the stop-loss level.
Take-Profit and Stop-Loss:
takeProfitLevel: Calculated using the risk-reward ratio.
stopLossLevel: Calculated using the stop-loss percentage.
6. Trade Execution
Long Entry:
Triggers when the long condition is met.
Sets a take-profit and stop-loss level.
Short Entry:
Triggers when the short condition is met.
Sets a take-profit and stop-loss level.
7. Plotting
Moving Averages:
Short MA (blue) and Long MA (red) are plotted on the chart.
RSI Levels:
Overbought (red) and oversold (green) levels are plotted as horizontal lines.
ATR:
ATR is plotted in orange.
Trade Signals:
Buy signals are marked with a green "BUY" label below the bar.
Sell signals are marked with a red "SELL" label above the bar.
8. Customization
You can adjust the input parameters (e.g., MA lengths, RSI/ATR settings, risk management values) to suit your trading preferences.
Disable/enable filters (RSI and ATR) using the enableRSI and enableATR inputs.
9. Notes
This strategy is designed for educational purposes and should be thoroughly tested before use in live trading.
Consider optimizing the parameters (e.g., MA lengths, RSI/ATR thresholds) for specific markets or timeframes.
Ensure proper backtesting and forward testing to evaluate performance under different market conditions.
Improved SupertrendThe Improved Supertrend indicator is an improved version of the standard Supertrend indicator, which is used to identify market trends and provide trade entry signals. It combines the principles of ATR (Average True Range) to calculate volatility and trend direction.
EMV BlackBoxИндикатор EMV (Ease of Movement) измеряет, насколько легко или трудно движется цена. Он учитывает как изменения цен, так и объем торгов, чтобы показать, насколько активно двигается рынок. Чем выше значение EMV, тем легче движется цена в заданном направлении.
ATR-based stop lossPlots the stop loss level based on average true range (ATR) and a multiplier of choice (1 to 2.5, default is 1.5), subtracted from closing price.
5-Min Gainers & Sellers with Keltner/Bollinger BreakoutsI tried to create a 5 minute scalping script that also uses the Kelner Channels but set at the Bollinger 20 internals which should show the sqeeze as well as at leave 1% gain during the 5 minute period
Percentage ATRThis script:
Calculates regular ATR over your chosen period
Converts it to a percentage by dividing by current price and multiplying by 100
Plots both the percentage ATR and optionally its moving average
Includes optional reference lines for common volatility levels
Smart Buy/Sell Indicator with Trend & ATR FilterDescription:
This indicator uses a moving average crossover strategy combined with ATR-based stop loss and take profit levels.
✅ Features:
Improvements:
Trend Filter (200-period EMA)
-Only long trades when price is above the 200 EMA
-Only short trades when price is below the 200 EMA
ATR-Based Volatility Filter
-Trades are only taken when the ATR is above a threshold, indicating strong market conditions.
Stop Loss & Take Profit
-Stop loss and take profit dynamically adjust based on ATR x Multiplier, instead of fixed percentages.
-Works best on trending markets (recommended for Forex, Crypto, and Stocks).
🛠 How to Use:
Enter a long trade when a green Buy signal appears.
Enter a short trade when a red Sell signal appears.
Adjust Stop Loss % and Take Profit % based on your risk tolerance.
Market Session Highlights- Indicator Function: This indicator highlights the first hour of each major trading session in UTC for better market timing.
- Sessions Covered:
1. Sydney Session – First hour marked.
2. Tokyo Session – First hour marked.
3. London Session – First hour marked.
4. New York Session – First hour marked.
Finite Difference - Backward (mcbw_)In calculus there exists a 'derivative', which simply just measures the difference between two points on a curve. For well behaved mathematical functions there are infinitely many points and so there exists a derivative at every point. Where there are infinitely many points in a curve that curve is called 'continuous'. Continuous curves are very nice to deal with since each point on it exists almost exactly where its neighbors are. However, if the curve does not have infinitely many points on it, but instead has a finite number of points on it, that curve is called 'discrete' instead of continuous. Taking the derivative of discrete curves is much trickier business since there are none of the mathematical conveniences that a continuous offers. In the real world everything we measure is a discrete curve, including Price (since we measure it a finite number of times, aka each candlestick)!
The branch of Discrete Mathematics has found an approach to measure the derivative along a discrete curve, that approach is aptly called " Finite Difference ". To get a more accurate approximation of a discrete derivative, the finite difference approach uses weighted combinations of neighboring points. The most common type of finite difference is a 'central' difference, this uses a combination of points before and after the point of interest to approximate the discrete derivative. This is great for historical analysis but is not of much use for trading algorithms since it technically means using future prices to calculate the derivative of the current point. Instead we can use a less common variant called a ' Backwards Difference ' that only uses a combination of points before the current one to help approximate the current derivative.
In this script you can choose the " Order " of your derivative and the " Accuracy " of its approximation. This script is for educational purposes for folks building trading algorithms. Many trading algorithms often have an element of seeing how much Price has changed from the previous candle to the current candle. This approach is the lowest accuracy derivative possible, and using the backwards finite differences, made available for the first time on TradingView (!!), algorithms that use derivatives can now have higher orders of accuracy!
Happy Trading/Developing!
RSI + Bollinger Bands + OBV [blondepanther]This custom indicator combines the power of Relative Strength Index (RSI), Bollinger Bands (BB), and On-Balance Volume (OBV) to help identify undervalued and overbought conditions in any market.
ATR % & 10 / ATR %Shows current ATR as a percentage of current price and also shows 10 divided by current ATR% for leverage purposes.
High-Low Breakout Strategy with ATR traling Stop LossThis script is a TradingView Pine Script strategy that implements a High-Low Breakout Strategy with ATR Trailing Stop.created by SK WEALTH GURU, Here’s a breakdown of its key components:
Features and Functionality
Custom Timeframe and High-Low Detection
Allows users to select a custom timeframe (default: 30 minutes) to detect high and low levels.
Tracks the high and low within a user-specified period (e.g., first 30 minutes of the session).
Draws horizontal lines for high and low, persisting for a specified number of days.
Trade Entry Conditions
Long Entry: If the closing price crosses above the recorded high.
Short Entry: If the closing price crosses below the recorded low.
The user can choose to trade Long, Short, or Both.
ATR-Based Trailing Stop & Risk Management
Uses Average True Range (ATR) with a multiplier (default: 3.5) to determine a dynamic trailing stop-loss.
Trades reset daily, ensuring a fresh start each day.
Trade Execution and Partial Profit Taking
Stop-loss: Default at 1% of entry price.
Partial profit: Books 50% of the position at 3% profit.
Max 2 trades per day: If the first trade hits stop-loss, the strategy allows one re-entry.
Intraday Exit Condition
All positions close at 3:15 PM to ensure no overnight risk.
ADR by CTL modelled on TREPENG'sThis is an ADR indicator, a modified version of trepengs.
New ADR levels added 100/150/200/250/300%
Arrow functions and labels option, added to show when candles touch the above levels
MACD + RSI + Stochastic ReversalMACD Calculation: The script calculates the MACD line, signal line, and histogram.
RSI Calculation: The RSI is calculated and overbought/oversold levels are defined.
Stochastic Oscillator: The %K and %D lines are calculated, and overbought/oversold levels are defined.
Buy/Sell Signals: Buy signals are generated when the MACD line crosses above the signal line, RSI is oversold, and Stochastic is oversold. Sell signals are generated when the MACD line crosses below the signal line, RSI is overbought, and Stochastic is overbought.
This script should now compile and function correctly in TradingView, providing a clear visualization of the MACD, RSI, and Stochastic indicators along with buy and sell signals.
MFX temptimes for asia session, liquidity trading times for asia session, liquidity tradingtimes for asia session, liquidity tradingtimes for asia session, liquidity tradingtimes for asia session, liquidity tradingtimes for asia session, liquidity tradingtimes for asia session, liquidity tradingtimes for asia session, liquidity tradingtimes for asia session, liquidity tradingtimes for asia session, liquidity tradingtimes for asia session, liquidity tradingtimes for asia session, liquidity tradingtimes for asia session, liquidity tradingtimes for asia session, liquidity tradingtimes for asia session, liquidity tradingtimes for asia session, liquidity tradingtimes for asia session, liquidity tradingtimes for asia session, liquidity tradingtimes for asia session, liquidity tradingtimes for asia session, liquidity trading