Dynamic Support Resistance Strategy @tradingbauhausDynamic Support Resistance Strategy @tradingbauhaus
This script is designed to identify dynamic support and resistance levels on a trading chart based on pivots (highs and lows) detected over a specific period. It also includes a basic strategy logic to generate entry signals when the price breaks these support or resistance levels. Below is a step-by-step explanation of how it works:
How the Script Works:
Pivot Detection:
The script identifies pivots (highs and lows) using the pivothigh and pivotlow functions.
The period for detecting pivots is configurable (Pivot Period).
The source for pivots can be either High/Low (highs and lows) or Close/Open (close and open), depending on user selection.
Creation of Support and Resistance Channels:
The detected pivots are used to create dynamic support and resistance channels.
The maximum channel width is defined as a percentage (Maximum Channel Width %) of the price range over a 300-bar period.
Only channels containing a minimum number of pivots (Minimum Strength) are considered valid.
Visualization of Channels:
Support and resistance channels are plotted on the chart as shaded areas.
Channel colors are customizable:
Resistance: Red.
Support: Blue.
Channel (price inside): Gray.
Optionally, the detected pivots can be displayed on the chart.
Breakout Detection:
The script checks if the price breaks a support or resistance level.
If the price breaks a resistance level, a buy signal is generated.
If the price breaks a support level, a sell signal is generated.
Breakouts are visually marked with triangles (optional) and trigger alerts.
Moving Averages (Optional):
The script allows displaying two moving averages (SMA or EMA) with configurable periods.
These moving averages can be used as additional reference tools for analysis.
Strategy Logic:
When the price breaks a resistance level, the script enters a long position.
When the price breaks a support level, the script enters a short position.
Script Workflow:
Pivot Identification:
The script searches for highs and lows on the chart based on the configurable period.
These pivots are stored in arrays for later use.
Channel Creation:
For each pivot, the script calculates a support/resistance channel, ensuring it meets the maximum width and minimum pivot requirements.
Valid channels are stored and sorted by "strength" (number of included pivots).
Visualization:
Channels are plotted on the chart as shaded areas using the configured colors.
If enabled, pivots are marked on the chart with labels.
Breakout Detection:
The script checks if the price has broken a support or resistance level on the current bar.
If a breakout is detected, a signal is generated and optionally marked on the chart.
Strategy:
If the price breaks a resistance level, a buy signal is triggered.
If the price breaks a support level, a sell signal is triggered.
User Configuration:
The script allows customization of several parameters to adapt it to different trading styles and assets:
Pivot Period: Period for detecting pivots.
Source: Source for pivots (High/Low or Close/Open).
Maximum Channel Width %: Maximum channel width as a percentage of the price range.
Minimum Strength: Minimum number of pivots required to form a channel.
Maximum Number of S/R: Maximum number of channels to display.
Loopback Period: Lookback period for detecting pivots.
Colors: Customization of colors for resistance, support, and channel.
Extras: Options to display pivots, breakouts, and moving averages.
Example Use Case:
Chart Analysis:
On a daily chart, the script identifies key support and resistance levels based on pivots from the last 10 candles.
Channels are plotted as shaded areas, providing a clear visualization of key zones.
Breakout Trading:
If the price breaks a resistance level, the script generates a buy signal.
If the price breaks a support level, the script generates a sell signal.
Moving Averages:
If moving averages are enabled, they can be used as additional confirmation for signals.
Conclusion:
This script is a powerful tool for traders looking to identify dynamic support and resistance levels and capitalize on breakouts as trading signals. Its flexibility and customization make it suitable for a variety of assets and timeframes.
빌 윌리엄스 인디케이터
5분봉 자동매매 전략 (최적화: 안정화)//@version=5
strategy("5분봉 자동매매 전략 (최적화: 안정화)", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
// === PARAMETERS ===
// RSI
rsiPeriod = input.int(14, title="RSI Period", minval=1)
overbought = input.float(70.0, title="RSI Overbought Level", step=0.1)
oversold = input.float(30.0, title="RSI Oversold Level", step=0.1)
// 이동평균선
smaShort = input.int(50, title="Short SMA Length", minval=1)
smaLong = input.int(200, title="Long SMA Length", minval=1)
// 거래량 필터
volumeThreshold = input.float(1.2, title="Volume Multiplier", step=0.1)
// 리스크 관리
takeProfit = input.float(3.0, title="Take Profit %", step=0.1)
stopLoss = input.float(1.0, title="Stop Loss %", step=0.1)
trailOffset = input.float(0.5, title="Trailing Stop Offset (Points)", step=0.1)
// === INDICATORS ===
rsiValue = ta.rsi(close, rsiPeriod)
smaShortValue = ta.sma(close, smaShort)
smaLongValue = ta.sma(close, smaLong)
= ta.macd(close, 12, 26, 9)
= ta.bb(close, 20, 2)
avgVolume = ta.sma(volume, 20)
// 상위 시간대 RSI 필터
higherRSI = request.security(syminfo.tickerid, "15", ta.rsi(close, rsiPeriod), lookahead=barmerge.lookahead_on)
// === LONG ENTRY CONDITION ===
longCondition = (rsiValue < oversold) and
(smaShortValue > smaLongValue) and
(macdLine > signalLine) and
(close <= lowerBB) and
(volume > avgVolume * volumeThreshold) and
(higherRSI < 50)
// === SHORT ENTRY CONDITION ===
shortCondition = (rsiValue > overbought) and
(smaShortValue < smaLongValue) and
(macdLine < signalLine) and
(close >= upperBB) and
(volume > avgVolume * volumeThreshold) and
(higherRSI > 50)
// === POSITIONS ===
if (longCondition and strategy.position_size == 0)
strategy.entry("Long", strategy.long)
strategy.exit("Long Exit", stop=strategy.position_avg_price * (1 - stopLoss / 100), limit=strategy.position_avg_price * (1 + takeProfit / 100), trail_points=trailOffset)
if (shortCondition and strategy.position_size == 0)
strategy.entry("Short", strategy.short)
strategy.exit("Short Exit", stop=strategy.position_avg_price * (1 + stopLoss / 100), limit=strategy.position_avg_price * (1 - takeProfit / 100), trail_points=trailOffset)
// === 손절 신호 표시 ===
var bool stopLongShown = false
var bool stopShortShown = false
if (strategy.position_size > 0 and close <= strategy.position_avg_price * (1 - stopLoss / 100) and not stopLongShown)
label.new(bar_index, close, text="STOP_LONG", color=color.red, style=label.style_label_down, textcolor=color.white)
stopLongShown := true
if (strategy.position_size < 0 and close >= strategy.position_avg_price * (1 + stopLoss / 100) and not stopShortShown)
label.new(bar_index, close, text="STOP_SHORT", color=color.red, style=label.style_label_up, textcolor=color.white)
stopShortShown := true
if (strategy.position_size == 0)
stopLongShown := false
stopShortShown := false
// === VISUAL INDICATORS ===
plot(smaShortValue, title="SMA 50", color=color.blue)
plot(smaLongValue, title="SMA 200", color=color.red)
plot(upperBB, title="Upper BB", color=color.green)
plot(lowerBB, title="Lower BB", color=color.red)
plot(rsiValue, title="RSI", color=color.purple)
plot(longCondition ? close : na, title="Long Signal", style=plot.style_cross, color=color.green, linewidth=2)
plot(shortCondition ? close : na, title="Short Signal", style=plot.style_cross, color=color.red, linewidth=2)
5분봉 자동매매 전략 (최적화: 안정화)//@version=5
strategy("5분봉 자동매매 전략 (최적화: 안정화)", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
// === PARAMETERS ===
// RSI
rsiPeriod = input.int(14, title="RSI Period", minval=1)
overbought = input.float(70.0, title="RSI Overbought Level", step=0.1)
oversold = input.float(30.0, title="RSI Oversold Level", step=0.1)
// 이동평균선
smaShort = input.int(50, title="Short SMA Length", minval=1)
smaLong = input.int(200, title="Long SMA Length", minval=1)
// 거래량 필터
volumeThreshold = input.float(1.2, title="Volume Multiplier", step=0.1)
// 리스크 관리
takeProfit = input.float(3.0, title="Take Profit %", step=0.1)
stopLoss = input.float(1.0, title="Stop Loss %", step=0.1)
trailOffset = input.float(0.5, title="Trailing Stop Offset (Points)", step=0.1)
// === INDICATORS ===
rsiValue = ta.rsi(close, rsiPeriod)
smaShortValue = ta.sma(close, smaShort)
smaLongValue = ta.sma(close, smaLong)
= ta.macd(close, 12, 26, 9)
= ta.bb(close, 20, 2)
avgVolume = ta.sma(volume, 20)
// 상위 시간대 RSI 필터
higherRSI = request.security(syminfo.tickerid, "15", ta.rsi(close, rsiPeriod), lookahead=barmerge.lookahead_on)
// === LONG ENTRY CONDITION ===
longCondition = (rsiValue < oversold) and
(smaShortValue > smaLongValue) and
(macdLine > signalLine) and
(close <= lowerBB) and
(volume > avgVolume * volumeThreshold) and
(higherRSI < 50)
// === SHORT ENTRY CONDITION ===
shortCondition = (rsiValue > overbought) and
(smaShortValue < smaLongValue) and
(macdLine < signalLine) and
(close >= upperBB) and
(volume > avgVolume * volumeThreshold) and
(higherRSI > 50)
// === POSITIONS ===
if (longCondition and strategy.position_size == 0)
strategy.entry("Long", strategy.long)
strategy.exit("Long Exit", stop=strategy.position_avg_price * (1 - stopLoss / 100), limit=strategy.position_avg_price * (1 + takeProfit / 100), trail_points=trailOffset)
if (shortCondition and strategy.position_size == 0)
strategy.entry("Short", strategy.short)
strategy.exit("Short Exit", stop=strategy.position_avg_price * (1 + stopLoss / 100), limit=strategy.position_avg_price * (1 - takeProfit / 100), trail_points=trailOffset)
// === 손절 신호 표시 ===
var bool stopLongShown = false
var bool stopShortShown = false
if (strategy.position_size > 0 and close <= strategy.position_avg_price * (1 - stopLoss / 100) and not stopLongShown)
label.new(bar_index, close, text="STOP_LONG", color=color.red, style=label.style_label_down, textcolor=color.white)
stopLongShown := true
if (strategy.position_size < 0 and close >= strategy.position_avg_price * (1 + stopLoss / 100) and not stopShortShown)
label.new(bar_index, close, text="STOP_SHORT", color=color.red, style=label.style_label_up, textcolor=color.white)
stopShortShown := true
if (strategy.position_size == 0)
stopLongShown := false
stopShortShown := false
// === VISUAL INDICATORS ===
plot(smaShortValue, title="SMA 50", color=color.blue)
plot(smaLongValue, title="SMA 200", color=color.red)
plot(upperBB, title="Upper BB", color=color.green)
plot(lowerBB, title="Lower BB", color=color.red)
plot(rsiValue, title="RSI", color=color.purple)
plot(longCondition ? close : na, title="Long Signal", style=plot.style_cross, color=color.green, linewidth=2)
plot(shortCondition ? close : na, title="Short Signal", style=plot.style_cross, color=color.red, linewidth=2)
5분봉 자동매매 전략 (최적화: 안정화)//@version=5
strategy("5분봉 자동매매 전략 (최적화: 안정화)", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
// === PARAMETERS ===
// RSI
rsiPeriod = input.int(14, title="RSI Period", minval=1)
overbought = input.float(70.0, title="RSI Overbought Level", step=0.1)
oversold = input.float(30.0, title="RSI Oversold Level", step=0.1)
// 이동평균선
smaShort = input.int(50, title="Short SMA Length", minval=1)
smaLong = input.int(200, title="Long SMA Length", minval=1)
// 거래량 필터
volumeThreshold = input.float(1.2, title="Volume Multiplier", step=0.1)
// 리스크 관리
takeProfit = input.float(3.0, title="Take Profit %", step=0.1)
stopLoss = input.float(1.0, title="Stop Loss %", step=0.1)
trailOffset = input.float(0.5, title="Trailing Stop Offset (Points)", step=0.1)
// === INDICATORS ===
rsiValue = ta.rsi(close, rsiPeriod)
smaShortValue = ta.sma(close, smaShort)
smaLongValue = ta.sma(close, smaLong)
= ta.macd(close, 12, 26, 9)
= ta.bb(close, 20, 2)
avgVolume = ta.sma(volume, 20)
// 상위 시간대 RSI 필터
higherRSI = request.security(syminfo.tickerid, "15", ta.rsi(close, rsiPeriod), lookahead=barmerge.lookahead_on)
// === LONG ENTRY CONDITION ===
longCondition = (rsiValue < oversold) and
(smaShortValue > smaLongValue) and
(macdLine > signalLine) and
(close <= lowerBB) and
(volume > avgVolume * volumeThreshold) and
(higherRSI < 50)
// === SHORT ENTRY CONDITION ===
shortCondition = (rsiValue > overbought) and
(smaShortValue < smaLongValue) and
(macdLine < signalLine) and
(close >= upperBB) and
(volume > avgVolume * volumeThreshold) and
(higherRSI > 50)
// === POSITIONS ===
if (longCondition and strategy.position_size == 0)
strategy.entry("Long", strategy.long)
strategy.exit("Long Exit", stop=strategy.position_avg_price * (1 - stopLoss / 100), limit=strategy.position_avg_price * (1 + takeProfit / 100), trail_points=trailOffset)
if (shortCondition and strategy.position_size == 0)
strategy.entry("Short", strategy.short)
strategy.exit("Short Exit", stop=strategy.position_avg_price * (1 + stopLoss / 100), limit=strategy.position_avg_price * (1 - takeProfit / 100), trail_points=trailOffset)
// === 손절 신호 표시 ===
var bool stopLongShown = false
var bool stopShortShown = false
if (strategy.position_size > 0 and close <= strategy.position_avg_price * (1 - stopLoss / 100) and not stopLongShown)
label.new(bar_index, close, text="STOP_LONG", color=color.red, style=label.style_label_down, textcolor=color.white)
stopLongShown := true
if (strategy.position_size < 0 and close >= strategy.position_avg_price * (1 + stopLoss / 100) and not stopShortShown)
label.new(bar_index, close, text="STOP_SHORT", color=color.red, style=label.style_label_up, textcolor=color.white)
stopShortShown := true
if (strategy.position_size == 0)
stopLongShown := false
stopShortShown := false
// === VISUAL INDICATORS ===
plot(smaShortValue, title="SMA 50", color=color.blue)
plot(smaLongValue, title="SMA 200", color=color.red)
plot(upperBB, title="Upper BB", color=color.green)
plot(lowerBB, title="Lower BB", color=color.red)
plot(rsiValue, title="RSI", color=color.purple)
plot(longCondition ? close : na, title="Long Signal", style=plot.style_cross, color=color.green, linewidth=2)
plot(shortCondition ? close : na, title="Short Signal", style=plot.style_cross, color=color.red, linewidth=2)
Fair Value Breakout Strategy by @tradingbauhausThe **Breakaway Fair Value Gaps (BFVG) Strategy** is a trading approach designed to identify and capitalize on significant price gaps that occur within the context of a strong trend. These gaps, known as Fair Value Gaps (FVGs), represent areas where the price moves sharply, leaving behind an imbalance between supply and demand. When these gaps occur during a breakout or a strong trend continuation, they are referred to as **Breakaway Fair Value Gaps (BFVGs)**. This strategy uses these gaps as key levels for entering trades and managing risk.
---
### **Key Concepts**
1. **Fair Value Gap (FVG)**:
- A FVG occurs when the price moves sharply, leaving a gap between the high/low of previous candles and the current candle.
- It represents an imbalance in the market where buyers or sellers are overwhelmingly dominant.
2. **Breakaway Fair Value Gap (BFVG)**:
- A BFVG is a FVG that occurs during a strong trend or breakout, signaling potential continuation of the trend.
- It acts as a key level for entering trades in the direction of the trend.
3. **Mitigation Levels**:
- These are price levels where the market might retrace to "fill the gap" before continuing in the direction of the trend.
- The strategy monitors these levels to determine if the gap is still valid or if it has been mitigated.
---
### **Strategy Rules**
#### **Entry Conditions**
1. **Bullish BFVG**:
- A bullish BFVG occurs when:
- The current low is higher than the high of two candles ago (`low > high `).
- The close of the previous candle is higher than the high of two candles ago (`close > high `).
- **Entry**: Go long (buy) when a bullish BFVG is detected and the price has not yet mitigated the gap.
2. **Bearish BFVG**:
- A bearish BFVG occurs when:
- The current high is lower than the low of two candles ago (`high < low `).
- The close of the previous candle is lower than the low of two candles ago (`close < low `).
- **Entry**: Go short (sell) when a bearish BFVG is detected and the price has not yet mitigated the gap.
#### **Exit Conditions**
1. **Stop Loss**:
- The stop loss is placed at a fixed percentage below the entry price for long trades (`stop = close * (1 - stopLossPerc / 100)`).
- For short trades, the stop loss is placed at a fixed percentage above the entry price (`stop = close * (1 + stopLossPerc / 100)`).
2. **Take Profit**:
- The take profit is placed at a fixed percentage above the entry price for long trades (`limit = close * (1 + takeProfitPerc / 100)`).
- For short trades, the take profit is placed at a fixed percentage below the entry price (`limit = close * (1 - takeProfitPerc / 100)`).
#### **Mitigation Levels**
- If the price retraces and closes within the gap (mitigates the FVG), the gap is considered invalid, and the strategy stops monitoring it.
---
### **Visualization**
- **BFVG Boxes**:
- Bullish BFVGs are highlighted with a green box.
- Bearish BFVGs are highlighted with a red box.
- **Mitigation Lines**:
- Horizontal lines are drawn at the high/low of the gap to indicate the mitigation levels.
---
### **Dashboard**
The strategy includes a dashboard that displays key statistics:
1. **Total BFVGs Detected**:
- The number of bullish and bearish BFVGs identified.
2. **Mitigation Percentage**:
- The percentage of BFVGs that have been mitigated.
3. **Average/Median Duration**:
- The average or median number of candles it takes for a BFVG to be mitigated.
---
### **How It Works**
1. **Trend Identification**:
- The strategy uses a moving window of `length` candles to determine the current trend (highs and lows).
2. **Gap Detection**:
- It scans for FVGs that meet the criteria for BFVGs (strong trend context).
3. **Trade Execution**:
- Enters trades in the direction of the BFVG and manages risk using stop loss and take profit levels.
4. **Mitigation Monitoring**:
- Tracks whether the price retraces to fill the gap, invalidating the BFVG.
---
### **Advantages**
1. **Trend-Following**:
- The strategy capitalizes on strong trends, which often lead to significant price movements.
2. **Clear Entry and Exit Levels**:
- BFVGs provide well-defined levels for entering trades and managing risk.
3. **Flexibility**:
- Parameters like `length`, `stopLossPerc`, and `takeProfitPerc` can be adjusted to suit different trading styles.
---
### **Example**
- **Bullish BFVG**:
- The price is in an uptrend. A bullish BFVG is detected, and a long trade is entered.
- The stop loss is placed 1% below the entry price, and the take profit is placed 2% above.
- **Bearish BFVG**:
- The price is in a downtrend. A bearish BFVG is detected, and a short trade is entered.
- The stop loss is placed 1% above the entry price, and the take profit is placed 2% below.
---
### **Conclusion**
The **Breakaway Fair Value Gaps Strategy** is a systematic approach to trading strong trends by identifying and exploiting price gaps. It combines clear entry signals with robust risk management, making it suitable for traders who prefer trend-following strategies. By monitoring mitigation levels and using a dashboard for performance tracking, the strategy provides a comprehensive framework for trading BFVGs.
鳄鱼线 + MA 趋势捕捉器 1. 策略介绍
该策略是基于 Alligator 指标 和 移动平均线 (MA) 的组合,旨在捕捉趋势市场中的买卖机会。它结合了比尔·威廉姆斯的 Alligator 指标(三条平滑移动平均线:Jaw、Teeth、Lips)与指数移动平均线 (EMA),以此来识别趋势并决定入场点和出场点。
Alligator 指标通过三条不同周期的移动平均线代表市场的不同状态:
Jaw(下颌线):反映市场的长期趋势。
Teeth(牙齿线):反映市场的中期趋势。
Lips(嘴唇线):反映市场的短期趋势。
趋势线(Trendline) 使用200周期的指数移动平均线 (EMA),用于识别整体市场方向,帮助确认是否应当采取多头或空头仓位。
2. 执行原理
该策略会判断以下条件来做出交易决策:
做多(Long)条件:
当前价格(收盘价)高于200周期的 EMA 线(表示上升趋势)。
Alligator 的 Lips(嘴唇线)高于 Teeth(牙齿线),Teeth 高于 Jaw(下颌线),表明市场处于上升趋势的多头结构。
策略允许开多头单并且当前没有开仓。
平多单条件:当价格低于趋势线,且 Alligator 的嘴唇线位于牙齿线和下颌线下方,表明市场进入下行趋势,平掉多头单。
做空(Short)条件:
当前价格低于200周期的 EMA 线(表示下降趋势)。
Alligator 的 Lips(嘴唇线)低于 Teeth(牙齿线),Teeth 低于 Jaw(下颌线),表明市场处于下降趋势的空头结构。
策略允许开空头单并且当前没有开仓。
平空单条件:当价格重新高于趋势线,且 Alligator 的嘴唇线回到牙齿线上方,表明市场进入上升趋势,平掉空头单。
3. 重绘风险
Alligator 和 EMA 都是基于历史价格的移动平均线,因此没有明显的重绘风险。重绘一般发生在基于未来数据的指标上,而这个策略并没有使用未来数据,除非用户手动进行历史回测时有不当操作。
4. 优缺点分析
优点:
简单清晰:结合 Alligator 指标和趋势线,很容易识别市场的趋势,特别适合趋势市场。
使用两种不同的技术指标提供了趋势确认,避免了单一指标的误判。
自动处理开仓和平仓,不需要过多的手动干预。
缺点:
对震荡行情敏感:在横盘震荡时,可能频繁发出错误信号,导致高频的进出场,增加交易成本。
滞后性:由于 Alligator 和移动平均线本质上是滞后的指标,可能错失一些短期快速的趋势机会。
5. 适合的资产和周期
适合的资产:由于策略基于趋势判断,适合高波动性的资产,如 加密货币、股票市场中的高波动性个股、期货市场。
时间周期:策略使用了相对较长的移动平均线,因此更适合 较长周期 的操作,如 4小时或日线,在短周期内可能会因为噪音导致策略表现不佳。
6. 改进方向
增加过滤条件:可以加入震荡行情的过滤器,减少在震荡市场中的假信号。
动态调整参数:针对不同的市场环境,设置不同的周期或动态调整周期以适应不同的波动性。
Debug Buy/Sell Signals with Woodies CCI FilterThe script implements a trading strategy using Bollinger Bands combined with Woodies CCI (Commodity Channel Index) as a filter.
Script này triển khai một chiến lược giao dịch sử dụng Bollinger Bands kết hợp với chỉ báo CCI (Commodity Channel Index) của Woodies làm bộ lọc
Trend Trader-Remastered StrategyOfficial Strategy for Trend Trader - Remastered
Indicator: Trend Trader-Remastered (TTR)
Overview:
The Trend Trader-Remastered is a refined and highly sophisticated implementation of the Parabolic SAR designed to create strategic buy and sell entry signals, alongside precision take profit and re-entry signals based on marked Bill Williams (BW) fractals. Built with a deep emphasis on clarity and accuracy, this indicator ensures that only relevant and meaningful signals are generated, eliminating any unnecessary entries or exits.
Please check the indicator details and updates via the link above.
Important Disclosure:
My primary objective is to provide realistic strategies and a code base for the TradingView Community. Therefore, the default settings of the strategy version of the indicator have been set to reflect realistic world trading scenarios and best practices.
Key Features:
Strategy execution date&time range.
Take Profit Reduction Rate: The percentage of progressive reduction on active position size for take profit signals.
Example:
TP Reduce: 10%
Entry Position Size: 100
TP1: 100 - 10 = 90
TP2: 90 - 9 = 81
Re-Entry When Rate: The percentage of position size on initial entry of the signal to determine re-entry.
Example:
RE When: 50%
Entry Position Size: 100
Re-Entry Condition: Active Position Size < 50
Re-Entry Fill Rate: The percentage of position size on initial entry of the signal to be completed.
Example:
RE Fill: 75%
Entry Position Size: 100
Active Position Size: 50
Re-Entry Order Size: 25
Final Active Position Size:75
Important: Even RE When condition is met, the active position size required to drop below RE Fill rate to trigger re-entry order.
Key Points:
'Process Orders on Close' is enabled as Take Profit and Re-Entry signals must be executed on candle close.
'Calculate on Every Tick' is enabled as entry signals are required to be executed within candle time.
'Initial Capital' has been set to 10,000 USD.
'Default Quantity Type' has been set to 'Percent of Equity'.
'Default Quantity' has been set to 10% as the best practice of investing 10% of the assets.
'Currency' has been set to USD.
'Commission Type' has been set to 'Commission Percent'
'Commission Value' has been set to 0.05% to reflect the most realistic results with a common taker fee value.
MultiLayer Acceleration/Deceleration Strategy [Skyrexio]Overview
MultiLayer Acceleration/Deceleration Strategy leverages the combination of Acceleration/Deceleration Indicator(AC), Williams Alligator, Williams Fractals and Exponential Moving Average (EMA) to obtain the high probability long setups. Moreover, strategy uses multi trades system, adding funds to long position if it considered that current trend has likely became stronger. Acceleration/Deceleration Indicator is used for creating signals, while Alligator and Fractal are used in conjunction as an approximation of short-term trend to filter them. At the same time EMA (default EMA's period = 100) is used as high probability long-term trend filter to open long trades only if it considers current price action as an uptrend. More information in "Methodology" and "Justification of Methodology" paragraphs. The strategy opens only long trades.
Unique Features
No fixed stop-loss and take profit: Instead of fixed stop-loss level strategy utilizes technical condition obtained by Fractals and Alligator to identify when current uptrend is likely to be over (more information in "Methodology" and "Justification of Methodology" paragraphs)
Configurable Trading Periods: Users can tailor the strategy to specific market windows, adapting to different market conditions.
Multilayer trades opening system: strategy uses only 10% of capital in every trade and open up to 5 trades at the same time if script consider current trend as strong one.
Short and long term trend trade filters: strategy uses EMA as high probability long-term trend filter and Alligator and Fractal combination as a short-term one.
Methodology
The strategy opens long trade when the following price met the conditions:
1. Price closed above EMA (by default, period = 100). Crossover is not obligatory.
2. Combination of Alligator and Williams Fractals shall consider current trend as an upward (all details in "Justification of Methodology" paragraph)
3. Acceleration/Deceleration shall create one of two types of long signals (all details in "Justification of Methodology" paragraph). Buy stop order is placed one tick above the candle's high of last created long signal.
4. If price reaches the order price, long position is opened with 10% of capital.
5. If currently we have opened position and price creates and hit the order price of another one long signal, another one long position will be added to the previous with another one 10% of capital. Strategy allows to open up to 5 long trades simultaneously.
6. If combination of Alligator and Williams Fractals shall consider current trend has been changed from up to downtrend, all long trades will be closed, no matter how many trades has been opened.
Script also has additional visuals. If second long trade has been opened simultaneously the Alligator's teeth line is plotted with the green color. Also for every trade in a row from 2 to 5 the label "Buy More" is also plotted just below the teeth line. With every next simultaneously opened trade the green color of the space between teeth and price became less transparent.
Strategy settings
In the inputs window user can setup strategy setting: EMA Length (by default = 100, period of EMA, used for long-term trend filtering EMA calculation). User can choose the optimal parameters during backtesting on certain price chart.
Justification of Methodology
Let's explore the key concepts of this strategy and understand how they work together. We'll begin with the simplest: the EMA.
The Exponential Moving Average (EMA) is a type of moving average that assigns greater weight to recent price data, making it more responsive to current market changes compared to the Simple Moving Average (SMA). This tool is widely used in technical analysis to identify trends and generate buy or sell signals. The EMA is calculated as follows:
1.Calculate the Smoothing Multiplier:
Multiplier = 2 / (n + 1), Where n is the number of periods.
2. EMA Calculation
EMA = (Current Price) × Multiplier + (Previous EMA) × (1 − Multiplier)
In this strategy, the EMA acts as a long-term trend filter. For instance, long trades are considered only when the price closes above the EMA (default: 100-period). This increases the likelihood of entering trades aligned with the prevailing trend.
Next, let’s discuss the short-term trend filter, which combines the Williams Alligator and Williams Fractals. Williams Alligator
Developed by Bill Williams, the Alligator is a technical indicator that identifies trends and potential market reversals. It consists of three smoothed moving averages:
Jaw (Blue Line): The slowest of the three, based on a 13-period smoothed moving average shifted 8 bars ahead.
Teeth (Red Line): The medium-speed line, derived from an 8-period smoothed moving average shifted 5 bars forward.
Lips (Green Line): The fastest line, calculated using a 5-period smoothed moving average shifted 3 bars forward.
When the lines diverge and align in order, the "Alligator" is "awake," signaling a strong trend. When the lines overlap or intertwine, the "Alligator" is "asleep," indicating a range-bound or sideways market. This indicator helps traders determine when to enter or avoid trades.
Fractals, another tool by Bill Williams, help identify potential reversal points on a price chart. A fractal forms over at least five consecutive bars, with the middle bar showing either:
Up Fractal: Occurs when the middle bar has a higher high than the two preceding and two following bars, suggesting a potential downward reversal.
Down Fractal: Happens when the middle bar shows a lower low than the surrounding two bars, hinting at a possible upward reversal.
Traders often use fractals alongside other indicators to confirm trends or reversals, enhancing decision-making accuracy.
How do these tools work together in this strategy? Let’s consider an example of an uptrend.
When the price breaks above an up fractal, it signals a potential bullish trend. This occurs because the up fractal represents a shift in market behavior, where a temporary high was formed due to selling pressure. If the price revisits this level and breaks through, it suggests the market sentiment has turned bullish.
The breakout must occur above the Alligator’s teeth line to confirm the trend. A breakout below the teeth is considered invalid, and the downtrend might still persist. Conversely, in a downtrend, the same logic applies with down fractals.
In this strategy if the most recent up fractal breakout occurs above the Alligator's teeth and follows the last down fractal breakout below the teeth, the algorithm identifies an uptrend. Long trades can be opened during this phase if a signal aligns. If the price breaks a down fractal below the teeth line during an uptrend, the strategy assumes the uptrend has ended and closes all open long trades.
By combining the EMA as a long-term trend filter with the Alligator and fractals as short-term filters, this approach increases the likelihood of opening profitable trades while staying aligned with market dynamics.
Now let's talk about Acceleration/Deceleration signals. AC indicator is calculated using the Awesome Oscillator, so let's first of all briefly explain what is Awesome Oscillator and how it can be calculated. The Awesome Oscillator (AO), developed by Bill Williams, is a momentum indicator designed to measure market momentum by contrasting recent price movements with a longer-term historical perspective. It helps traders detect potential trend reversals and assess the strength of ongoing trends.
The formula for AO is as follows:
AO = SMA5(Median Price) − SMA34(Median Price)
where:
Median Price = (High + Low) / 2
SMA5 = 5-period Simple Moving Average of the Median Price
SMA 34 = 34-period Simple Moving Average of the Median Price
The Acceleration/Deceleration (AC) Indicator, introduced by Bill Williams, measures the rate of change in market momentum. It highlights shifts in the driving force of price movements and helps traders spot early signs of trend changes. The AC Indicator is particularly useful for identifying whether the current momentum is accelerating or decelerating, which can indicate potential reversals or continuations. For AC calculation we shall use the AO calculated above is the following formula:
AC = AO − SMA5(AO), where SMA5(AO)is the 5-period Simple Moving Average of the Awesome Oscillator
When the AC is above the zero line and rising, it suggests accelerating upward momentum.
When the AC is below the zero line and falling, it indicates accelerating downward momentum.
When the AC is below zero line and rising it suggests the decelerating the downtrend momentum. When AC is above the zero line and falling, it suggests the decelerating the uptrend momentum.
Now we can explain which AC signal types are used in this strategy. The first type of long signal is when AC value is below zero line. In this cases we need to see three rising bars on the histogram in a row after the falling one. The second type of signals occurs above the zero line. There we need only two rising AC bars in a row after the falling one to create the signal. The signal bar is the last green bar in this sequence. The strategy places the buy stop order one tick above the candle's high, which corresponds to the signal bar on AC indicator.
After that we can have the following scenarios:
Price hit the order on the next candle in this case strategy opened long with this price.
Price doesn't hit the order price, the next candle set lower high. If current AC bar is increasing buy stop order changes by the script to the high of this new bar plus one tick. This procedure repeats until price finally hit buy order or current AC bar become decreasing. In the second case buy order cancelled and strategy wait for the next AC signal.
If long trades are initiated, the strategy continues utilizing subsequent signals until the total number of trades reaches a maximum of 5. All open trades are closed when the trend shifts to a downtrend, as determined by the combination of the Alligator and Fractals described earlier.
Why we use AC signals? If currently strategy algorithm considers the high probability of the short-term uptrend with the Alligator and Fractals combination pointed out above and the long-term trend is also suggested by the EMA filter as bullish. Rising AC bars after period of falling AC bars indicates the high probability of local pull back end and there is a high chance to open long trade in the direction of the most likely main uptrend. The numbers of rising bars are different for the different AC values (below or above zero line). This is needed because if AC below zero line the local downtrend is likely to be stronger and needs more rising bars to confirm that it has been changed than if AC is above zero.
Why strategy use only 10% per signal? Sometimes we can see the false signals which appears on sideways. Not risking that much script use only 10% per signal. If the first long trade has been open and price continue going up and our trend approximation by Alligator and Fractals is uptrend, strategy add another one 10% of capital to every next AC signal while number of active trades no more than 5. This capital allocation allows to take part in long trades when current uptrend is likely to be strong and use only 10% of capital when there is a high probability of sideways.
Backtest Results
Operating window: Date range of backtests is 2023.01.01 - 2024.11.01. It is chosen to let the strategy to close all opened positions.
Commission and Slippage: Includes a standard Binance commission of 0.1% and accounts for possible slippage over 5 ticks.
Initial capital: 10000 USDT
Percent of capital used in every trade: 10%
Maximum Single Position Loss: -5.15%
Maximum Single Profit: +24.57%
Net Profit: +2108.85 USDT (+21.09%)
Total Trades: 111 (36.94% win rate)
Profit Factor: 2.391
Maximum Accumulated Loss: 367.61 USDT (-2.97%)
Average Profit per Trade: 19.00 USDT (+1.78%)
Average Trade Duration: 75 hours
How to Use
Add the script to favorites for easy access.
Apply to the desired timeframe and chart (optimal performance observed on 3h BTC/USDT).
Configure settings using the dropdown choice list in the built-in menu.
Set up alerts to automate strategy positions through web hook with the text: {{strategy.order.alert_message}}
Disclaimer:
Educational and informational tool reflecting Skyrex commitment to informed trading. Past performance does not guarantee future results. Test strategies in a simulated environment before live implementation
These results are obtained with realistic parameters representing trading conditions observed at major exchanges such as Binance and with realistic trading portfolio usage parameters.
MultiLayer Awesome Oscillator Saucer Strategy [Skyrexio]Overview
MultiLayer Awesome Oscillator Saucer Strategy leverages the combination of Awesome Oscillator (AO), Williams Alligator, Williams Fractals and Exponential Moving Average (EMA) to obtain the high probability long setups. Moreover, strategy uses multi trades system, adding funds to long position if it considered that current trend has likely became stronger. Awesome Oscillator is used for creating signals, while Alligator and Fractal are used in conjunction as an approximation of short-term trend to filter them. At the same time EMA (default EMA's period = 100) is used as high probability long-term trend filter to open long trades only if it considers current price action as an uptrend. More information in "Methodology" and "Justification of Methodology" paragraphs. The strategy opens only long trades.
Unique Features
No fixed stop-loss and take profit: Instead of fixed stop-loss level strategy utilizes technical condition obtained by Fractals and Alligator to identify when current uptrend is likely to be over (more information in "Methodology" and "Justification of Methodology" paragraphs)
Configurable Trading Periods: Users can tailor the strategy to specific market windows, adapting to different market conditions.
Multilayer trades opening system: strategy uses only 10% of capital in every trade and open up to 5 trades at the same time if script consider current trend as strong one.
Short and long term trend trade filters: strategy uses EMA as high probability long-term trend filter and Alligator and Fractal combination as a short-term one.
Methodology
The strategy opens long trade when the following price met the conditions:
1. Price closed above EMA (by default, period = 100). Crossover is not obligatory.
2. Combination of Alligator and Williams Fractals shall consider current trend as an upward (all details in "Justification of Methodology" paragraph)
3. Awesome Oscillator shall create the "Saucer" long signal (all details in "Justification of Methodology" paragraph). Buy stop order is placed one tick above the candle's high of last created "Saucer signal".
4. If price reaches the order price, long position is opened with 10% of capital.
5. If currently we have opened position and price creates and hit the order price of another one "Saucer" signal another one long position will be added to the previous with another one 10% of capital. Strategy allows to open up to 5 long trades simultaneously.
6. If combination of Alligator and Williams Fractals shall consider current trend has been changed from up to downtrend, all long trades will be closed, no matter how many trades has been opened.
Script also has additional visuals. If second long trade has been opened simultaneously the Alligator's teeth line is plotted with the green color. Also for every trade in a row from 2 to 5 the label "Buy More" is also plotted just below the teeth line. With every next simultaneously opened trade the green color of the space between teeth and price became less transparent.
Strategy settings
In the inputs window user can setup strategy setting: EMA Length (by default = 100, period of EMA, used for long-term trend filtering EMA calculation). User can choose the optimal parameters during backtesting on certain price chart.
Justification of Methodology
Let's go through all concepts used in this strategy to understand how they works together. Let's start from the easies one, the EMA. Let's briefly explain what is EMA. The Exponential Moving Average (EMA) is a type of moving average that gives more weight to recent prices, making it more responsive to current price changes compared to the Simple Moving Average (SMA). It is commonly used in technical analysis to identify trends and generate buy or sell signals. It can be calculated with the following steps:
1.Calculate the Smoothing Multiplier:
Multiplier = 2 / (n + 1), Where n is the number of periods.
2. EMA Calculation
EMA = (Current Price) × Multiplier + (Previous EMA) × (1 − Multiplier)
In this strategy uses EMA an initial long term trend filter. It allows to open long trades only if price close above EMA (by default 50 period). It increases the probability of taking long trades only in the direction of the trend.
Let's go to the next, short-term trend filter which consists of Alligator and Fractals. Let's briefly explain what do these indicators means. The Williams Alligator, developed by Bill Williams, is a technical indicator designed to spot trends and potential market reversals. It uses three smoothed moving averages, referred to as the jaw, teeth, and lips:
Jaw (Blue Line): The slowest of the three, based on a 13-period smoothed moving average shifted 8 bars ahead.
Teeth (Red Line): The medium-speed line, derived from an 8-period smoothed moving average shifted 5 bars forward.
Lips (Green Line): The fastest line, calculated using a 5-period smoothed moving average shifted 3 bars forward.
When these lines diverge and are properly aligned, the "alligator" is considered "awake," signaling a strong trend. Conversely, when the lines overlap or intertwine, the "alligator" is "asleep," indicating a range-bound or sideways market. This indicator assists traders in identifying when to act on or avoid trades.
The Williams Fractals, another tool introduced by Bill Williams, are used to pinpoint potential reversal points on a price chart. A fractal forms when there are at least five consecutive bars, with the middle bar displaying the highest high (for an up fractal) or the lowest low (for a down fractal), relative to the two bars on either side.
Key Points:
Up Fractal: Occurs when the middle bar has a higher high than the two preceding and two following bars, suggesting a potential downward reversal.
Down Fractal: Happens when the middle bar shows a lower low than the surrounding two bars, hinting at a possible upward reversal.
Traders often combine fractals with other indicators to confirm trends or reversals, improving the accuracy of trading decisions.
How we use their combination in this strategy? Let’s consider an uptrend example. A breakout above an up fractal can be interpreted as a bullish signal, indicating a high likelihood that an uptrend is beginning. Here's the reasoning: an up fractal represents a potential shift in market behavior. When the fractal forms, it reflects a pullback caused by traders selling, creating a temporary high. However, if the price manages to return to that fractal’s high and break through it, it suggests the market has "changed its mind" and a bullish trend is likely emerging.
The moment of the breakout marks the potential transition to an uptrend. It’s crucial to note that this breakout must occur above the Alligator's teeth line. If it happens below, the breakout isn’t valid, and the downtrend may still persist. The same logic applies inversely for down fractals in a downtrend scenario.
So, if last up fractal breakout was higher, than Alligator's teeth and it happened after last down fractal breakdown below teeth, algorithm considered current trend as an uptrend. During this uptrend long trades can be opened if signal was flashed. If during the uptrend price breaks down the down fractal below teeth line, strategy considered that uptrend is finished with the high probability and strategy closes all current long trades. This combination is used as a short term trend filter increasing the probability of opening profitable long trades in addition to EMA filter, described above.
Now let's talk about Awesome Oscillator's "Sauser" signals. Briefly explain what is the Awesome Oscillator. The Awesome Oscillator (AO), created by Bill Williams, is a momentum-based indicator that evaluates market momentum by comparing recent price activity to a broader historical context. It assists traders in identifying potential trend reversals and gauging trend strength.
AO = SMA5(Median Price) − SMA34(Median Price)
where:
Median Price = (High + Low) / 2
SMA5 = 5-period Simple Moving Average of the Median Price
SMA 34 = 34-period Simple Moving Average of the Median Price
Now we know what is AO, but what is the "Saucer" signal? This concept was introduced by Bill Williams, let's briefly explain it and how it's used by this strategy. Initially, this type of signal is a combination of the following AO bars: we need 3 bars in a row, the first one shall be higher than the second, the third bar also shall be higher, than second. All three bars shall be above the zero line of AO. The price bar, which corresponds to third "saucer's" bar is our signal bar. Strategy places buy stop order one tick above the price bar which corresponds to signal bar.
After that we can have the following scenarios.
Price hit the order on the next candle in this case strategy opened long with this price.
Price doesn't hit the order price, the next candle set lower low. If current AO bar is increasing buy stop order changes by the script to the high of this new bar plus one tick. This procedure repeats until price finally hit buy order or current AO bar become decreasing. In the second case buy order cancelled and strategy wait for the next "Saucer" signal.
If long trades has been opened strategy use all the next signals until number of trades doesn't exceed 5. All trades are closed when the trend changes to downtrend according to combination of Alligator and Fractals described above.
Why we use "Saucer" signals? If AO above the zero line there is a high probability that price now is in uptrend if we take into account our two trend filters. When we see the decreasing bars on AO and it's above zero it's likely can be considered as a pullback on the uptrend. When we see the stop of AO decreasing and the first increasing bar has been printed there is a high probability that this local pull back is finished and strategy open long trade in the likely direction of a main trend.
Why strategy use only 10% per signal? Sometimes we can see the false signals which appears on sideways. Not risking that much script use only 10% per signal. If the first long trade has been open and price continue going up and our trend approximation by Alligator and Fractals is uptrend, strategy add another one 10% of capital to every next saucer signal while number of active trades no more than 5. This capital allocation allows to take part in long trades when current uptrend is likely to be strong and use only 10% of capital when there is a high probability of sideways.
Backtest Results
Operating window: Date range of backtests is 2023.01.01 - 2024.11.25. It is chosen to let the strategy to close all opened positions.
Commission and Slippage: Includes a standard Binance commission of 0.1% and accounts for possible slippage over 5 ticks.
Initial capital: 10000 USDT
Percent of capital used in every trade: 10%
Maximum Single Position Loss: -5.10%
Maximum Single Profit: +22.80%
Net Profit: +2838.58 USDT (+28.39%)
Total Trades: 107 (42.99% win rate)
Profit Factor: 3.364
Maximum Accumulated Loss: 373.43 USDT (-2.98%)
Average Profit per Trade: 26.53 USDT (+2.40%)
Average Trade Duration: 78 hours
These results are obtained with realistic parameters representing trading conditions observed at major exchanges such as Binance and with realistic trading portfolio usage parameters.
How to Use
Add the script to favorites for easy access.
Apply to the desired timeframe and chart (optimal performance observed on 3h BTC/USDT).
Configure settings using the dropdown choice list in the built-in menu.
Set up alerts to automate strategy positions through web hook with the text: {{strategy.order.alert_message}}
Disclaimer:
Educational and informational tool reflecting Skyrex commitment to informed trading. Past performance does not guarantee future results. Test strategies in a simulated environment before live implementation
Fibonacci & Bollinger Bands StrategyThis strategy combines Bollinger Bands and Fibonacci retracement/extension levels to identify potential entry and exit points in the market. Here’s a breakdown of each component and how the strategy works:
1. Bollinger Bands:
Bollinger Bands consist of a simple moving average (SMA) and two standard deviations (upper and lower bands) plotted above and below the SMA. The bands expand and contract based on market volatility.
Purpose in Strategy:
The lower band represents an area where the market might be oversold.
The upper band represents an area where the market might be overbought.
The price crossing these bands suggests overextended market conditions, which can be used to identify potential reversals.
2. Fibonacci Retracement and Extension Levels:
Fibonacci retracement levels are horizontal lines that indicate where price might find support or resistance as it retraces some of its previous movement. Common retracement levels are 61.8% and 78.6%.
Fibonacci extension levels are used to project areas where the price might extend after completing a retracement. These levels can help determine potential targets after a significant price movement.
Purpose in Strategy:
The strategy calculates the most recent swing high (fibHigh) and swing low (fibLow) over a lookback period. It then plots Fibonacci retracement and extension levels based on this range.
The Fibonacci levels are used as key support and resistance areas. The price approaching or touching these levels signals potential turning points in the market.
3. Entry Criteria:
A long position (buy) is triggered when:
The price crosses below the lower Bollinger Band, indicating an oversold condition.
The price is near or above a Fibonacci extension level (calculated based on the most recent price swing).
This suggests that the price is potentially reaching a strong support area, where a reversal is likely.
4. Exit Criteria:
The long position is closed (exit trade) when either:
The price touches or crosses the upper Bollinger Band, signaling an overbought condition.
The price reaches a Fibonacci retracement level or exceeds the recent swing high (fibHigh), indicating a potential exhaustion point or a reversal area.
5. General Strategy Logic:
The strategy takes advantage of market volatility (captured by the Bollinger Bands) and key support/resistance levels (determined by Fibonacci retracement and extension levels).
By combining these two techniques, the strategy identifies potential entry points at oversold levels with the expectation that the market will retrace or reverse upward, especially when near key Fibonacci extension levels.
Exit points are identified by potential overbought levels (Bollinger upper band) or key Fibonacci retracement levels, where the price might reverse downward.
6. Conditions to Execute the Strategy:
The Fibonacci levels are only calculated once the price has made a significant movement, establishing a recent high and low over a 50-bar period (which you can adjust). This ensures the Fibonacci levels are based on meaningful swings.
The entry and exit signals are filtered using both Bollinger Bands and Fibonacci levels to ensure that trades are not taken solely based on one indicator, thus reducing false signals.
Key Features of the Strategy:
Trend-following with reversal: It tries to catch reversals when the price hits extreme levels (Bollinger Bands) while respecting important Fibonacci levels.
Dynamic market adaptation: The strategy adapts to market conditions as it recalculates Fibonacci levels based on recent price swings and adjusts the Bollinger Bands for market volatility.
Confirmation through multiple indicators: It uses both the volatility-based signals from Bollinger Bands and the price structure from Fibonacci levels to confirm trade entries and exits.
Summary of the Strategy:
The strategy looks to buy low and sell high based on oversold/overbought signals from Bollinger Bands and Fibonacci levels that indicate key support and resistance zones.
By combining these two technical indicators, the strategy aims to reduce risk and increase accuracy by only entering trades when both indicators suggest favorable conditions.
Fractal Breakout Trend Following StrategyOverview
The Fractal Breakout Trend Following Strategy is a trend-following system which utilizes the Willams Fractals and Alligator to execute the long trades on the fractal's breakouts which have a high probability to be the new uptrend phase beginning. This system also uses the normalized Average True Range indicator to filter trades after a large moves, because it's more likely to see the trend continuation after a consolidation period. Strategy can execute only long trades.
Unique Features
Trend and volatility filtering system: Strategy uses Williams Alligator to filter the counter-trend fractals breakouts and normalized Average True Range to avoid the trades after large moves, when volatility is high
Configurable Trading Periods: Users can tailor the strategy to specific market windows, adapting to different market conditions.
Flexible Risk Management: Users can choose the stop-loss percent (by default = 3%) for trades, but strategy also has the dynamic stop-loss level using down fractals.
Methodology
The strategy places stop order at the last valid fractal breakout level. Validity of this fractal is defined by the Williams Alligator indicator. If at the moment of time when price breaking the last fractal price is higher than Alligator's teeth line (8 period SMA shifted 5 bars in the future) this is a valid breakout. Moreover strategy has the additional volatility filtering system using normalized ATR. It calculates the average normalized ATR for last user-defined number of bars and if this value lower than the user-defined threshold value the long trade is executed.
When trade is opened, script places the stop loss at the price higher of two levels: user defined stop-loss from the position entry price or down fractal validation level. The down fractal is valid with the rule, opposite as the up fractal validation. Price shall break to the downside the last down fractal below the Willians Alligator's teeth line.
Strategy has no fixed take profit. Exit level changes with the down fractal validation level. If price is in strong uptrend trade is going to be active until last down fractal is not valid. Strategy closes trade when price hits the down fractal validation level.
Risk Management
The strategy employs a combined approach to risk management:
It allows positions to ride the trend as long as the price continues to move favorably, aiming to capture significant price movements. It features a user-defined stop-loss parameter to mitigate risks based on individual risk tolerance. By default, this stop-loss is set to a 3% drop from the entry point, but it can be adjusted according to the trader's preferences.
Justification of Methodology
This strategy leverages Williams Fractals to open long trade when price has broken the key resistance level to the upside. This resistance level is the last up fractal and is shall be broken above the Williams Alligator's teeth line to be qualified as the valid breakout according to this strategy. The Alligator filtering increases the probability to avoid the false breakouts against the current trend.
Moreover strategy has an additional filter using Average True Range(ATR) indicator. If average value of ATR for the last user-defined number of bars is lower than user-defined threshold strategy can open the long trade according to open trade condition above. The logic here is following: we want to open trades after period of price consolidation inside the range because before and after a big move price is more likely to be in sideways, but we need a trend move to have a profit.
Another one important feature is how the exit condition is defined. On the one hand, strategy has the user-defined stop-loss (3% below the entry price by default). It's made to give users the opportunity to restrict their losses according to their risk-tolerance. On the other hand, strategy utilizes the dynamic exit level which is defined by down fractal activation. If we assume the breaking up fractal is the beginning of the uptrend, breaking down fractal can be the start of downtrend phase. We don't want to be in long trade if there is a high probability of reversal to the downside. This approach helps to not keep open trade if trend is not developing and hold it if price continues going up.
Backtest Results
Operating window: Date range of backtests is 2023.01.01 - 2024.05.01. It is chosen to let the strategy to close all opened positions.
Commission and Slippage: Includes a standard Binance commission of 0.1% and accounts for possible slippage over 5 ticks.
Initial capital: 10000 USDT
Percent of capital used in every trade: 30%
Maximum Single Position Loss: -3.19%
Maximum Single Profit: +24.97%
Net Profit: +3036.90 USDT (+30.37%)
Total Trades: 83 (28.92% win rate)
Profit Factor: 1.953
Maximum Accumulated Loss: 963.98 USDT (-8.29%)
Average Profit per Trade: 36.59 USDT (+1.12%)
Average Trade Duration: 72 hours
These results are obtained with realistic parameters representing trading conditions observed at major exchanges such as Binance and with realistic trading portfolio usage parameters.
How to Use
Add the script to favorites for easy access.
Apply to the desired timeframe and chart (optimal performance observed on 4h and higher time frames and the BTC/USDT).
Configure settings using the dropdown choice list in the built-in menu.
Set up alerts to automate strategy positions through web hook with the text: {{strategy.order.alert_message}}
Disclaimer:
Educational and informational tool reflecting Skyrex commitment to informed trading. Past performance does not guarantee future results. Test strategies in a simulated environment before live implementation
Momentum Alligator 4h Bitcoin StrategyOverview
The Momentum Alligator 4h Bitcoin Strategy is a trend-following trading system that operates on dual time frames. It utilizes the 1D Williams Alligator indicator to identify the prevailing major price trend and seeks trading opportunities on the 4-hour (4h) time frame when the momentum is turning up. The strategy is designed to close trades if the trend fails to develop or holding position if price continues increasing without any significant correction. Note that this strategy is specifically tailored for the 4-hour time frame.
Unique Features
2-layers market noise filtering system: Trades are only initiated in the direction of the 1D trend, determined by the Williams Alligator indicator. This higher time frame confirmation filters out minor trade signals, focusing on more substantial opportunities. At the same time, strategy has additional filter on 4h time frame with Awesome Oscillator which is showing the current price momentum.
Flexible Risk Management: The strategy exclusively opens long positions, resulting in fewer trades during bear markets. It incorporates a dynamic stop-loss mechanism, which can either follow the jaw line of the 4h Alligator or a user-defined fixed stop-loss. This flexibility helps manage risk and avoid non-trending markets.
Methodology
The strategy initiates a long position when the d-line of Stochastic RSI crosses up it's k-line. It means that there is a high probability that price momentum reversed from down to up. To avoid overtrading in potentially choppy markets, it skips the next two trades following a winning trade, anticipating sideways movement after a significant price surge.
This strategy has two layers trades filtering system: 4h and 1D time frames. The first one is awesome oscillator. It shall be increasing and value has to be higher than it's 5-period SMA. This is an additional confirmation that long trade is opened in the direction of the current momentum. As it was mentioned above, all entry signals are validated against the 1D Williams Alligator indicator. A trade is only opened if the price is above all three lines of the 1D Alligator, ensuring alignment with the major trend.
A trade is closed if the price hits the 4h jaw line of the Alligator or reaches the user-defined stop-loss level.
Risk Management
The strategy employs a combined approach to risk management:
It allows positions to ride the trend as long as the price continues to move favorably, aiming to capture significant price movements. It features a user-defined stop-loss parameter to mitigate risks based on individual risk tolerance. By default, this stop-loss is set to a 2% drop from the entry point, but it can be adjusted according to the trader's preferences.
Justification of Methodology
This strategy leverages Stochastic RSI on 4h time frame to open long trade when momentum started reversing to the upside. On the one hand, Stochastic RSI is one of the most sensitive indicator, which allows to react fast on the potential trend reversal. On the other hand, this indicator can be too sensitive and provide a lot of false trend changing signals. To eliminate this weakness we use two-layers trades filtering system.
The first layer is the 4h Awesome oscillator. This is less sensitive momentum indicator. Usually it starts increasing when price has already passed significant distance from the actual reversal point. The strategy opens long trade only is Awesome oscillator is increasing and above it's 5-period SMA. This approach increases the probability to filter the false signals during the choppy market or if the reversal is false.
The second layer filter is the Williams Alligator indicator on 1D time frame. The 1D Alligator serves as a filter for identifying the primary trend and increases probability to avoid the trades with low potential because trading against major trend usually is more risky. It's much better to catch the trend continuation than local bounce.
Last but not least feature of this strategy is close trades condition. It uses the flexible approach. First of all, user can set up the fixed stop-loss according to his own risk-tolerance, by default this value is 2% of price movement. It restricts the potential loss at the moment when trade has just been opened. Moreover strategy utilizes the 4h Williams Alligator's jaw line to exit the trade. If price fell below it trade is closed. This approach helps to not keep open trade if trend is not developing and hold it if price continues going up.
Backtest Results:
Operating window: Date range of backtests is 2021.01.01 - 2024.05.01. It is chosen to let the strategy to close all opened positions.
Commission and Slippage: Includes a standard Binance commission of 0.1% and accounts for possible slippage over 5 ticks.
Initial capital: 10000 USDT
Percent of capital used in every trade: 50%
Maximum Single Position Loss: -3.04%
Maximum Single Profit: +29.67%
Net Profit: +6228.01 USDT (+62.28%)
Total Trades: 118 (24.58% win rate)
Profit Factor: 1.71
Maximum Accumulated Loss: 1527.69 USDT (-11.52%)
Average Profit per Trade: 52.78 USDT (+0.89%)
Average Trade Duration: 60 hours
These results are obtained with realistic parameters representing trading conditions observed at major exchanges such as Binance and with realistic trading portfolio usage parameters.
How to Use:
Add the script to favorites for easy access.
Apply to the 4h timeframe desired chart (optimal performance observed on the BTC/USDT).
Configure settings using the dropdown choice list in the built-in menu.
Set up alerts to automate strategy positions through web hook with the text: {{strategy.order.alert_message}}
Disclaimer:
Educational and informational tool reflecting Skyrex commitment to informed trading. Past performance does not guarantee future results. Test strategies in a simulated environment before live implementation
Alligator + MA Trend Catcher [TradeDots]The "Alligator + MA Trend Catcher" is a trading strategy that integrates the William Alligator indicator with a Moving Average (MA) to establish robust entry and exit conditions, optimized for capturing trends.
HOW IT WORKS
This strategy combines the traditional William Alligator set up with an additional Moving Average indicator for enhanced trend confirmation, creating a user-friendly backtesting tool for traders who prefer the Alligator method.
The original Alligator strategy can frequently present fluctuations, even in well-established trends, leading to potentially premature exits. To mitigate this, we incorporate a Moving Average as a secondary confirmation measure to ensure the market trend has indeed shifted.
Here’s the operational flow for long orders:
Entry Signal: When the price rises above the Moving Average, it confirms a bullish market state. Enter if Alligator spread in an upward direction. The trade remains active even if the Alligator indicator suggests a trend reversal.
Exit Signal: The position is closed when the price falls below the Moving Average, and the Alligator spreads in the downward direction. This setup helps traders to maintain positions through the entirety of the trend for maximum gain.
APPLICATION
This strategy is tailored for assets with significant, well-defined trends, such as Bitcoin and Ethereum, which are known for their high volatility and substantial price movements.
This strategy offers a low win-rate but high reward configuration, making asset selection critical for long-term profitability. If you choose assets that lack strong price momentum, there's a high chance that this strategy may not be effective.
For traders seeking to maximize gains from large trends without exiting prematurely, this strategy provides an aggressive yet controlled approach to riding out substantial market waves.
DEFAULT SETUP
Commission: 0.01%
Initial Capital: $10,000
Equity per Trade: 80%
RISK DISCLAIMER
Trading entails substantial risk, and most day traders incur losses. All content, tools, scripts, articles, and education provided by TradeDots serve purely informational and educational purposes. Past performances are not definitive predictors of future results.
Trend Catcher Strategywhat is Trend Catcher Strategy?
it is a strategy that opens long or short positions in the direction of the trend.
what it does?
TCS detects trend formations using its own unique method. Then, it opens a position in the direction of the trend and closes a part of the opened transaction (half according to default values) when the price reaches a certain level, and moves the remaining position to the point where it thinks the trend is over. You can easily understand how it works by looking at the images:
how it does it?
It obtains a value called a "limit" by dividing the difference between the highest value and the lowest value in a certain range (that is, the vector sum) to the sum of the lengths of the candles in a certain range (the total distance traveled). then multiplies this by 100 to get a percentage value. The closer this value is to 100, the stronger the trend.
Williams %R Cross Strategy with 200 MA Filter
1. The script is a trading strategy based on the Williams %R indicator and a 200-period moving average (MA) filter.
2. The user can input the length of the Williams %R indicator (`wrLength`), the threshold for %R crossing (`crossPips`), the take profit level in pips (`takeProfitPips`), and the stop loss level in pips (`stopLossPips`).
3. The script calculates the Williams %R using the `ta.highest` and `ta.lowest` functions to find the highest high and lowest low over the specified length (`wrLength`).
4. It also calculates a 200-period simple moving average (`ma200`) using the `ta.sma` function.
5. The entry conditions are defined as follows:
- For a long entry, it checks if the Williams %R crosses above the -50 line by a threshold of `crossPips` and if the close price is above the 200-period MA.
- For a short entry, it checks if the Williams %R crosses below the -50 line by a threshold of `crossPips` and if the close price is below the 200-period MA.
6. The exit conditions are defined as follows:
- For a long position, it checks if the close price reaches the take profit level (defined as the average entry price plus `takeProfitPips` in pips) or the stop loss level (defined as the average entry price minus `stopLossPips` in pips).
- For a short position, it checks if the close price reaches the take profit level (defined as the average entry price minus `takeProfitPips` in pips) or the stop loss level (defined as the average entry price plus `stopLossPips` in pips).
7. The script uses the `strategy.entry` function to place long and short orders when the respective entry conditions are met.
8. It uses the `strategy.close` function to close the long and short positions when the respective exit conditions are met.
The script allows you to customize the parameters such as the length of Williams %R, the crossing threshold, take profit and stop loss levels, and the moving average period to suit your trading preferences.
CM_SlingShotSystem+_CassicEMA+Willams21EMA13 htc1977 editionThis strategy is a combination of 2 indicators based on EMA(actually x3 EMAs and Williams ind.
We usin this to see where EMA fast is above EMA slow(for long), entry position when price hit fast EMA and exit if trend changes or price overbought, or by stoploss 1%.
The opposite for a short position.
For better result You can change every EMA's, stoploss, Willam's ind and other visualisation in settings.
If You find good combination - please, let me know(if You want).
I will check it with ML, and attach it here.
Original indicators will write in comments
EMA 5,15,35,89,200 BY NUTPlots exponential moving average on four timeframes at once for rapid indication of momentum shift as well as slower-moving confirmations.
Displays EMA 5, 15, 35, 89 and 200... default colors are hotter for faster timeframes, cooler for slower ones
ขอบคุณครับ
scalping with market facilitationThis strategy is for scalping low timeframes for 10 pips. I have yet to see a strategy with this unique combo of indicators.
First we have volume indicator market facilitation, where we are looking for volume and mfi to be up, then we want the adx 5 to be above level 30 and above its ema period 3, then if these conditions are good we take shorts when ema 8 is below ema 100 and longs when ema8 is above ema 100 with parabolic sar in its propet place, also to verify trend we have obv over or under its ema of 55 and macd line over its signal line.
I have heikenashi bars on with the regular priceline showing so j see actual price levels, when i get a buy signal i set a buystop above the high of that bar and have a stoploss of 7.5 pips and a take profit of 10 pips, reverse for sells, i have to use metatrader to trade so i use this as my signals to trade.
Note this is not advice trade at your own risk no guarantees in anything in life, but i wanted to share this for it is helping me with my trades to be more strict and semi mechanical. I use it for forex time frames 1 3 5 15 mjn
Chande Kroll Stop今天和大家分享Chande Kroll Stop 回测, 信号采用了上限线和下限线共通反向趋势而决定买卖信号,如果有新的构思能提高买卖信号欢迎在留言区发表你的建议,祝你交易开心!
Combo 2/20 EMA & Bill Williams Averages. 3Lines This is combo strategies for get a cumulative signal.
First strategy
This indicator plots 2/20 exponential moving average. For the Mov
Avg X 2/20 Indicator, the EMA bar will be painted when the Alert criteria is met.
Second strategy
This indicator calculates 3 Moving Averages for default values of
13, 8 and 5 days, with displacement 8, 5 and 3 days: Median Price (High+Low/2).
The most popular method of interpreting a moving average is to compare
the relationship between a moving average of the security's price with
the security's price itself (or between several moving averages).
WARNING:
- For purpose educate only
- This script to change bars colors.
Up & Down Trend following trading strategy for BTC/USDT 3hThis strategy is based on multi time frame technical indicators such as;
1. RSI (10,50,100)
2. MFI (10,50,100)
3. RVI (10,50,100)
4. BOP (10,50,100)
5. Super Trend
6. SAR indicator
7. Higher highs and lower lows
8. SMA (9,500)
9. EMA (9,200)
After evaluating different parameters provided by those indicators, script is in a possition to determine optimul positions to enter in to market as well as exit from the market. In some cases stratergy will exit fully or partially depends on the situation. Other than that, this strategy is in a possition to calculate and specify the quantity you need to buy or sell depending on market situation. You can specify amount available for investment and how many times you are going to average (if downtrend). Parameters are optimised to BTC/USDT, 3h standerd candlestic chart.
goodluck
5min Williams Fractals scalping (3commas)Another strategy I'm learning Pine Script on. It is inspired by a MoneyZG youtube strategy called "Easy 5 Minute Scalping Strategy (Simple to Follow Scalping Trading Strategy)".
Again this is a one order per trade strategy compatible with the 3commas bot (works also with the free 3commas subscription). This strategy is based on the signals from Williams Fractals, taking the signals in reverse - red triangle indicates a bottom and hence we go long. The green triangle indicates a top so we go short. By default these signals are only accepted if they occur between the two Emas. However, you can also turn this off and when a WF signal comes in, only the current price has to be between the Emas. Stop loss is set to the current Ema slow and the take profit is a multiple of the distance to the slow ema.
Like previously I have added different filters as well as the ability to view essential things like the WF signal and Emas. I hope the script will help you to be more successful and if so it would be great if you could share here your setups, or tips on what would be good to refine to make it an even a more profitable strategy. Kind of a community approach so that we help each other out :).
Instructions for the 3commas connector:
1. First, you need to prepare 3commas Long/Short bots that will only listen to custom TV signals.
2. Inputs for the 3commas bot can be found at the end of the user inputs.
3. Once you have entered the required details into the inputs, turn on 3commas comments. They should appear on the chart (looks messy).
4. Now you can add the alert where you should paste the 3commas Webhook URL: 3commas.io
5. For the alert message text insert the placeholder {{strategy.order.comment}} and delete the rest.
6. Once the alert is saved, you can turn off those 3commas comments to have a clearer chart.
7. With a new alert, the bot and trade should launch.
In the near future I would like to publish more scripts that will carry similar elements as the first two, incl. compatibility with 3commas (I don't have access to another bot system). I will choose some strategies myself, but I will also be glad for some tips on what strategy would be good to do and is still missing here on Tradingview (short youtube videos or brief strategy manuals would be great).
Thanks and keep it up
PS: My screen values starting at Long Target Profit and ending at Pullback NOT greater than: 1.5; 1.5; 0; ON; 1; 2; OFF; 17; 36; ON; 0.05; ON; Chart; 14; 46; 50; 48.5; 51; OFF; 1; ON; 4; 2.