Cerca negli script per "swing trading"
Swing Trading NR4/NR7 + 2BarNR/3BarNR + Inside Day + TrendSwing Trading Version: The Ultimate Momentum Setup
The Swing Trading Version of this strategy is tailored for traders looking to capture multi-day price movements in high-momentum stocks. It’s a carefully crafted approach combining classic patterns like NR4, NR7, and Inside Day with powerful trend filters to find the best opportunities for significant gains.
Price Compression: Identifies stocks in periods of consolidation using the NR4 and NR7 patterns, along with 2-Bar and 3-Bar Narrow Ranges—key indicators of potential volatility and breakout.
Trend Confirmation: The strategy ensures trades align with the broader trend by confirming that price is above the 20 EMA and that the 10 EMA is above the 20 EMA. This guarantees that you’re trading in the direction of strength.
Inside Day Filter: The Inside Day pattern is only triggered when the candlestick is within 1 ATR from the 10 EMA (or 20 EMA if below), ensuring you're not chasing a trade too far from a support level.
Clean, Powerful Signals: With a clear focus on momentum and price compression, you'll only get actionable signals backed by multiple layers of confirmation, including volatility and price structure.
This setup is perfect for traders seeking to ride out trends and capture sizeable moves, with an emphasis on simplicity and precision. Ideal for those who prefer to hold trades for multiple days while still maintaining control over their entries and exits.
Swing Trading NR4/NR7 + 2BarNR/3BarNR + Trend📜 Description:
NR4, NR7, 2-Bar NR, and 3-Bar NR Compression Scanner (Swing Trading Version)
This script spots serious price compressions (NR4, NR7, 2-Bar NR, 3-Bar NR) on the daily chart, with simple but ruthless trend confirmation.
It's leaner. It's cleaner. It's built for those who don’t like getting caught with their pants down in messy sideways markets.
The scanner conditions are:
NR4 and NR7 patterns: Today's daily range must be the narrowest compared to the last 4 or 7 days.
2-Bar and 3-Bar Narrow Ranges: The narrowest two-day or three-day ranges relative to the previous 20 sets.
Trend filter:
Closing price must be above the 20 EMA.
The 10 EMA must be above the 20 EMA.
Visuals:
Background highlights whenever a compression setup forms.
Shape markers above or below the bars to mark the opportunity.
📈 Why Use This?
Some have said swing trading is like sipping fine wine — slow, measured, deliberate.
I won’t say they’re wrong.
But there’s also the part where you grab the bottle, smash it over the head of bad setups, and only drink the good stuff.
This scanner lets you find daily compressions inside healthy trends.
The kind of coils that can explode in your favour — and not the fake-outs that empty your account while you cry into your keyboard.
🛠️ Built for Traders Who:
Trade on daily candles, not minute charts.
Want high-quality entries without second-guessing.
Understand that real breakouts come from contraction, not chaos.
Like their setups clean, focused, and simple enough to stick to under pressure.
Enhanced ShareGenius Swing TradingSwing Trading Strategy Features:
1. Point out candles where days low price matched 20 day low price (Blue Triangle with Yellow Bar)
2. Hollow Body candles depict days when days close is within the threshold of 20 day high (defaulted to 5%). An indication to start GTT buy orders.
3. Point out candles when GTT buy order was triggered (Light Green body)
Experimental:
1. Using tolerance to low price matching logic (instead of exact match)
As a result if the days low is within the tolerance, such candles will be highlighted with light blue triangle and yellow body
Compression Patterns (w/ Trend + Proximity Filter)🧠 Description:
This indicator identifies high-probability price compression patterns within trending environments — a setup prized by experienced swing and day traders alike. It combines the classic NR4, NR7, 2-Bar NR, 3-Bar NR, and Inside Day formations with a powerful trend filter and proximity logic to deliver clear, focused signals.
🔍 What's Inside:
▪️ Compression Patterns
The core of this tool lies in the logic of price compression. These patterns signal the market taking a breath — volatility contracts, volume dries up, and price coils like a spring.
When this happens in the right context, the next move is often explosive.
NR4 / NR7: Narrowest range in 4 or 7 bars — excellent for spotting the quiet before the storm.
2-Bar NR / 3-Bar NR: These identify the tightest consecutive 2 or 3-day ranges over the past 20 days — contextually rare and powerful.
Inside Day: A simple but highly effective consolidation pattern, especially when it clusters around key moving averages.
▪️ Trend Filter (EMA Stack)
You could say this is where most indicators fall apart — no context.
This one doesn’t make that mistake.
Signals only fire when the 10 EMA > 20 EMA > 50 EMA, and price is above the 20 EMA. That’s a strong, established uptrend — the only environment where breakouts are statistically favourable.
Why?
Because trend following works.
It may not give you fixed daily returns, but it’s the only strategy with theoretically infinite profit potential. You risk little, trade less, and position yourself for rare but massive moves. That’s the edge.
▪️ Proximity Filter (1 ATR to EMA)
We’ve added another layer of discipline. Signals only fire when price is:
Within 1 ATR of the 10 EMA (if price is above it), or
Within 1 ATR of the 20 EMA (if price is below the 10 EMA)
This ensures you’re not chasing. You’re waiting for tight, controlled pullbacks into dynamic support — exactly where institutions add size, not exit.
⚙️ Fully Customisable:
Toggle visibility of each pattern
Custom colours and transparency for label & background
Adjustable ATR length and multiplier
Change label text if needed (useful for translations or tweaks)
🎯 Ideal Use Case:
Swing trading off the daily chart
Day trading with VWAP/MACD filters (in alternate versions)
Supplementing price action strategies
🔚 Final Word:
This isn’t an “everything scanner.”
It’s a discerning sniper scope for traders who wait patiently for clean trends, tight consolidations, and perfect proximity — then strike.
Accurate Swing Trading System - Strategy//@version=5
strategy("Accurate Swing Trading System - Strategy", overlay=true)
// Inputs
no = input.int(3, title="Swing")
Barcolor = input.bool(true, title="Barcolor")
Bgcolor = input.bool(false, title="Bgcolor")
// Logic
res = ta.highest(high, no)
sup = ta.lowest(low, no)
avd = close > res ? 1 : close < sup ? -1 : 0
avn = ta.valuewhen(avd != 0, avd, 0)
tsl = avn == 1 ? sup : res
Buy = ta.crossover(close, tsl)
Sell = ta.crossunder(close, tsl)
// Plotting
plotshape(Buy, title="BUY", style=shape.labelup, location=location.belowbar, color=color.green, text="BUY", textcolor=color.black)
plotshape(Sell, title="SELL", style=shape.labeldown, location=location.abovebar, color=color.red, text="SELL", textcolor=color.black)
colr = close >= tsl ? color.green : close <= tsl ? color.red : na
plot(tsl, color=colr, linewidth=3, title="TSL")
barcolor(Barcolor ? colr : na)
bgcolor(Bgcolor ? colr : na)
// Alerts
alertcondition(Buy, title="Buy Signal", message="Buy")
alertcondition(Sell, title="Sell Signal", message="Sell")
// Strategy Orders
if Buy
strategy.entry("Buy", strategy.long)
if Sell
strategy.close("Buy")
Fibonacci Swing Trading BotStrategy Overview for "Fibonacci Swing Trading Bot"
Strategy Name: Fibonacci Swing Trading Bot
Version: Pine Script v5
Purpose: This strategy is designed for swing traders who want to leverage Fibonacci retracement levels and candlestick patterns to enter and exit trades on higher time frames.
Key Components:
1. Multiple Timeframe Analysis:
The strategy uses a customizable timeframe for analysis. You can choose between 4hour, daily, weekly, or monthly time frames to fit your preferred trading horizon. The high and low-price data is retrieved from the selected timeframe to identify swing points.
2. Fibonacci Retracement Levels:
The script calculates two key Fibonacci retracement levels:
0.618: A common level where price often retraces before resuming its trend.
0.786: A deeper retracement level, often used to identify stronger support/resistance areas.
These levels are dynamically plotted on the chart based on the highest high and lowest low over the last 50 bars of the selected timeframe.
3. Candlestick Based Entry Signals:
The strategy uses candlestick patterns as the only indicator for trade entries:
Bullish Candle: A green candle (close > open) that forms between the 0.618 retracement level and the swing high.
Bearish Candle: A red candle (close < open) that forms between the 0.786 retracement level and the swing low.
When these candlestick patterns align with the Fibonacci levels, the script triggers buy or sell signals.
4. Risk Management:
Stop Loss: The stop loss is set at 1% below the entry price for long trades and 1% above the entry price for short trades. This tight risk management ensures controlled losses.
Take Profit: The strategy uses a 2:1 risk-to-reward ratio. The take profit is automatically calculated based on this ratio relative to the stop loss.
5. Buy/Sell Logic:
Buy Signal: Triggered when a bullish candle forms above the 0.618 retracement level and below the swing high. The bot then places a long position.
Sell Signal: Triggered when a bearish candle forms below the 0.786 retracement level and above the swing low. The bot then places a short position.
The stop loss and take profit levels are automatically managed once the trade is placed.
Strengths of This Strategy:
Swing Trading Focus: The strategy is ideal for swing traders, targeting longer-term price moves that can take days or weeks to play out.
Simple Yet Effective Indicators: By only relying on Fibonacci retracement levels and basic candlestick patterns, the strategy avoids complexity while capitalizing on well-known support and resistance zones.
Automated Risk Management: The built-in stop loss and take profit mechanism ensures trades are protected, adhering to a strict 2:1 risk/reward ratio.
Multiple Timeframe Analysis: The script adapts to various market conditions by allowing users to switch between different timeframes (4hour, daily, weekly, monthly), giving traders flexibility.
Strategy Use Cases:
Retracement Traders: Traders who focus on entering the market at key retracement levels (0.618 and 0.786) will find this strategy especially useful.
Trend Reversal Traders: The strategy’s reliance on candlestick formations at Fibonacci levels helps traders spot potential reversals in price trends.
Risk Conscious Traders: With its 1% risk per trade and 2:1 risk/reward ratio, the strategy is ideal for traders who prioritize risk management in their trades.
Day & Swing Trading EMA Clouds with Adaptive LevelsDay & Swing Trading EMA Clouds with Adaptive Levels is a tool designed for traders who need a flexible indicator that adapts to both short-term (day trading) and long-term (swing trading) strategies. The indicator blends EMA clouds and adaptive support/resistance levels, making it suitable for analyzing trend strength and key price zones.
How It Works:
EMA Clouds for Trend Detection:
This indicator uses three EMAs (Fast, Intermediate, Slow) to create two clouds:
Fast Cloud: The area between the fast and Intermediate EMAs.
Slow Cloud: The area between the Intermediate and slow EMAs.
The cloud colors change based on trend direction:
Positive (uptrend): When the fast EMA is above the Intermediate EMA (turquoise) or the Intermediate EMA is above the slow EMA (teal).
Negative (downtrend): When the fast EMA is below the Intermediate EMA (pink) or the Intermediate EMA is below the slow EMA (magenta).
Traders can use these clouds to visually gauge market momentum and trend reversals.
Adaptive EMA Settings Based on Trading Mode:
The EMA lengths adjust automatically depending on whether you're in Day Trading or Swing Trading mode:
Day Trading Mode uses shorter periods to capture quick price movements:
Fast EMA: 5-period
Mid EMA: 13-period
Slow EMA: 21-period
Swing Trading Mode uses longer periods to capture broader trends:
Fast EMA: 12-period
Mid EMA: 26-period
Slow EMA: 50-period
This dynamic adjustment allows you to switch between trading styles seamlessly, with the EMAs reflecting the most relevant timeframes for each strategy.
Adaptive Support and Resistance Levels:
Depending on the selected trading mode, the indicator dynamically plots key levels:
Day Trading Mode: Previous day’s high, low, and midpoint, as well as 2-day levels.
Swing Trading Mode: Previous month’s high, low, and midpoint, as well as 2-month levels.
These levels act as dynamic support and resistance zones, giving traders critical areas to monitor for potential reversals or breakouts.
Buy & Sell Signals:
Visual buy/sell signals are generated when the fast EMA crosses above or below the slow EMA. These signals can help traders identify potential trend reversals.
Customization:
You can fully adjust the transparency and colors of the clouds to fit your personal preferences and trading style.
Why This Combination?
Combining EMA clouds with adaptive levels provides traders with a complete picture. The clouds highlight the underlying market momentum and trend strength, while the adaptive levels offer potential entry/exit points based on historical price action. This unique mashup allows traders to follow trends and plan trades around key support and resistance zones.
Fibonacci-Only StrategyFibonacci-Only Strategy
This script is a custom trading strategy designed for traders who leverage Fibonacci retracement levels to identify potential trade entries and exits. The strategy is versatile, allowing users to trade across multiple timeframes, with built-in options for dynamic stop loss, trailing stops, and take profit levels.
Key Features:
Custom Fibonacci Levels:
This strategy calculates three specific Fibonacci retracement levels: 19%, 82.56%, and the reverse 19% level. These levels are used to identify potential areas of support and resistance where price reversals or breaks might occur.
The Fibonacci levels are calculated based on the highest and lowest prices within a 100-bar period, making them dynamic and responsive to recent market conditions.
Dynamic Entry Conditions:
Touch Entry: The script enters long or short positions when the price touches specific Fibonacci levels and confirms the move with a bullish (for long) or bearish (for short) candle.
Break Entry (Optional): If the "Use Break Strategy" option is enabled, the script can also enter positions when the price breaks through Fibonacci levels, providing more aggressive entry opportunities.
Stop Loss Management:
The script offers flexible stop loss settings. Users can choose between a fixed percentage stop loss or an ATR-based stop loss, which adjusts based on market volatility.
The ATR (Average True Range) stop loss is multiplied by a user-defined factor, allowing for tailored risk management based on market conditions.
Trailing Stop Mechanism:
The script includes an optional trailing stop feature, which adjusts the stop loss level as the market moves in favor of the trade. This helps lock in profits while allowing the trade to run if the trend continues.
The trailing stop is calculated as a percentage of the difference between the entry price and the current market price.
Multiple Take Profit Levels:
The strategy calculates seven take profit levels, each at incremental percentages above (for long trades) or below (for short trades) the entry price. This allows for gradual profit-taking as the market moves in the trade's favor.
Each take profit level can be customized in terms of the percentage of the position to be closed, providing precise control over exit strategies.
Strategy Backtesting and Results:
Realistic Backtesting:
The script has been backtested with realistic account sizes, commission rates, and slippage settings to ensure that the results are applicable to actual trading scenarios.
The backtesting covers various timeframes and markets to ensure the strategy's robustness across different trading environments.
Default Settings:
The script is published with default settings that have been optimized for general use. These settings include a 15-minute timeframe, a 1.0% stop loss, a 2.0 ATR multiplier for stop loss, and a 1.5% trailing stop.
Users can adjust these settings to better fit their specific trading style or the market they are trading.
How It Works:
Long Entry Conditions:
The strategy enters a long position when the price touches the 19% Fibonacci level (from high to low) or the reverse 19% level (from low to high) and confirms the move with a bullish candle.
If the "Use Break Strategy" option is enabled, the script will also enter a long position when the price breaks below the 19% Fibonacci level and then moves back up, confirming the break with a bullish candle.
Short Entry Conditions:
The strategy enters a short position when the price touches the 82.56% Fibonacci level and confirms the move with a bearish candle.
If the "Use Break Strategy" option is enabled, the script will also enter a short position when the price breaks above the 82.56% Fibonacci level and then moves back down, confirming the break with a bearish candle.
Stop Loss and Take Profit Logic:
The stop loss for each trade is calculated based on the selected method (fixed percentage or ATR-based). The strategy then manages the trade by either trailing the stop or taking profit at predefined levels.
The take profit levels are set at increments of 0.5% above or below the entry price, depending on whether the position is long or short. The script gradually exits the trade as these levels are hit, securing profits while minimizing risk.
Usage:
For Fibonacci Traders:
This script is ideal for traders who rely on Fibonacci retracement levels to find potential trade entries and exits. The script automates the process, allowing traders to focus on market analysis and decision-making.
For Trend and Swing Traders:
The strategy's flexibility in handling both touch and break entries makes it suitable for trend-following and swing trading strategies. The multiple take profit levels allow traders to capture profits in trending markets while managing risk.
Important Notes:
Originality: This script uniquely combines Fibonacci retracement levels with dynamic stop loss management and multiple take profit levels. It is not just a combination of existing indicators but a thoughtful integration designed to enhance trading performance.
Disclaimer: Trading involves risk, and it is crucial to test this script in a demo account or through backtesting before applying it to live trading. Users should ensure that the settings align with their individual risk tolerance and trading strategy.
Trend identifier with signals - Swing TradingIndicator Objective
The "Trend identifier with signals - Swing Trading" indicator is designed to help traders identify market trends and provide clear visual signals for potential buy and sell points based on the interaction of price with the 20-period moving average.
How the Indicator Works
20-Period Moving Average:
The indicator calculates the 20-period simple moving average (SMA), which is a common tool for smoothing out price fluctuations and identifying the overall market direction.
The moving average is plotted on the chart, changing color according to the identified trend:
Green: Indicates an uptrend.
Red: Indicates a downtrend.
Gray: Indicates a neutral or undefined market condition.
Trend Identification on the Daily Chart:
The indicator checks the trend based on an adjustable period (default is 5 periods):
Uptrend: When the short-term moving average (5 periods) is above the long-term moving average (10 periods).
Downtrend: When the short-term moving average (5 periods) is below the long-term moving average (10 periods).
Signal for Touching the Moving Average:
When the price crosses the 20-period moving average, the candles are colored purple to indicate that there was a touch on the moving average.
This helps identify critical points where the price may reverse or continue its trend.
Trend Signal:
Green Flag: Appears below the candle when there is a touch on the moving average and the trend is up, suggesting a potential buy point.
Red Flag: Appears above the candle when there is a touch on the moving average and the trend is down, suggesting a potential sell point.
Lateral Zone Identification:
The indicator also checks if the price touched the moving average for 5 consecutive candles, indicating a possible consolidation or lateral zone.
If this occurs, a message "Possible Lateral Zone" is shown on the chart, helping the trader avoid trades in a market without a clear direction.
How the Indicator Helps Traders
Clear Trend Identification:
By changing the color of the moving average according to the trend (green for up, red for down), the indicator provides a clear visualization of market direction.
This allows traders to align their trades with the prevailing trend, increasing the probability of success.
Visual Buy and Sell Signals:
The green and red flags provide direct visual signals for potential entry and exit points, based on the interaction of price with the moving average.
This is particularly useful for novice traders who may struggle to identify these points on their own.
Risk Management and Trade Planning:
Identifying lateral zones helps traders avoid trading in trendless markets, where price movements are more unpredictable.
This improves risk management and allows traders to focus on more favorable opportunities.
[blackcat] L1 An Adaptive Moving Average For Swing TradingLevel 1
Background
Scott Cong published an article of “An Adaptive Moving Average For Swing Trading” on April 2023. I rewrite it for pine script.
Function
In "An Adaptive Moving Average For Swing Trading," author Scott Cong introduces a new adaptive moving average that is designed to be responsive, smooth, and robust. He begins with a discussion of Perry Kaufman's adaptive moving average and explains how an adaptive moving average (AMA) can adapt to different market environments. Later he explains his methods of adjusting and changing the smoothing factor, which has better response than traditional EMA and SMA. I rewrited this new kind of moving average in pine script and use yellow color for its fast line while fuchsia color for its trigger signal as a slow line. By the way, divergence detector is also added for divergence notification. You can change period or length, and signal source parameters in setting dialog.
Remarks
Feedbacks are appreciated.
[APD] Sharegenius Swing Trading StrategyThis script plots GTT Price , Target Prices , Buy Zone , Target Zone and Information Dashboard according to Sharegenius Swing Trading Strategy. SST is for Swing Trading.
👉🏻 Strategy by Mahesh Kaushik -
1️⃣ Track the 20-Day Low of the instrument.
2️⃣ Create a GTT order which is 5% above 20 DL.
3️⃣ If the share makes a new 20 DL before getting purchased, then update your GTT order to be 5% above the new 20 DL.
4️⃣ Next GTT will be started when the average price falls by 10%. (GTT will be created as 5% above the last 20 DL or Buy on 10%, 20%, 30% fall in average price.)
5️⃣ Sell target is 5% of the average price. Sell all units or Set sell target on buy price.
6️⃣ No stop loss is needed as we buy when the stock falls.
👉🏻 Note:-
Trade in fundamentally good stocks & strong stocks those are outperforming index because we do not take stop loss in this strategy.
DISCLAIMER:- This Script is for educational purposes only. Nothing in this content should be interpreted as financial advice or a recommendation to buy or sell any sort of security or investment.
RSI Swing Trading Setup (2-Period)A simple script that adjusts the RSI visibly in order to better accommodate swing trading and certain swing trading setups/strategies.
--------------------------------------------------------------------------------------------------------------------------------------------------------
Best used in conjunction with "Linear Regression Channel by LonesomeTheBlue" with 2.2σ (std.dev) and Show Fib Levels.
^Click image for a redirect to that script.
--------------------------------------------------------------------------------------------------------------------------------------------------------
In certain price action patterns:
A bearish reversal from a previously bullish move can indicate tops of a rally if the RSI moves from 0-40 to 60 (1)
A bullish reversal from a previously bearish move can indicate bottoms of a pullback if the RSI moves from 60-100 to 40 (2)
(USE THE LINEAR REGRESSION CHANNEL TO VALIDIFY THE RETRACEMENTS)
--------------------------------------------------------------------------------------------------------------------------------------------------------
(1)
--------------------------------------------------------------------------------------------------------------------------------------------------------
(2)
--------------------------------------------------------------------------------------------------------------------------------------------------------
Uptrend and Oversold Index Swing Trading System 8H--- Foreword ---
The Overbought and Oversold Index Swing Trading System or short: I11L Hypertrend primarily uses money management Strategies, EMA and SMA and my momentum Ideas for trying to produce satisfactory Alpha over a timespan of multiple years.
--- How does it Work? ---
It uses 20 different EMA's and SMA's to produce a score for each Bar.
It will credit one Point If the EMA is above the SMA.
A high score means that there is a strong Uptrend.
Spotting the strong Uptrend early is important.
The I11L Hypertrend System trys to spot the "UPTREND" by checking for a crossover of the Score(EMA) / Score(SMA).
A low score means that there is a strong Downtrend.
Its quite common to see a reversal to the mean after a Downtrend and spotting the bottom is important.
The System trys to spot the reversal, or "OVERSOLD" state by a crossunder of the Score(EMA) / Score(SMA).
--- What can i customize? ---
-> Trading Mode: You can choose between two different trading modes, Oversold and Overbought(trend) and Random Buys to check if your systems Profitfactor is actually better then market.
-> Work with the total equity: The system uses the initial capital per default for Backtesting purposes but seeing the maximum drawdown in a compounding mode might help!
-> Use a trailing SL: A TSL trys to not lose too much if the trade goes against your TP
-> Lookbackdistance for the Score: A higher Lookbackdistance results in a more lagging indicator. You have to find the balance between the confirmation of the Signal and the frontrunning.
-> Leverage: To see how your strategie and your maximum Drawdown with the total equity mode enabled would have performed.
-> Risk Capital per Trade unleveraged: How much the underlying asset can go against your position before the TSL hits, or the SL if no TSL is set.
-> TPFactor: Your risk/reward Ratio. If you risk 3% and you set the ratio to 1.2, you will have a TP at 3 * 1.2 = 3.6%
-> Select Date: Works best in the 8H Timeframe for CFD's. Good for getting a sense of what overfitting actually means and how easy one can fool themself, find the highest Profitfactor setting in the first Sector (Start - 2012) and then see if the second Sector (2012 - Now) produces Alpha over the Random Buy mode.
--- I have some questions about the System ---
Dear reader, please ask the question in the comment Section and i will do my best to assist you.
Beakdoo swing trading boxHi forks,
I'm trader Baekdoosan who trading Equity from South Korea. This Baekdoo swing trading box indicate good buying position when it crossover the box.
Here's the ideas
1. It needs to crossover 1 month highest value and higher than 5 ema and 20 ema line
2. It also needs to crossover 1 month volume as well
3. Once 1,2 soaring candle emerge, it needs to correction time
4. 5 ema or 20 ema or center candle's 2/3 point x 0.95 (5% lower) would be the resistant line
5. center candle's 2/3 point line would be the buying point (you may can trade when it cross over
you can check above example chart and take a look what you have interested in.
hope this will help your trading on equity as well as crypto. I didn't try it on futures . Best of luck all of you. Gazua~!
PROSTRATS Pine Script for Swing TradingThis is a simple script for swing trading. It uses my 2 favorite indicators; the Choppiness Index as well as Fibonacci Retracement. This script is meant to run on the 4 hour time frame, in my case I use BTCUSD. It will buy when 2 conditions are met. The first is that the Choppiness Index is above 54.5 on the Daily Time frame, which means the price has potential to swing high or low. I used the security() function to ensure this takes place on the daily time frame because larger time frames tend to dominate smaller time frames in terms of overall swings. The second condition is that the price has to cross above the 1 level of the Fibonacci Retracement. This ensures that the swing is going to be an upwards swing, as opposed to a downwards one. The measure I took to ensure that the Fibonacci Retracement level of 1 is above the 0 level is to make sure that the r value of the 1 level is greater than the r value of the 0 level.
The sell condition is programmed to execute when either the price crosses above the 1.618 level(profit target) or cross below the 0 level(stop loss).
[blackcat] L2 Swing Trading IndicatorLevel: 2
Background
Swing trading is a type of trading aimed at making short to medium term profits from a trading pair over a period of a few days to several weeks. Swing traders mainly use technical analysis to look for trading opportunities. In addition to analyzing price trends and patterns, these traders can also use fundamental analysis.
Function
L2 Swing Trading Indicator
Key Signal
trend --> trend line with color candles standing for trend strength
pump --> whale pump indicator
top --> top zone for selling point
bbuy --> botton zone for buying point
varr1 ---> for selling points
bullbear --> use 50 as bull bear boundary
Pros and Cons
Pros:
1. Clear to see the trend reversals with strength changes
2. Whale pump indicator confirm the validity of trend reversals
Cons:
1. oversold zone is hidden due to using zero line as bottom
Remarks
NA
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
Philakone 5EMA Swing Trading Strategy [Buy&Sell Signals]Fork of the "Philakone 55 EMA Swing Trading Strategy" made by lvynnil
-Added 200EMA
-Changed shape of the arrows and added text of Buy & Sell
All credits go to lvynnil
For more informations about the original script go to:
Mean-Reversion Swing Trading Strategy v1A port of the TradeStation EasyLanguage code for a mean-revision strategy described at
traders.com
"In “Mean-Reversion Swing Trading,” which appeared in the December 2016 issue of STOCKS & COMMODITIES, author Ken Calhoun
describes a trading methodology where the trader attempts to enter an existing trend after there has been a pullback.
He suggests looking for 50% pullbacks in strong trends and waiting for price to move back in the direction of the trend
before entering the trade."
See Also:
- 9 Mistakes Quants Make that Cause Backtests to Lie (blog.quantopian.com)
- When Backtests Meet Reality (financial-hacker.com)
- Why MT4 backtesting does not work (www.stevehopwoodforex.com)
Scalping Swing Trading Tool R1-4 by JustUncleLDescription:
This study project is a "Scalping Swing trading Tool" and is an alternative to the "Scalping Pullback Tool R1". It is designed for a two pane TradingView chart layout :
the first pane set to 15min Time Frame;
the second pane set to 1min Time Frame(TF).
The tools incorporates the majority of the indicators needed to analyse and scalp Trends for Swings, PullBacks and reversals on 15min charts and 1min charts.
Incorporated within this tool are the following indicators:
1. The following EMAs are drawn automatically:
Green = EMA89 (15min TF) = EMA75 (1min TF)
Blue = EMA200 (15min TF) = EMA180 (1min TF)
Black = EMA633 (15min TF) = EMA540 (1min TF)
2. The 10EMA (default) High/Low+Close Price Action Channel (PAC), the PAC channel
display is disabled by default.
3. Optionally display Fractals and optional Fractal levels
4. Optional HH, LH, LL, HL finder.
5. Coloured coded Bar high lighting based on the PAC:
blue = bar closed above PAC
red = bar closed below PAC
gray = bar closed inside PAC
lime Line = EMA10 of bar close
6. Pivot points (disables Fractals automatically when selected) with optional labels.
7. EMA5-12 Channel is displayed by default.
8. EMA12-36 Ribbon is displayed by default
9. Optionally display EMA36 and PAC instead of EMA12-36 Ribbon.
Set up and hints:
I am unable to provide a full description here, as Pullback Trading incorporates a full trading Methodology, there are a number of articles and books written on the subject.
Set to two pane TradingView chart, set first pane to 15Min and second to 1min.
Set the chart to Heikin Ashi Candles (optional).
I also add a "Sweetspot Gold2" indicator to the chart as well to help with support and resistance finding and shows where the important "00" lines are.
Use the EMA200 on the 15min pane as the anchor. So when prices above EMA200 we only trade long (buy) and when prices below the EMA200 we only trade short (sell).
On the 15min chart draw any obvious Vertical Trend Lines (VTL), use Pivots point as a guide.
On the 15min chart what we’re looking for price to Pullback into the EMA5-12 Channel or EMA12-36 ribbon, we draw Trendlines uitilising the Pivot points or Fractals to guide your TL drawing.
On the 15min chart look for the trend to resume and break through the drawn TL. The bar color needs to change back to the trend direction colour to confirm as a break.
Now this break can be traded as a 15min trade or now look to the 1min chart.
On the 1min chart draw any Pullback into any of the EMAs.
On the 1min chart look for the trend to resume and break through the drawn TL. The bar color needs to change back to the trend direction colour to confirm as a break.
Now this break can be traded as a 1min trade.
There is also an option to select Pristine (ie Ideal) filtered Fractals, which look like tents or V shape 5-candle patterns. These are actually used to calculate the Pivot points as well.
Other than the "SweetSpot Gold2" indicator, you should not need any other indicator to successfully trade trends for Pullbacks and reversals. If you really want another indicator use the AO (Awesome Oscillator) as it is momentum based.
[blackcat] L3 Swing Trading ZonesLevel 3
Background
For swing trading, I consider a combination of multiple technical indicators to indicate periods of long and short positions.
Function
First, judge the daily-level long and short recommendations by the J value of the KDJ indicator in the weekly cycle. in addition. Second, draw bull-bear lines by integrating existing technical indicators such as rsi, adx, cci, dmi, etc. The bull line is above 0, the bear line is below 0, and the other is offsetting each other. When both are relatively close to the zero axis, it means that the strength is equal, and there will be signs of sideways.
Remarks
"D" timeframe ONLY.
Feedbacks are appreciated.
55 EMA Swing TradingA simple Buy and sell strategy using 55 EMA - " 55 EMA Swing Trading"
The source code is publicly available to for further modification.