magic wand STSM"Magic Wand STSM" Strategy: Trend-Following with Dynamic Risk Management
Overview:
The "Magic Wand STSM" (Supertrend & SMA Momentum) is an automated trading strategy designed to identify and capitalize on sustained trends in the market. It combines a multi-timeframe Supertrend for trend direction and potential reversal signals, along with a 200-period Simple Moving Average (SMA) for overall market bias. A key feature of this strategy is its dynamic position sizing based on a user-defined risk percentage per trade, and a built-in daily and monthly profit/loss tracking system to manage overall exposure and prevent overtrading.
How it Works (Underlying Concepts):
Multi-Timeframe Trend Confirmation (Supertrend):
The strategy uses two Supertrend indicators: one on the current chart timeframe and another on a higher timeframe (e.g., if your chart is 5-minute, the higher timeframe Supertrend might be 15-minute).
Trend Identification: The Supertrend's direction output is crucial. A negative direction indicates a bearish trend (price below Supertrend), while a positive direction indicates a bullish trend (price above Supertrend).
Confirmation: A core principle is that trades are only considered when the Supertrend on both the current and the higher timeframe align in the same direction. This helps to filter out noise and focus on stronger, more confirmed trends. For example, for a long trade, both Supertrends must be indicating a bearish trend (price below Supertrend line, implying an uptrend context where price is expected to stay above/rebound from Supertrend). Similarly, for short trades, both must be indicating a bullish trend (price above Supertrend line, implying a downtrend context where price is expected to stay below/retest Supertrend).
Trend "Readiness": The strategy specifically looks for situations where the Supertrend has been stable for a few bars (checking barssince the last direction change).
Long-Term Market Bias (200 SMA):
A 200-period Simple Moving Average is plotted on the chart.
Filter: For long trades, the price must be above the 200 SMA, confirming an overall bullish bias. For short trades, the price must be below the 200 SMA, confirming an overall bearish bias. This acts as a macro filter, ensuring trades are taken in alignment with the broader market direction.
"Lowest/Highest Value" Pullback Entries:
The strategy employs custom functions (LowestValueAndBar, HighestValueAndBar) to identify specific price action within the recent trend:
For Long Entries: It looks for a "buy ready" condition where the price has found a recent lowest point within a specific number of bars since the Supertrend turned bearish (indicating an uptrend). This suggests a potential pullback or consolidation before continuation. The entry trigger is a close above the open of this identified lowest bar, and also above the current bar's open.
For Short Entries: It looks for a "sell ready" condition where the price has found a recent highest point within a specific number of bars since the Supertrend turned bullish (indicating a downtrend). This suggests a potential rally or consolidation before continuation downwards. The entry trigger is a close below the open of this identified highest bar, and also below the current bar's open.
Candle Confirmation: The strategy also incorporates a check on the candle type at the "lowest/highest value" bar (e.g., closevalue_b < openvalue_b for buy signals, meaning a bearish candle at the low, suggesting a potential reversal before a buy).
Risk Management and Position Sizing:
Dynamic Lot Sizing: The lotsvalue function calculates the appropriate position size based on your Your Equity input, the Risk to Reward ratio, and your risk percentage for your balance % input. This ensures that the capital risked per trade remains consistent as a percentage of your equity, regardless of the instrument's volatility or price. The stop loss distance is directly used in this calculation.
Fixed Risk Reward: All trades are entered with a predefined Risk to Reward ratio (default 2.0). This means for every unit of risk (stop loss distance), the target profit is rr times that distance.
Daily and Monthly Performance Monitoring:
The strategy tracks todaysWins, todaysLosses, and res (daily net result) in real-time.
A "daily profit target" is implemented (day_profit): If the daily net result is very favorable (e.g., res >= 4 with todaysLosses >= 2 or todaysWins + todaysLosses >= 8), the strategy may temporarily halt trading for the remainder of the session to "lock in" profits and prevent overtrading during volatile periods.
A "monthly stop-out" (monthly_trade) is implemented: If the lres (overall net result from all closed trades) falls below a certain threshold (e.g., -12), the strategy will stop trading for a set period (one week in this case) to protect capital during prolonged drawdowns.
Trade Execution:
Entry Triggers: Trades are entered when all buy/sell conditions (Supertrend alignment, SMA filter, "buy/sell situation" candle confirmation, and risk management checks) are met, and there are no open positions.
Stop Loss and Take Profit:
Stop Loss: The stop loss is dynamically placed at the upTrendValue for long trades and downTrendValue for short trades. These values are derived from the Supertrend indicator, which naturally adjusts to market volatility.
Take Profit: The take profit is calculated based on the entry price, the stop loss, and the Risk to Reward ratio (rr).
Position Locks: lock_long and lock_short variables prevent immediate re-entry into the same direction once a trade is initiated, or after a trend reversal based on Supertrend changes.
Visual Elements:
The 200 SMA is plotted in yellow.
Entry, Stop Loss, and Take Profit lines are plotted in white, red, and green respectively when a trade is active, with shaded areas between them to visually represent risk and reward.
Diamond shapes are plotted at the bottom of the chart (green for potential buy signals, red for potential sell signals) to visually indicate when the buy_sit or sell_sit conditions are met, along with other key filters.
A comprehensive trade statistics table is displayed on the chart, showing daily wins/losses, daily profit, total deals, and overall profit/loss.
A background color indicates the active trading session.
Ideal Usage:
This strategy is best applied to instruments with clear trends and sufficient liquidity. Users should carefully adjust the Your Equity, Risk to Reward, and risk percentage inputs to align with their individual risk tolerance and capital. Experimentation with different ATR Length and Factor values for the Supertrend might be beneficial depending on the asset and timeframe.
Indicators and strategies
Strategy Builder With IndicatorsThis strategy script is designed for traders who enjoy building systems using multiple indicators.
Please note : This script does not include any built-in indicators. Instead, it works by referencing the plot outputs of the indicators you’ve already added to your chart.
For example, if you add a MACD and an ATR indicator to your chart, you can assign their plot values as inputs in the settings panel of this strategy.
• MACD as a trigger
• ATR as a filter
How Filters Work
Filters check whether certain conditions are met before a trade can be opened. For instance, if you set a filter like ATR > 30, then no trade will be executed unless that condition is true — even if the trigger fires.
All filters are linked, meaning every active filter must be satisfied for a trade to occur.
How Triggers Work
Triggers are what actually fire a trade signal — such as a moving average crossover or RSI breaking above a specific level. Unlike filters, triggers are independent. Only one active trigger needs to be true for the trade to execute.
Thanks to its modular structure, this strategy can be used with any indicator of your choice.
⸻
Risk Management Features
In the settings, you’ll find flexible options for:
• Stop Loss (SL)
• Trailing Stop Loss (TSL)
• Multi Take-Profit (TP)
These features enhance trade safety and let you tailor your risk management.
SL types available:
• Tick-based SL
• Percent-based SL
• ATR-based SL
Once you select your preferred SL type, you can fine-tune its distance using the offset field.
Trailing SL allows your stop to follow price as it moves in your favor — helping to lock in profits.
Multi-TP lets you take profits at two different levels, helping you secure gains while leaving room for extended moves.
Breakeven option is also available to automatically move your SL to entry after reaching a profit threshold.
⸻
How to Build a Solid Strategy
Let’s break down a good setup into three key components:
1. Trend Filter
Avoid trading against the trend — that’s like swimming against the current.
Use a filter like:
• Supertrend
• Momentum indicators
• Candlestick bias, etc.
Example: In this case, I used Supertrend and filtered for trades only if the price is above the uptrend line.
2. Trigger Condition
Once we confirm the trend is on our side, we need a trigger to execute at the right moment. This can be:
• RSI cross
• Candlestick patterns
• Trendline breaks
• Moving average crossovers, etc.
Example: I used RSI crossing above 50 as the entry trigger.
3. Risk Management
Even in the right trend at the right time — anything can happen. That’s why you should always define Stop Loss and Take Profit levels.
⸻
And there you have it! Your strategy is ready to backtest, refine, and deploy with alerts for live trading.
If you’d like a step-by-step guide on how to use this strategy and set everything up correctly, watch this video tutorial:
youtu.be
Questions or suggestions? Feel free to reach out
Futures Trading Hours RSI StrategyFutures Trading Hours RSI Strategy
A lightweight, session-filtered RSI strategy designed for equity-index futures (e.g. NQ, ES, YM) on a 30-minute chart. It dynamically enters long when RSI crosses above your oversold threshold and short when RSI crosses below your overbought threshold—but only during regular U.S. trading hours (08:30–15:00 CT, Monday–Friday). All positions are set to close at 15:00 CT to avoid overnight risk, and optional background shading highlights your open longs (green) and shorts (red).
⸻
Key Features
• RSI-based entries: configurable length, oversold, and overbought levels
• Session filter: trades only between 08:30–15:00 CT, Monday through Friday
• Automatic exit: closes all positions at or after 15:00 CT each day
• Visual cues: optional background shading for open long/short positions
• Easy customization: adjust length, overSold, overBought, and time offsets
Backtest Performance (NQ Jun 2025, 30 min)
• Total P&L: +$10,230 (+1.02%)
• Profit Factor: 4.61
• Win Rate: 57.1% (4 wins / 7 trades)
• Max Drawdown: $2,215 (0.22%)
(Results shown are for illustrative purposes only; past performance does not guarantee future returns.)
How to Use
1. Add this script to your 30-minute futures chart.
2. Tweak the RSI parameters and time-zone offset to suit your instrument.
3. Enable “background shading” if you’d like a visual reminder of open positions.
4. Run in paper-trade mode to validate performance before going live.
⸻
⚠️ Disclaimer: Trading carries risk. Always backtest and paper-trade before using real capital. Adjust position sizing and risk controls to your own tolerance.
Contrarian PRO - Smart MoneyContrarian PRO - Smart Money" for TradingView detects liquidity sweeps and CHoCH signals to enter against the crowd, with dynamic TP/SL based on ATR and proper risk management per trade.
You can test it on BTC or gold using the 1H or 30M timeframe.
Money Flow Sentiment Panel StrategyMoney Flow + Fear and Greed Index. Shows institutional money flow using the Fear and greed index
Fibonacci Trend v6.4 - TP/SL EtiketliEn güncel haliyle yeni eklemeler ve hedge modunu aktiflestirdim
Volatility Pulse with Dynamic ExitVolatility Pulse with Dynamic Exit
Overview
This strategy, Volatility Pulse with Dynamic Exit, is designed to capture impulsive price moves following volatility expansions, while ensuring risk is managed dynamically. It avoids trades during low-volatility periods and uses momentum confirmation to enter positions. Additionally, it features a time-based forced exit system to limit overexposure.
How It Works
A position is opened when the current ATR (Average True Range) significantly exceeds its 20-period average, signaling a volatility expansion.
To confirm the move is directional and not random noise, the strategy checks for momentum: the close must be above/below the close of 20 bars ago.
Low volatility zones are filtered out to avoid chop and poor trade entries.
Upon entry, a dynamic stop-loss is set at 1x ATR, while take-profit is set at 2x ATR, offering a 2:1 reward-to-risk ratio.
If the position remains open for more than 42 bars, it is forcefully closed, even if targets are not hit. This prevents long-lasting, stagnant trades.
Key Features
✅ Volatility-based breakout detection
✅ Momentum confirmation filter
✅ Dynamic stop-loss and take-profit based on real-time ATR
✅ Time-based forced exit (42 bars max holding)
✅ Low-volatility environment filter
✅ Realistic settings with 0.05% commission and slippage included
Parameters Explanation
ATR Length (14): Captures recent volatility over ~2 weeks (14 candles).
Momentum Lookback (20): Ensures meaningful price move confirmation.
Volatility Expansion Threshold (0.5x): Strategy activates only when ATR is at least 50% above its average.
Minimum ATR Filter (1.0x): Avoids entries in tight, compressed market ranges.
Max Holding (42 bars): Trades are closed after 42 bars if no exit signal is triggered.
Risk-Reward (2.0x): Aiming for 2x ATR as profit for every 1x ATR risk.
Originality Note
While volatility and momentum have been used separately in many strategies, this script combines both with a time-based dynamic exit system. This exit rule, combined with an ATR-based filter to exclude low-activity periods, gives the system a practical edge in real-world use. It avoids classic rehashes and integrates real trading constraints for better applicability.
Disclaimer
This is a research-focused trading strategy meant for backtesting and educational purposes. Always use proper risk management and perform due diligence before applying to real funds.
Ultra Trend Strategy @Peet V.4We use MA trend line to indicated the market's status.
Four MA trend line were used, fast, medium, long and very long.
We can select MA method with default in Pine Script such as Simple MA, Exponential MA and others depend on best results on each securities.
You can select any type of open order such as MA cross or ATR signals.
You can select open long only, short only or both.
You can select time interval to test the programme.
I also eliminate the noise by determine different of open order and close order to protect un-want position in side way by setting PDI (percent Differential Index)
Finally you can set Long position when long term is bullish of Short position when long term is bearish.
3 EMA Trend Strategy (Locks Trailing Stop Tightening)How I Created a Smart Trading Strategy Using 3 EMAs + Trailing StopLoss with help of ChatGPT
Ever wondered if AI can really help with trading? I put it to the test by asking ChatGPT to build a strategy using 3 Exponential Moving Averages (EMAs). Here's what I got:
✅ Custom Pine Script
✅ Trend-based entry logic
✅ Clean exits using Trailing Stop Loss
✅ Backtested on multiple tickers (QQQ, NVDA, SPY, AAPL)
I wanted to say anyone create the strategies with their ideas. Just take help of chatGPT and tweak for better results.
Here’s a quick summary of what the strategy does:
Condition Action Taken
==============================================
EMAs aligned + pullback Enter LONG (Buy)
Trade reaches 10% profit Trailing Stop set to 5%
Trade reaches 20% profit Trailing Stop locked at 2%
Price drops to stop level Exit Trade
I've fine-tuned the code, which is available to public. It is been tested , see the performance on chart. More detailed description and shared all insights in my latest blog post on
eemanispace.com
Let me know your comments / feedback.
SMA CrossoverThis classic script shows buy/sell signals when the short-term SMA crosses the long-term SMA.
SuperTrend Strategy with Trend-Based Exits**SuperTrend Strategy with Trend-Based Exits & Qty Rounding**
**Overview**
This automated strategy uses the SuperTrend indicator to detect trend reversals and manage both entries and exits. Position size is calculated dynamically based on a fixed risk-per-trade in USD and the ATR-based stop-loss distance, then rounded down to a configurable lot step to guarantee valid order sizes on any exchange.
**Key Features**
* **Dynamic Position Sizing**
```
raw_qty = risk_per_trade / |close – SuperTrend|
qty = floor(raw_qty / lot_step) * lot_step
```
* **Trend-Based Entries & Exits**
* On SuperTrend flip: close existing position, then open new in the opposite direction.
* Uses one strategy.close() + one strategy.entry() per reversal—no duplicate signals.
* **Trailing Stop**
* A built-in stop follows the SuperTrend line, locking in profits.
* **Qty Rounding**
* Ensures orders are always integer (or custom-step) sizes:
– Default `lot_step = 1` for whole contracts
– Use `lot_step = 100` for coins like PEPE
– Use `lot_step = 0.01` for ETH/BTC
**Inputs**
| Input | Description | Default |
| -------------------- | -------------------------------------------------------- | :-----: |
| Risk per trade (USD) | Maximum dollar risk per trade | 150 |
| ATR Length | Period for ATR used in SuperTrend | 50 |
| SuperTrend Factor | Multiplier applied to ATR for the SuperTrend calculation | 3.5 |
| Qty step | Minimum tradeable lot size (integer or decimal) | 1.0 |
**Usage & Setup**
1. **Manual Sync (one-time)**
* Check the rounded `qty` and trend direction on your chart.
* Open a matching market order on your exchange to align your real position with the strategy’s virtual position.
2. **Create TradingView Alert**
* Condition: **“Order fills”**
* Message: use your exchange’s required JSON template (e.g. Bybit’s).
* Webhook URL: point to your execution endpoint.
3. **First Reversal**
* The initial `close` signal will sync without sending a webhook.
* Subsequent `close` + `entry` signals will each fire exactly one valid webhook.
4. **Live Trading**
* Strategy will continuously close and reverse positions based on SuperTrend flips, with a SuperTrend-based trailing stop.
**Tips**
* Adjust **ATR Length** & **Factor** per asset volatility:
* Low vol: ATR 30–50, Factor 3.0–4.0
* Mid vol: ATR 50–75, Factor 4.0–4.5
* High vol: ATR 75–120, Factor 4.5–5.0
* If you trade a new coin, screen it quickly with 3–4 proven parameter sets, then refine around the best performer (3×3 grid search).
Add to your Pine Editor, publish as a strategy, set your alert and enjoy automated, volatility-adapted trading!
MNQ EMA StrategyThis strategy is not perfected yet. ONE MINUTE TIMEFRAME
The goal is to take Longs above the 5 ema when price is above all the 200, 30, and 5 ema.
Short side is when candle closes below the 5 ema and price is below the 300, 30, and 5 ema.
I use candle range blocks for different time zones to avoid excess orders from being triggered. As well as blocks when stoploss is hit or after a profitable trade of certain ticks.
There is an RSI to avoid trades when there isn't too much movement.
My goal is to get an entry when price trades above the 5 ema and then next candle passes it by .25 instead of entering immediately. The stoploss as the low of candle before entry and TP as 3 times the stoploss. I've tried a million times to make it like this but I don't know how to use pine script or Code.
The sell side is basically the same, enter at candle close below 5 ema wait for low to get swept to enter and stoploss above previous high, with TP 3 times the stoploss.
Publishing in hopes anyone knows how to adjust this
CAUTION THIS STRATEGY WORKS WITH CURRENT PRICE ACTION DUE TO ME USING RECENT TICK COUNT RATHER THAN BASED ON CANDLES OR PERCENTAGES. THIS WILL ONLY WORK AS LONG AS MARKET MOVES AS IT HAS BEEN SINCE 2024. CME_MINI:MNQ1!
Ultra Trend Strategy @Peet V.4We use MA trend line to indicated the market's status.
Four MA trend line were used, fast, medium, long and very long.
We can select MA method with default in Pine Script such as Simple MA, Exponential MA and others depend on best results on each securities.
You can select any type of open order such as MA cross or ATR signals.
You can select open long only, short only or both.
You can select time interval to test the programme.
I also eliminate the noise by determine different of open order and close order to protect un-want position in side way by setting PDI (percent Differential Index)
Finally you can set Long position when long term is bullish of Short position when long term is bearish.
SOXL Trend Surge v3.0.2 – Profit-Only RunnerSOXL Trend Surge v3.0.2 – Profit-Only Runner
This is a trend-following strategy built for leveraged ETFs like SOXL, designed to ride high-momentum waves with minimal interference. Unlike most short-term scalping scripts, this model allows trades to develop over multiple days to even several months, capitalizing on the full power of extended directional moves — all without using a stop-loss.
🔍 How It Works
Entry Logic:
Price is above the 200 EMA (long-term trend confirmation)
Supertrend is bullish (momentum confirmation)
ATR is rising (volatility expansion)
Volume is above its 20-bar average (liquidity filter)
Price is outside a small buffer zone from the 200 EMA (to avoid whipsaws)
Trades are restricted to market hours only (9 AM to 2 PM EST)
Cooldown of 15 bars after each exit to prevent overtrading
Exit Strategy:
Takes partial profit at +2× ATR if held for at least 2 bars
Rides the remaining position with a trailing stop at 1.5× ATR
No hard stop-loss — giving space for volatile pullbacks
⚙️ Strategy Settings
Initial Capital: $500
Risk per Trade: 100% of equity (fully allocated per entry)
Commission: 0.1%
Slippage: 1 tick
Recalculate after order is filled
Fill orders on bar close
Timeframe Optimized For: 45-minute chart
These parameters simulate an aggressive, high-volatility trading model meant for forward-testing compounding potential under realistic trading costs.
✅ What Makes This Unique
No stop-loss = fewer premature exits
Partial profit-taking helps lock in early wins
Trailing logic gives room to ride large multi-week moves
Uses strict filters (volume, ATR, EMA bias) to enter only during high-probability windows
Ideal for leveraged ETF swing or position traders looking to hold longer than the typical intraday or 2–3 day strategies
⚠️ Important Note
This is a high-risk, high-reward strategy meant for educational and testing purposes. Without a stop-loss, trades can experience deep drawdowns that may take weeks or even months to recover. Always test thoroughly and adjust position sizing to suit your risk tolerance. Past results do not guarantee future returns. Backtest range: May 8, 2020 – May 23, 2025
Trend Surge with Pullback FilterTrend Surge with Pullback Filter
Overview
Trend Surge with Pullback Filter is a price action-based strategy designed to enter strong trends not at the breakout, but at the first controlled pullback after a surge. It filters out noise by requiring momentum confirmation and low volatility conditions, aiming for better entry prices and reduced risk exposure.
How It Works
A strong upward trend is identified when the Rate of Change (ROC) exceeds a defined percentage (e.g., 2%).
Instead of jumping into the trend immediately, the strategy waits for a pullback: the price must drop at least 1% below its recent high (over the past 3 candles).
A low volatility environment is also required for entry — measured using ATR being below its 20-period average multiplied by a safety factor.
If all three conditions are met (trend + pullback + quiet volatility), the system enters a long position.
The trade is managed using a dynamic ATR-based stop-loss and a take-profit at 2x ATR.
An automatic exit occurs after 30 bars if neither SL nor TP is hit.
Key Features
- Momentum-triggered trend detection via ROC
- Smart pullback filter avoids overbought entries
- Volatility-based filter to eliminate noise and choppy conditions
- Dynamic risk-reward ratio with ATR-driven exit logic
- Time-limited exposure using bar-based exit
Parameter Explanation
ROC Length (10): Looks for short-term price surges
ROC Threshold (2.0%): Trend is considered valid if price increased more than 2%
Pullback Lookback (3): Checks last 3 candles for price retracement
Minimum Pullback % (1.0%): Entry only if price pulled back at least 1%
ATR Length (14): Measures current volatility
Low Volatility Multiplier (1.2): ATR must be below this multiple of its 20-period average
Risk-Reward (2.0): Target is set at 2x the stop-loss distance
Max Bars (30): Trade is closed automatically after 30 bars
Originality Statement
This strategy doesn’t enter at the trend start, unlike many momentum bots. Instead, it waits for the first market hesitation — a minor pullback under low volatility — before entering. This logic mimics how real traders often wait for a better entry after a breakout, avoiding emotional overbought buys. The combined use of ROC, dynamic pullback detection, and ATR-based environment filters makes it both practical and original for real-world trading.
Disclaimer
This strategy is intended for educational and research purposes. Backtest thoroughly and understand the logic before using with real capital.
MVO Strategy FullBeter if used with Heikin Ashi Candles chart
Overview
This strategy is an enhanced version of a Heikin Ashi-based trading system that enters long positions on the second consecutive green Heikin Ashi candle (when the current candle is larger than the previous one) and exits on the first red Heikin Ashi candle. The strategy incorporates advanced risk management, trend filtering, volume confirmation, and time-based restrictions to improve trade reliability and performance. It is designed for traders seeking a trend-following approach with robust risk controls.
Strategy Logic
• Entry Condition:
• Enters a long position when:
• The previous Heikin Ashi candle is green.
• The current Heikin Ashi candle is green and larger than the previous one.
• The price is above a 50-period Simple Moving Average (SMA) to confirm a bullish trend.
• Volume exceeds the 10-period SMA of volume to ensure market conviction.
• The trade occurs within specified trading hours (default: 9 AM to 5 PM UTC).
• No open trades exist.
• Exit Condition:
• Exits the long position on the first red Heikin Ashi candle.
• Optional stop-loss and take-profit levels (based on ATR) can trigger an exit if hit before a red candle.
• An optional trailing stop can be enabled to lock in profits during strong trends.
• Risk Management:
• Uses a dynamic stop-loss and take-profit based on the 14-period Average True Range (ATR).
• Default position size is 10% of equity to limit risk exposure.
• Visualization:
• Plots Heikin Ashi candles, the trend SMA, stop-loss, and take-profit levels.
• Displays “BUY” and “SELL” labels for trade entries and exits.
• Shows closed trade profits as a histogram for performance tracking.
Inputs
• Stop Loss ATR Multiplier (Default: 2.0): Sets the stop-loss distance as a multiple of ATR.
• Take Profit ATR Multiplier (Default: 3.0): Sets the take-profit distance as a multiple of ATR.
• Use Trailing Stop (Default: False): Enables/disables a trailing stop.
• Trailing Stop ATR Multiplier (Default: 1.5): Sets the trailing stop distance as a multiple of ATR.
• Trend MA Length (Default: 50): Length of the SMA used for trend filtering.
• Use Trading Hours Filter (Default: True): Restricts trading to specified hours.
• Start Hour (UTC) (Default: 9): Start of allowed trading hours.
• End Hour (UTC) (Default: 17): End of allowed trading hours.
Features
• Trend Filter: Ensures entries align with a bullish trend (price above SMA).
• Volume Confirmation: Requires above-average volume for entries to confirm market strength.
• Time Filter: Avoids trading during low-liquidity periods (e.g., outside major market hours).
• Dynamic Risk Management: ATR-based stop-loss and take-profit adjust to market volatility.
• Optional Trailing Stop: Captures larger profits in trending markets when enabled.
• Enhanced Visualization: Clear plots and labels for easy trade monitoring.
Usage Instructions
1. Apply to Chart: Add the strategy to your TradingView chart.
2. Adjust Inputs: Customize the ATR multipliers, SMA length, and trading hours based on your market and timeframe.
3. Backtest: Test the strategy on your chosen market (e.g., forex, stocks, crypto) and timeframe (e.g., 1H, 4H, Daily).
4. Optimize Parameters: Experiment with input settings to maximize performance for your market.
5. Monitor Trades: Use the plotted SMA, stop-loss, take-profit, and trade labels to track strategy behavior.
6. Consider Market Conditions: The strategy performs best in trending markets. Consider adding an ADX filter for choppy markets.
Notes
• Markets and Timeframes: Test the strategy across different markets and timeframes to ensure robustness.
• Risk Management: The default 10% equity position size and ATR-based stops help manage risk, but adjust based on your risk tolerance.
• Trading Hours: Modify Start Hour and End Hour to match your market’s active sessions (e.g., London/New York for forex).
• Commissions and Slippage: Include realistic commission and slippage in backtests for accurate results.
• Limitations: The red candle exit may lead to early exits in choppy markets. Consider enabling the trailing stop for trending conditions.
Example Use Case
• Forex (EUR/USD, 1H): Set Start Hour to 8 and End Hour to 17 to trade during London/New York sessions. Adjust Stop Loss ATR Multiplier to 1.5 and Take Profit ATR Multiplier to 3.0 for tighter risk control.
• Crypto (BTC/USD, 4H): Enable the trailing stop for trending markets and increase Trend MA Length to 100 for smoother trend filtering.
Disclaimer
This strategy is for educational purposes only and does not constitute financial advice. Always backtest and validate the strategy with your own risk management rules before trading with real capital.
Hammer + EMA Strategy with Tick-based SL/TPWhat This Script Does:
Detects Hammer (bullish reversal) and Inverted Hammer (bearish reversal) patterns
Requires a simple trend context (using 2 bars back)
Confirms price position relative to EMA 50
Applies tick-based SL and TP
Plots buy/sell signals on chart with emoji labels
EURUSD 90% Win Rate Strategy with Risk Control//@version=5
strategy("EURUSD 90% Win Rate Strategy with Risk Control", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
emaFast = ta.ema(close, 5)
emaSlow = ta.ema(close, 20)
rsi = ta.rsi(close, 14)
// Entry Conditions
longCondition = ta.crossover(emaFast, emaSlow) and rsi < 70
shortCondition = ta.crossunder(emaFast, emaSlow) and rsi > 30
// Risk Settings
accountBalance = 5000 // starting capital
maxLossPerTrade = 250 // risk 5% per trade
stopLossPerc = 0.01 // 1% stop loss
takeProfitPerc = 0.02 // 2% take profit
// Calculate position size dynamically
riskPerUnit = close * stopLossPerc
positionSize = maxLossPerTrade / riskPerUnit
// Entry & Exit Logic
if (longCondition)
strategy.entry("Long", strategy.long, qty=positionSize)
strategy.exit("TP/SL Long", from_entry="Long", limit=close * (1 + takeProfitPerc), stop=close * (1 - stopLossPerc))
if (shortCondition)
strategy.entry("Short", strategy.short, qty=positionSize)
strategy.exit("TP/SL Short", from_entry="Short", limit=close * (1 - takeProfitPerc), stop=close * (1 + stopLossPerc))
Chaikin Momentum Scalper🎯 Overview
The Chaikin Momentum Scalper is a powerful trading strategy designed to identify momentum shifts in the market and ride the trend for maximum profits. This strategy is ideal for trading the USD/JPY currency pair on a 15-minute chart, making it perfect for high-frequency trading (HFT). Whether you’re starting with a small account of $1,000 or managing a larger portfolio, this strategy can scale to suit your needs.
________________________________________
🔑 How the Strategy Works
Here’s how the Chaikin Momentum Scalper identifies trade opportunities:
1️⃣ Momentum Detection
The core of this strategy is the Chaikin Oscillator, a tool that measures the flow of money into or out of a market. It helps us understand whether buyers (bulls) or sellers (bears) are in control.
• When the indicator crosses above zero, it signals that buying momentum is picking up – a buying opportunity.
• When the indicator crosses below zero, it signals that selling momentum is increasing – a selling opportunity.
2️⃣ Trend Confirmation
We don’t just jump into trades based on momentum alone. We also use a 200-period simple moving average (SMA) to confirm the overall trend.
• If the price is above the SMA, it confirms an uptrend, so we look for buy trades.
• If the price is below the SMA, it confirms a downtrend, so we look for sell trades.
This way, we align our trades with the broader market direction for higher success rates.
3️⃣ Volatility & Risk Management
We use a tool called the Average True Range (ATR) to measure market volatility. This helps us:
• Set a stop-loss (where we’ll exit the trade if the market moves against us) at a safe distance from our entry point.
• Set a take-profit (where we’ll lock in profits) at a target that’s larger than the stop-loss, ensuring a good reward-to-risk ratio.
This approach adapts to the market’s behavior, tightening stops in calmer conditions and widening them when volatility increases.
________________________________________
📈 Why This Strategy Works
✅ It combines momentum and trend-following principles, increasing the chances of trading in the right direction.
✅ It dynamically adjusts risk levels based on market volatility, keeping losses small and profits big.
✅ It’s scalable – perfect for both small accounts (like $1,000) and larger, corporate-sized portfolios.
✅ It has been deep-backtested on USD/JPY 15-minute charts, proving its consistency across different market conditions.
________________________________________
📝 Important Notes
📌 This strategy is best used for USD/JPY on a 15-minute chart, making it great for high-frequency trading while you continue to build and refine your trading system.
📌 It’s designed to work on both small ($1,000+) and large accounts, so it can grow with you as your capital increases.
📌 While it has passed deep backtesting on this pair and timeframe, remember that no strategy is perfect. It’s crucial to test it yourself, start with a demo account, and apply proper risk management before trading real money.
🌟 Final Thoughts
The Chaikin Momentum Scalper is a solid, adaptable trading approach combining momentum, trend direction, and volatility awareness. If you’re looking for a strategy to kick-start your trading journey—or to add to your existing system—it offers a strong foundation.
VWAP Strategy (RR 1:1, SL 5p min, BE at +3p, 15m 60 EMA Trend)This strategy enters a high-probability scalp trade when price interacts with the VWAP and confirms a reversal with a candlestick engulfing pattern.
Grid Tendence V1The “Grid Tendence V1” strategy is based on the classic Grid strategy, only in this case the entries and exits are made in favor of the trend, which allows to take advantage of large movements to maximize profits, since it is also possible to enter and exit with the balance with a controlled risk, because precisely the distance between each Grid works as a natural and adaptable stop loss and take profit. This fact helps to avoid overlapping entries and exits that would result from using stop loss and take profit as limit orders.
In this version of the script the entries and exits are always at market, and based on the percentage change of the price, not on the profit or loss of the current position.
The user will notice that the strategy setup is based on a controlled risk, risking 5% on each trade, a fairly standard commission and a modest initial capital, all this in order to protect the user of the strategy from unexpected or unrealistic results.
However, it is always recommended to optimize the parameters so that the strategy is effective for each asset and for each time frame.
EURUSD 90% Win Rate Strategy with Risk Control//@version=5
strategy("EURUSD 90% Win Rate Strategy with Risk Control", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
emaFast = ta.ema(close, 5)
emaSlow = ta.ema(close, 20)
rsi = ta.rsi(close, 14)
// Entry Conditions
longCondition = ta.crossover(emaFast, emaSlow) and rsi < 70
shortCondition = ta.crossunder(emaFast, emaSlow) and rsi > 30
// Risk Settings
accountBalance = 5000 // starting capital
maxLossPerTrade = 250 // risk 5% per trade
stopLossPerc = 0.01 // 1% stop loss
takeProfitPerc = 0.02 // 2% take profit
// Calculate position size dynamically
riskPerUnit = close * stopLossPerc
positionSize = maxLossPerTrade / riskPerUnit
// Entry & Exit Logic
if (longCondition)
strategy.entry("Long", strategy.long, qty=positionSize)
strategy.exit("TP/SL Long", from_entry="Long", limit=close * (1 + takeProfitPerc), stop=close * (1 - stopLossPerc))
if (shortCondition)
strategy.entry("Short", strategy.short, qty=positionSize)
strategy.exit("TP/SL Short", from_entry="Short", limit=close * (1 - takeProfitPerc), stop=close * (1 + stopLossPerc))
IFTCCI Buy Sell Signal StrategyThe IFTCCI indicator developed by master Kıvanc Özbilgiç has been configured to generate buy and sell signals by defining threshold levels. The indicator oscillates between +1 and -1, with thresholds set at +0.95 and -0.95. Additionally, if the price moves in the opposite direction after a signal, a stop is triggered 10 units (0.1) later, or a re-entry is made. These values can be adjusted as desired. It works more effectively on Heikin Ashi charts.
LANZ Strategy 3.0 [Backtest]🔷 LANZ Strategy 3.0 — Asian Range Fibonacci Scalping Strategy
LANZ Strategy 3.0 is a precision-engineered backtesting tool tailored for intraday traders who rely on the Asian session range to determine directional bias. This strategy implements dynamic Fibonacci projections and strict time-window validation to simulate a clean and disciplined trading environment.
🧠 Core Components:
Asian Range Bias Definition: Direction is established between 01:15–02:15 a.m. NY time based on the candle’s close in relation to the midpoint of the Asian session range (18:00–01:15 NY).
Limit Order Execution: Only one trade is placed daily, using a limit order at the Asian range high (for sells) or low (for buys), between 01:15–08:00 a.m. NY.
Fibonacci-Based TP/SL:
Original Mode: TP = 2.25x range, SL = 0.75x range.
Optimized Mode: TP = 1.95x range, SL = 0.65x range.
No Trade After 08:00 NY: If the limit order is not executed before 08:00 a.m. NY, it is canceled.
Fallback Logic at 02:15 NY: If the market direction misaligns with the setup at 02:15 a.m., the system re-evaluates and can re-issue the order.
End-of-Day Closure: All positions are closed at 15:45 NY if still open.
📊 Backtest-Ready Design:
Entries and exits are executed using strategy.entry() and strategy.exit() functions.
Position size is fixed via capital risk allocation ($100 per trade by default).
Only one position can be active at a time, ensuring controlled risk.
📝 Notes:
This strategy is ideal for assets sensitive to the Asian/London session overlap, such as Forex pairs and indices.
Easily switch between Fibonacci versions using a single dropdown input.
Fully deterministic: all entries are based on pre-defined conditions and time constraints.
👤 Credits:
Strategy developed by rau_u_lanz using Pine Script v6. Built for traders who favor clean sessions, directional clarity, and consistent execution using time-based logic and Fibonacci projections.