Smart Trader,Episode 1, by Ata Sabanci | Unified Matrix⚠️ **CRITICAL: READ BEFORE USING** ⚠️
This strategy is **100% VOLUME-BASED** and requires **Lower Timeframe (LTF) intrabar data** for accurate calculations. Please understand the following limitations before using:
**📊 DATA ACCURACY LEVELS:**
• **1T (Tick)** — Most accurate, real volume distribution per tick
• **1S (1 Second)** — Reasonably accurate approximation
• **15S (15 Seconds)** — Good approximation, longer historical data available
• **1M (1 Minute)** — Rough approximation, maximum historical data range
**⚠️ BACKTEST & REPLAY LIMITATIONS:**
• TradingView's Strategy Tester uses historical LTF data which may be limited depending on your subscription plan
• Replay mode results may differ from live trading due to data availability
• For longer backtest periods, use higher LTF settings (15S or 1M)
• Not all symbols/exchanges support tick-level data
• Crypto and Forex typically have better LTF data availability than stocks
**💡 A NOTE ON TOOLS:**
Successful trading requires proper tools. Higher TradingView plans provide access to more historical intrabar data, which directly impacts the accuracy of volume-based calculations. More precise volume data leads to more reliable signals. Consider this when evaluating your trading infrastructure.
**WHY "EPISODE 1"?**
This strategy is titled "Episode 1" because it focuses exclusively on **Highest Buyers (HB)** — a single but powerful concept in volume analysis.
**The Philosophy:**
A single high-volume buying event can tell us a story about market psychology:
• Where did the biggest buyers enter?
• How much of their power remains?
• Are sellers consuming their advantage?
• At what rate is the balance shifting?
By focusing on just ONE aspect of volume analysis, traders can deeply understand how a buying surge affects future price action before moving to more complex multi-factor analysis.
**The Reality:**
This script alone is approximately **2000 lines of code** — and it only analyzes buyers. A comprehensive system covering all aspects (sellers, combined analysis, multi-timeframe correlation) would be significantly larger and computationally heavier. Breaking this into focused modules allows for:
• Deeper understanding of each component
• Lighter, more responsive scripts
• Educational progression from simple to complex
**OVERVIEW**
Smart Trader EP1 is a volume-based trading strategy that tracks the balance of power between buyers and sellers through the lens of the **Highest Buyers event**. Unlike traditional indicators that rely on price patterns or mathematical formulas, this strategy analyzes *actual volume flow* to identify who is in control of the market.
The core philosophy is simple: **markets move when one side (buyers or sellers) exhausts their power while the opposing side accumulates strength.** By measuring this power shift in real-time, the strategy identifies high-probability entry and exit points.
**HOW IT WORKS**
**1. Volume Engine**
The strategy splits each candle's volume into buying volume and selling volume using intrabar data. In *Intrabar (Precise)* mode, it uses actual tick-by-tick or second-by-second data to calculate the exact buy/sell distribution. In *Geometry* mode, it approximates based on candle structure (close position within the range).
**2. Event Detection**
Within the lookback window, the strategy identifies key events:
• **HB (Highest Buyers)** — The candle with maximum buying volume (potential resistance when exhausted)
• **HS (Highest Sellers)** — The candle with maximum selling volume (potential support when exhausted)
• **LB (Lowest Buyers)** — The candle with minimum buying volume (buyer absence)
• **LS (Lowest Sellers)** — The candle with minimum selling volume (seller absence)
These events create dynamic support and resistance levels based on actual volume, not arbitrary price levels.
**3. Power Tracking (Attrition Model)**
For the Highest Buyers event (HB), the strategy tracks:
• **Start Power (X)** — The initial buying volume at the HB event
• **Consumed Power (Y)** — How much selling volume has accumulated since the event
• **Remaining Power (Z)** — Start Power minus Consumed Power (X - Y)
• **Opponent Dominance** — When Remaining Power goes negative (Z < 0), sellers have overtaken buyers
Think of it like a battle: buyers establish a position (HB), and sellers gradually consume their power. When buyers' power is exhausted (Remaining Power ≤ 0), sellers have taken control.
**4. Depletion Markers**
Visual markers appear on the chart when power reaches critical thresholds:
• **🔋** — Buyers consumed 100% (Remaining = 0)
• **🚨** — Buyers consumed 200% (Opponent Dominance = 100%)
• **🪫** — Sellers consumed 100%
• **⚠️** — Sellers consumed 200%
**5. Cumulative Delta**
Beyond tracking power at specific events, the strategy calculates the cumulative buy volume minus sell volume since the HB event. This shows the *net flow* of money:
• **Positive Delta** — More buying than selling since HB (bullish pressure)
• **Negative Delta** — More selling than buying since HB (bearish pressure)
**6. Trend Channel**
A 5-point linear regression channel identifies the current trend:
• **UPTREND** — Both upper and lower channel lines slope upward
• **DOWNTREND** — Both lines slope downward
• **RANGING** — Mixed or flat slopes
The strategy also tracks where the HB event occurred within this channel (TOP, UPPER, MIDDLE, LOWER, BOTTOM) to contextualize the signal.
**7. Nearest Event Analysis**
The strategy identifies which event is closest to the current candle and analyzes the price action *after* that event:
• How many bullish vs bearish candles followed?
• Does post-event momentum confirm or contradict the event type?
This prevents false signals when, for example, a bearish event occurs but is immediately followed by strong bullish candles.
**SIGNAL LOGIC**
**🟢 LONG Signal Conditions:**
• Uptrend with positive cumulative delta and buyers accumulating
• At channel bottom/lower with strong buyer power remaining
• After a bearish event (HS) with bullish post-event momentum (reversal signal)
• Ranging market with positive delta and strong power
**🔴 SHORT Signal Conditions:**
• Downtrend with negative cumulative delta and sellers in control
• Opponent Dominance (buyer power exhausted) with bearish momentum
• Buyer Trap: HB at TOP in uptrend but power exhausted and delta negative
• After a bullish event (HB) with bearish post-event momentum (trap signal)
**⏳ NO_TRADE Conditions:**
• Conflicting signals (e.g., bearish event but bullish post-momentum)
• Ranging market without clear direction
• Mixed power readings
• Price position contradicts signal direction
**STRATEGY EXECUTION**
**Entry Rules:**
• Enter LONG when signal is "LONG" and conditions are valid
• Enter SHORT when signal is "SHORT" and conditions are valid
• **Pyramid**: Up to 2 entries allowed in the same direction (configurable)
• Each entry uses 10% of equity by default
• Only one entry per confirmed candle (prevents multiple fills)
**Stop Loss (Event Line Based):**
• **LONG positions**: Stop Loss placed below the HS line (seller support level)
• **SHORT positions**: Stop Loss placed above the HB line (buyer resistance level)
• A small buffer percentage is added to prevent premature stops
**Take Profit (Event Line Based):**
• **LONG positions**: Take Profit near the HB line (buyer resistance target)
• **SHORT positions**: Take Profit near the HS line (seller support target)
• A small buffer percentage ensures realistic fill expectations
**Exit Rules:**
• Exit LONG when signal changes to SHORT
• Exit SHORT when signal changes to LONG
• **NO_TRADE signal = HOLD** (do not exit, wait for clear direction)
• SL/TP orders remain active regardless of signal changes
**SETTINGS GUIDE**
**⚙️ General Settings:**
• *Calculation Method* — Choose between Intrabar (Precise) or Geometry (approximation)
• *Intrabar Resolution* — LTF for volume data (1T, 1S, 15S, 1M)
• *Lookback Length* — Window for scanning events (10-150 bars)
• *Timezone Offset* — Adjust clock display to your local time
**📊 Matrix Display Settings:**
• *Show Unified Matrix* — Toggle the information dashboard
• *Show Event Lines* — Toggle horizontal lines at event prices
• *Panel Size/Position* — Customize dashboard appearance
• *Projection Bars* — Extend event lines into the future
• *Depletion Threshold* — Percentage for depletion markers (default: 100%)
**🏷️ Rank Labels Settings:**
• *Show Rank Labels (HB/HS)* — Display labels on highest volume candles
• *Show Low Labels (LB/LS)* — Display labels on lowest volume candles
• *Ranks Count* — Number of rankings to display (1-5)
**📐 Trend Channel Settings:**
• *Show Trend Channel* — Toggle the 5-point regression channel
• *Line Color/Fill/Width/Style* — Customize channel appearance
**🎯 Trade Signal Settings:**
• *Long: Min Remaining Power %* — Minimum buyer power for LONG signal (default: 50%)
• *Short: Max Remaining Power %* — Maximum power for SHORT signal (default: 30%)
• *Opponent Dominance Threshold* — When to consider power "exhausted" (default: 0%)
• *Max Decay Angle* — Maximum consumption rate for valid entries (default: 60°)
**📈 Strategy Execution Settings:**
• *Enable Strategy* — Turn automatic trading on/off
• *Allow LONG/SHORT* — Enable or disable specific directions
• *Max Pyramid Entries* — Maximum entries in same direction (1-3)
• *SL Buffer %* — Distance below/above event line for stop loss (default: 0.15%)
• *TP Buffer %* — Distance from event line for take profit (default: 0.05%)
**VISUAL ELEMENTS**
**Chart Labels:**
• **#1 HB** — Highest Buyers (rank label on candle high)
• **#1 HS** — Highest Sellers (rank label on candle low)
• **#1 LB** — Lowest Buyers (rank label on candle high)
• **#1 LS** — Lowest Sellers (rank label on candle low)
• **🔋 / 🚨** — Buyer power depletion markers
• **🪫 / ⚠️** — Seller power depletion markers
**Event Lines:**
• **Blue horizontal lines** — HB price levels (buyer entry points)
• **Red horizontal lines** — HS price levels (seller entry points)
• **Cyan lines** — LB price levels
• **Orange lines** — LS price levels
• **Dashed extensions** — Projected levels into future bars
**Trend Channel:**
• **Orange lines** — Upper and lower channel boundaries (5-point regression)
• **Orange fill** — Channel area (90% transparency)
**Matrix Dashboard (6 rows):**
• Row 1: Header with symbol, LTF setting, and local clock
• Row 2: Volume snapshot (Total, Buy, Sell, Delta)
• Row 3: Column headers
• Row 4: Highest Buyers data (Age, Start Power, Consumed, Remaining, Decay, ETA)
• Row 5: Highest Sellers data
• Row 6: Signal Evaluation (Trend, Zone, Nearest Event, Signal, Reason)
**Strategy Markers:**
• **Green triangle up** — LONG entry
• **Red triangle down** — SHORT entry
• **Faded triangles** — Pyramid entries
• **Colored lines** — SL (red) and TP (green) levels when in position
**BEST PRACTICES**
**For Maximum Accuracy:**
1. Use **1T (tick)** or **1S** intrabar resolution when available
2. Trade liquid markets with good volume data (crypto majors, forex majors, high-volume stocks)
3. Use smaller lookback length (20-30) to ensure all bars have valid LTF data
4. Monitor the "Intrabar Valid Bars" counter in the matrix header
5. If you see data warnings, reduce lookback or increase LTF resolution
**For Longer Backtests:**
1. Use **15S or 1M** intrabar resolution for more historical data
2. Increase lookback length if needed
3. Understand that accuracy decreases with higher LTF settings
4. Consider using Geometry mode for very long backtests (approximation but always available)
**Understanding the Signals:**
• Pay attention to the signal *reasoning* shown in the matrix — it explains WHY
• **NO_TRADE** means the system sees conflicting factors — respect this caution
• Event lines act as dynamic S/R — they update as new volume events occur
• Cumulative Delta (Δ) often provides early warning of trend changes
**Risk Management:**
• The default 10% per entry with max 2 pyramids = 20% maximum exposure
• Event-line-based SL/TP provides logical levels based on actual volume events
• Always verify signals with your own analysis before trading
**INTERPRETING THE MATRIX**
**Power Status Examples:**
• *Remaining Power: 75%* — Buyers still have most of their strength
• *Remaining Power: 25%* — Buyers nearly exhausted, watch for reversal
• *Opponent Dominance: -50%* — Sellers have consumed 150% of buyer power (strong bearish)
**Decay Angle:**
• *Low angle (0-30°)* — Slow consumption, power lasting longer
• *High angle (60-90°)* — Rapid consumption, expect quick exhaustion
**ETA to Parity:**
• Shows estimated bars until Remaining Power reaches zero
• *"Overtaken"* with 🚨 means sellers have already dominated
**LIMITATIONS & DISCLAIMER**
**Technical Limitations:**
• Requires sufficient historical LTF data (varies by TradingView plan and symbol)
• Intrabar (Precise) mode may show invalid data warnings on symbols with limited history
• Strategy tester may not have access to the same LTF data as live trading
• Maximum 500 lines and 500 labels (TradingView platform limits)
**Important Notes:**
• This strategy focuses on **Highest Buyers only** — it does not analyze all market factors
• Past performance does not guarantee future results
• Volume data quality varies significantly between symbols and exchanges
• The strategy's signals are analytical tools, not trading recommendations
**Risk Disclaimer:**
This strategy is provided for **educational and informational purposes only**. Trading involves substantial risk of loss and is not suitable for all investors.
• Always use proper risk management
• Never risk more than you can afford to lose
• Backtest results may differ significantly from live trading
• You are solely responsible for your trading decisions
**TECHNICAL SPECIFICATIONS**
• Pine Script Version: 6
• Calculation: calc_on_every_tick=true, use_bar_magnifier=true
• Default Capital: 10,000
• Default Position Size: 10% of equity
• Maximum Lines: 500
• Maximum Labels: 500
• External Library: TradingView/ta/10 (for requestUpAndDownVolume)
*Smart Trader EP1 — Understanding Volume, One Event at a Time*
Scalptrading
Dwaggy Scalping Trio (VWAP + EMA + RSI)First attempt at pine script this is a scalping indicator that combines VWAP, EMA, and RSI to signal entry/exit for scalping lower time frames
Hazel nut BB Strategy, volume base- lite versionHazel nut BB Strategy, volume base — lite version
Having knowledge and information in financial markets is only useful when a trader operates with a well-defined trading strategy. Trading strategies assist in capital management, profit-taking, and reducing potential losses.
This strategy is built upon the core principle of supply and demand dynamics. Alongside this foundation, one of the widely used technical tools — the Bollinger Bands — is employed to structure a framework for profit management and risk control.
In this strategy, the interaction of these tools is explained in detail. A key point to note is that for calculating buy and sell volumes, a lower timeframe function is used. When applied with a tick-level resolution, this provides the most precise measurement of buyer/seller flows. However, this comes with a limitation of reduced historical depth. Users should be aware of this trade-off: if precise tick-level data is required, shorter timeframes should be considered to extend historical coverage .
The strategy offers multiple configuration options. Nevertheless, it should be treated strictly as a supportive tool rather than a standalone trading system. Decisions must integrate personal analysis and other instruments. For example, in highly volatile assets with narrow ranges, it is recommended to adjust profit-taking and stop-loss percentages to smaller values.
◉ Volume Settings
• Buyer and seller volume (up/down volume) are requested from a lower timeframe, with an option to override the automatic resolution.
• A global lookback period is applied to calculate moving averages and cumulative sums of buy/sell/delta volumes.
• Ratios of buyers/sellers to total volume are derived both on the current bar and across the lookback window.
◉ Bollinger Band
• Bands are computed using configurable moving averages (SMA, EMA, RMA, WMA, VWMA).
• Inputs allow control of length, standard deviation multiplier, and offset.
• The basis, upper, and lower bands are plotted, with a shaded background between them.
◉ Progress & Proximity
• Relative position of the price to the Bollinger basis is expressed as percentages (qPlus/qMinus).
• “Near band” conditions are triggered when price progress toward the upper or lower band exceeds a user-defined threshold (%).
• A signed score (sScore) represents how far the close has moved above or below the basis relative to band width.
◉ Info Table
• Optional compact table summarizing:
• - Upper/lower band margins
• - Buyer/seller volumes with moving averages
• - Delta and cumulative delta
• - Buyer/seller ratios per bar and across the window
• - Money flow values (buy/sell/delta × price) for bar-level and summed periods
• The table is neutral-colored and resizable for different chart layouts.
◉ Zone Event Gate
• Tracks entry into and exit from “near band” zones.
• Arming logic: a side is armed when price enters a band proximity zone.
• Trigger logic: on exit, a trade event is generated if cumulative buyer or seller volume dominates over a configurable window.
◉ Trading Logic
• Orders are placed only on zone-exit events, conditional on volume dominance.
• Position sizing is defined as a fixed percentage of strategy equity.
• Long entries occur when leaving the lower zone with buyer dominance; short entries occur when leaving the upper zone with seller dominance.
◉ Exit Rules
• Open positions are managed by a strict priority sequence:
• 1. Stop-loss (% of entry price)
• 2. Take-profit (% of entry price)
• 3. Opposite-side event (zone exit with dominance in the other direction)
• Stop-loss and take-profit levels are configurable
◉ Notes
• This lite version is intended to demonstrate the interaction of Bollinger Bands and volume-based dominance logic.
• It provides a framework to observe how price reacts at band boundaries under varying buy/sell pressure, and how zone exits can be systematically converted into entry/exit signals.
When configuring this strategy, it is essential to carefully review the settings within the Strategy Tester. Ensure that the chosen parameters and historical data options are correctly aligned with the intended use. Accurate back testing depends on applying proper configurations for historical reference. The figure below illustrates sample result and configuration type.
Williams R Zone Scalper v1.0[BullByte]Originality & Usefulness
Unlike standard Williams R cross-over scripts, this strategy layers five dynamic filters—moving-average trend, Supertrend, Choppiness Index, Bollinger Band Width, and volume validation —and presents a real-time dashboard with equity, PnL, filter status, and key indicator values. No other public Pine script combines these elements with toggleable filters and a custom dashboard. In backtests (BTC/USD (Binance), 5 min, 24 Mar 2025 → 28 Apr 2025), adding these filters turned a –2.09 % standalone Williams R into a +5.05 % net winner while cutting maximum drawdown in half.
---
What This Script Does
- Monitors Williams R (length 14) for overbought/oversold reversals.
- Applies up to five dynamic filters to confirm trend strength and volatility direction:
- Moving average (SMA/EMA/WMA/HMA)
- Supertrend line
- Choppiness Index (CI)
- Bollinger Band Width (BBW)
- Volume vs. its 50-period MA
- Plots blue arrows for Long entries (R crosses above –80 + all filters green) and red arrows for Short entries (R crosses below –20 + all filters green).
- Optionally sets dynamic ATR-based stop-loss (1.5×ATR) and take-profit (2×ATR).
- Shows a dashboard box with current position, equity, PnL, filter status, and real-time Williams R / MA/volume values.
---
Backtest Summary (BTC/USD(Binance), 5 min, 24 Mar 2025 → 28 Apr 2025)
• Total P&L : +50.70 USD (+5.05 %)
• Max Drawdown : 31.93 USD (3.11 %)
• Total Trades : 198
• Win Rate : 55.05 % (109/89)
• Profit Factor : 1.288
• Commission : 0.01 % per trade
• Slippage : 0 ticks
Even in choppy March–April, this multi-filter approach nets +5 % with a robust risk profile, compared to –2.09 % and higher drawdown for Williams R alone.
---
Williams R Alone vs. Multi-Filter Version
• Total P&L :
– Williams R alone → –20.83 USD (–2.09 %)
– Multi-Filter → +50.70 USD (+5.05 %)
• Max Drawdown :
– Williams R alone → 62.13 USD (6.00 %)
– Multi-Filter → 31.93 USD (3.11 %)
• Total Trades : 543 vs. 198
• Win Rate : 60.22 % vs. 55.05 %
• Profit Factor : 0.943 vs. 1.288
---
Inputs & What They Control
- wrLen (14): Williams R look-back
- maType (EMA): Trend filter type (SMA, EMA, WMA, HMA)
- maLen (20): Moving-average period
- useChop (true): Toggle Choppiness Index filter
- ciLen (12): CI look-back length
- chopThr (38.2): CI threshold (below = trending)
- useVol (true): Toggle volume-above-average filter
- volMaLen (50): Volume MA period
- useBBW (false): Toggle Bollinger Band Width filter
- bbwMaLen (50): BBW MA period
- useST (false): Toggle Supertrend filter
- stAtrLen (10): Supertrend ATR length
- stFactor (3.0): Supertrend multiplier
- useSL (false): Toggle ATR-based SL/TP
- atrLen (14): ATR period for SL/TP
- slMult (1.5): SL = slMult × ATR
- tpMult (2.0): TP = tpMult × ATR
---
How to Read the Chart
- Blue arrow (Long): Williams R crosses above –80 + all enabled filters green
- Red arrow (Short) : Williams R crosses below –20 + all filters green
- Dashboard box:
- Top : position and equity
- Next : cumulative PnL in USD & %
- Middle : green/white dots for each filter (green=passing, white=disabled)
- Bottom : Williams R, MA, and volume current values
---
Usage Tips
- Add the script : Indicators → My Scripts → Williams R Zone Scalper v1.0 → Add to BTC/USD chart on 5 min.
- Defaults : Optimized for BTC/USD.
- Forex majors : Raise `chopThr` to ~42.
- Stocks/high-beta : Enable `useBBW`.
- Enable SL/TP : Toggle `useSL`; stop-loss = 1.5×ATR, take-profit = 2×ATR apply automatically.
---
Common Questions
- * Why not trade every Williams R reversal?*
Raw Williams R whipsaws in sideways markets. Choppiness and volume filters reduce false entries.
- *Can I use on 1 min or 15 min?*
Yes—adjust ATR length or thresholds accordingly. Defaults target 5 min scalping.
- *What if all filters are on?*
Fewer arrows, higher-quality signals. Expect ~10 % boost in average win size.
---
Disclaimer & License
Trading carries risk of loss. Use this script “as is” under the Mozilla Public License 2.0 (mozilla.org). Always backtest, paper-trade, and adjust risk settings to your own profile.
---
Credits & References
- Pine Script v6, using TradingView’s built-in `ta.supertrend()`.
- TradingView House Rules: www.tradingview.com
Goodluck!
BullByte
Smart Grid Scalping (Pullback) Strategy[BullByte]The Smart Grid Scalping (Pullback) Strategy is a high-frequency trading strategy designed for short-term traders who seek to capitalize on market pullbacks. This strategy utilizes a dynamic ATR-based grid system to define optimal entry points, ensuring precise trade execution. It integrates volatility filtering and an RSI-based confirmation mechanism to enhance signal accuracy and reduce false entries.
This strategy is specifically optimized for scalping by dynamically adjusting trade levels based on current market conditions. The grid-based system helps capture retracement opportunities while maintaining strict trade management through predefined profit targets and trailing stop-loss mechanisms.
Key Features :
1. ATR-Based Grid System :
- Uses a 10-period ATR to dynamically calculate grid levels for entry points.
- Prevents chasing trades by ensuring price has reached key levels before executing entries.
2. No Trade Zone Protection :
- Avoids low-volatility zones where price action is indecisive.
- Ensures only high-momentum trades are executed to improve success rate.
3. RSI-Based Entry Confirmation :
- Long trades are triggered when RSI is below 30 (oversold) and price is in the lower grid zone.
- Short trades are triggered when RSI is above 70 (overbought) and price is in the upper grid zone.
4. Automated Trade Execution :
- Long Entry: Triggered when price drops below the first grid level with sufficient volatility.
- Short Entry: Triggered when price exceeds the highest grid level with sufficient volatility.
5. Take Profit & Trailing Stop :
- Profit target set at a customizable percentage (default 0.2%).
- Adaptive trailing stop mechanism using ATR to lock in profits while minimizing premature exits.
6. Visual Trade Annotations :
- Clearly labeled "LONG" and "SHORT" markers appear at trade entries for better visualization.
- Grid levels are plotted dynamically to aid decision-making.
Strategy Logic :
- The script first calculates the ATR-based grid levels and ensures price action has sufficient volatility before allowing trades.
- An additional RSI filter is used to ensure trades are taken at ideal market conditions.
- Once a trade is executed, the script implements a trailing stop and predefined take profit to maximize gains while reducing risks.
---
Disclaimer :
Risk Warning :
This strategy is provided for educational and informational purposes only. Trading involves significant risk, and past performance is not indicative of future results. Users are advised to conduct their own due diligence and risk management before using this strategy in live trading.
The developer and publisher of this script are not responsible for any financial losses incurred by the use of this strategy. Market conditions, slippage, and execution quality can affect real-world trading outcomes.
Use this script at your own discretion and always trade responsibly.
Session Breakout Scalper Trading BotHi Traders !
Introduction:
I have recently been exploring the world of automated algorithmic trading (as I prefer more objective trading strategies over subjective technical analysis (TA)) and would like to share one of my automation compatible (PineConnecter compatible) scripts “Session Breakout Scalper”.
The strategy is really simple and is based on time conditional breakouts although has more ”relatively” advanced optional features such as the regime indicators (Regime Filters) that attempt to filter out noise by adding more confluence states and the ATR multiple SL that takes into account volatility to mitigate the down side risk of the trade.
What is Algorthmic Trading:
Firstly what is algorithmic trading? Algorithmic trading also known as algo-trading, is a method of using computer programs (in this case pine script) to execute trades based on predetermined rules and instructions (this trading strategy). It's like having a robot trader who follows a strict set of commands to buy and sell assets automatically, without any human intervention.
Important Note:
For Algorithmic trading the strategy will require you having an essential TV subscription at the minimum (so that you can set alerts) plus a PineConnecter subscription (scroll down to the .”How does the strategy send signals” headings to read more)
The Strategy Explained:
Is the Time input true ? (this can be changed by toggling times under the “TRADE MEDIAN TIMES” group for user inputs).
Given the above is true the strategy waits x bars after the session and then calculates the highest high (HH) to lowest low (LL) range. For this box to form, the user defined amount of bars must print after the session. The box is symmetrical meaning the HH and LL are calculated over a lookback that is equal to the sum of user defined bars before and after the session (+ 1).
The Strategy then simultaneously defines the HH as the buy level (green line) and the LL as the sell level (red line). note the strategy will set stop orders at these levels respectively.
Enter a buy if price action crosses above the HH, and then cancel the sell order type (The opposite is true for a stop order).
If the momentum based regime filters are true the strategy will check for the regime / regimes to be true, if the regime if false the strategy will exit the current trade, as the regime filter has predicted a slowing / reversal of momentum.
The image below shows the strategy executing these trading rules ( Regime filters, "Trades on chart", "Signal & Label" and "Quantity" have been omitted. "Strategy label plots" has been switched to true)
Other Strategy Rules:
If a new session (time session which is user defined) is true (blue vertical line) and the strategy is currently still in a trade it will exit that trade immediately.
It is possible to also set a range of percentage gain per day that the strategy will try to acquire, if at any point the strategy’s profit is within the percentage range then the position / trade will be exited immediately (This can be changed in the “PERCENT DAY GAIN” group for user inputs)
Stops and Targets:
The strategy has either static (fixed) or variable SL options. TP however is only static. The “STRAT TP & TP” group of user inputs is responsible for the SL and TP values (quoted in pips). Note once the ATR stop is set to true the SL values in the above group no longer have any affect on the SL as expected.
What are the Regime Filters:
The Larry Williams Large Trade Index (LWLTI): The Larry Williams Large Trade Index (LWTI) is a momentum-based technical indicator developed by iconic trader Larry Williams. It identifies potential entries and exits for trades by gauging market sentiment, particularly the buying and selling pressure from large market players. Here's a breakdown of the LWTI:
LWLTI components and their interpretation:
Oscillator: It oscillates between 0 and 100, with 50 acting as the neutral line.
Sentiment Meter: Values above 75 suggest a bearish market dominated by large selling, while readings below 25 indicate a bullish market with strong buying from large players.
Trend Confirmation: Crossing above 75 during an uptrend and below 25 during a downtrend confirms the trend's continuation.
The Andean Oscillator (AO) : The Andean Oscillator is a trend and momentum based indicator designed to measure the degree of variations within individual uptrends and downtrends in the prices.
Regime Filter States:
In trading, a regime filter is a tool used to identify the current state or "regime" of the market.
These Regime filters are integrated within the trading strategy to attempt to lower risk (equity volatility and/or draw down). The regime filters have different states for each market order type (buy and sell). When the regime filters are set to true, if these regime states fail to be true the trade is exited immediately.
For Buy Trades:
LWLTI positive momentum state: Quotient of the lagged trailing difference and the ATR > 50
AO positive momentum state: Bull line > Bear line (signal line is omitted)
For Sell Trades:
LWLTI negative momentum stat: Quotient of the lagged trailing difference and the ATR < 50
AO negative momentum state: Bull line < Bear line (signal line is omitted)
How does the Strategy Send Signals:
The strategy triggers a TV alert (you will neet to set a alert first), TV then sends a HTTP request to the automation software (PineConnecter) which receives the request and then communicates to an MT4/5 EA to automate the trading strategy.
For the strategy to send signals you must have the following
At least a TV essential subscription
This Script added to your chart
A PineConnecter account, which is paid and not free. This will provide you with the expert advisor that executes trades based on these strategies signals.
For more detailed information on the automation process I would recommend you read the PineConnecter documentation and FAQ page.
Dashboard:
This Dashboard (top right by defualt) lists some simple trading statistics and also shows when a trade is live.
Important Notice:
- USE THIS STRATEGY AT YOUR OWN RISK AND ALWAYS DO YOUR OWN RESEARCH & MANUAL BACKTESTING !
- THE STRATEGY WILL NOT EXHIBIT THE BACKTEST PERFORMANCE SEEN BELOW IN ALL MARKETS !
RSI Divergence Strategywhat is "RSI Divergence Strategy"?
it is a RSI strategy based this indicator:
what it does?
it gives buy or sell signals according to RSI Divergences. it also has different variables such as "take profit", "stop loss" and trailing stop loss.
how it does it?
it uses the "RSI Divergence" indicator to give signal. For detailed information on how it works, you can visit the link above. The quantity of the inputs is proportional to the rsi values. Long trades are directly traded with "RSI" value, while short poses are traded with "100-RSI" value.
How to use it?
The default settings are for scalp strategy but can be used for any type of trading strategy. you can develop different strategies by changing the sections. It is quite simple to use.
RSI length is length of RSİ
source is source of RSİ
RSİ Divergence lenght is length of line on the RSI
The "take profit", "stop" and "trailing stop" parts used in the "buy" group only affect buys. The "sell" group is similarly independent of the variables in the "buy" group.
The "zoom" section is used to enlarge or reduce the indicator. it only changes the appearance, it does not affect the results of the strategy.
Customizable Non-Repainting HTF MACD MFI Scalper Bot StrategyThis script was originally shared by Wunderbit as a free open source script for the community to work with.
WHAT THIS SCRIPT DOES:
It is intended for use on an algorithmic bot trading platform but can be used for scalping and manual trading.
This strategy is based on the trend-following momentum indicator . It includes the Money Flow index as an additional point for entry.
HOW IT DOES IT:
It uses a combination of MACD and MFI indicators to create entry signals. Parameters for each indicator have been surfaced for user configurability.
Take profits are fixed, but stop loss uses ATR configuration to minimize losses and close profitably.
HOW IS MY VERSION ORIGINAL:
I started trying to deploy this script myself in my algorithmic trading but ran into some issues which I have tried to address in this version.
Delayed Signals : The script has been refactored to use a time frame drop down. The higher time frame can be run on a faster chart (recommended on one minute chart for fastest signal confirmation and relay to algotrading platform.)
Repainting Issues : All indicators have been recoded to use the security function that checks to see if the current calculation is in realtime, if it is, then it uses the previous bar for calculation. If you are still experiencing repainting issues based on intended (or non intended use), please provide a report with screenshot and explanation so I can try to address.
Filtering : I have added to additional filters an ABOVE EMA Filter and a BELOW RSI Filter (both can be turned on and off)
Customizable Long and Close Messages : This allows someone to use the script for algorithmic trading without having to alter code. It also means you can use one indicator for all of your different alterts required for your bots.
HOW TO USE IT:
It is intended to be used in the 5-30 minute time frames, but you might be able to get a good configuration for higher time frames. I welcome feedback from other users on what they have found.
Find a pair with high volatility (example KUCOIN:ETH3LUSDT ) - I have found it works particularly well with 3L and 3S tokens for crypto. although it the limitation is that confrigurations I have found to work typically have low R/R ratio, but very high win rate and profit factor.
Ideally set one minute chart for bots, but you can use other charts for manual trading. The signal will be delayed by one bar but I have found configurations that still test well.
Select a time frame in configuration for your indicator calculations.
Select the strategy config for time frame. I like to use 5 and 15 minutes for scalping scenarios, but I am interested in hearing back from other community memebers.
Optimize your indicator without filters (trendFilter and RSI Filter)
Use the TrendFilter and RSI Filter to further refine your signals for entry. You will get less entries but you can increase your win ratio.
I will add screenshots and possibly a video provided that it passes community standards.
Limitations: this works rather well for short term, and does some good forward testing but back testing large data sets is a problem when switching from very small time frame to large time frame. For instance, finding a configuration that works on a one minute chart but then changing to a 1 hour chart means you lose some of your intra bar calclulations. There are some new features in pine script which might be able to address, this, but I have not had a chance to work on that issue.
Triple EMA Scalper low lag stratHi all,
This strategy is based on the Amazing scalper for majors with risk management by SoftKill21
The change is in lines 11-20 where the sma's are replaced with Triple ema's to
lower the lag.
The original author is SoftKill21. His explanation is repeated below:
Best suited for 1M time frame and majors currency pairs.
Note that I tried it at 3M time frame.
Its made of :
Ema ( exponential moving average ) , long period 25
Ema ( exponential moving average ) Predictive, long period 50,
Ema ( exponential moving average ) Predictive, long period 100
Risk management , risking % of equity per trade using stop loss and take profits levels.
Long Entry:
When the Ema 25 cross up through the 50 Ema and 100 EMA . and we are in london or new york session( very important the session, imagine if we have only american or european currencies, its best to test it)
Short Entry:
When the Ema 25 cross down through the 50 Ema and 100 EMA , and we are in london or new york session( very important the session, imagine if we have only american or european currencies, its best to test it)
Exit:
TargetPrice: 5-10 pips
Stop loss: 9-12 pips
Trend trader StrategyFirst I would like to thank to @JustUncleL since this strategy started from one of his scalper strategies
This strategy can be adapted to all time charts .
First it has the session where we want to trade, for this example I choosed the EURUSD so I only take in consideration london/neywork session.
Its made from 3 EMA :
normal
slow
ultra slow
It has has the capacity to use HA candles into consideration if its needed.
At the same time we have a price channel made from faster MAs, that act like a bollinger band .
Together with all of them, we establish which trend we have if its uptrend or downtrend
Then we check the candles if they are below or above the MA , and based on the condition if they crossed recently we can suggest if its a buy or a long condition
At the same time we have 2 options of stop conditions:
Through a trailing stop made from ATR or % based
And second, a SL/TP made from pip points or % based.
For this example I used % based.
Let me know what you think about it, and if you found some nice settings for it. So far I only adapted to EURUSD 1 min time.
MP ZeroLag EMANew script based on zlema. Hopefully responds better tot ake advantage of margin trading. As usual, commands for both spot trading and margin trading are included, just need to comment or uncomment (using // ) which you prefer. They are just labels so both work in the same way (long/buy, short/sell). Also added some flair to pretty it up a bit, and yes, those divergences are in fact functional, but not really part of the script (disclosure- the divergences are taken from DonovanWall's ideas, full credit here). There is a "new stuff" section, which you CAN use, but right now it was for art and introduced way too many functions at once to be of any use, but feel free to explore as an Easter Egg :)
Autoview friendly in design :)
As usual, all proceeds go to the betterment of these scripts as well as my upcoming surgery (Carpel Tunnel Syndrome, yuck)
1Dsg49Zt2FQ9BnUHrmXQwvhL5dd3teqa7g
ltc addy- LYUpgsHSHnKeYdNaj9bu9prK4QsnJXEQtP
pinkcoin addy- 2PoeXyAk3rF9FmMC8azme2mGzMYsEiZ5eS










