Liquid Pours XtremeStrategy Description: Liquid Pours Xtreme
The Liquid Pours Xtreme is an innovative trading strategy that combines the analysis of specific time-based patterns with price comparisons to identify potential opportunities in the forex market. Designed for traders seeking a structured methodology based on clear rules, this strategy offers integration with Telegram for real-time alerts and provides visual tools to enhance trade management.
Key Features:
Analysis of Specific Time Patterns: The strategy captures and compares closing prices at two key moments during the trading day, identifying recurring patterns that may indicate future market movements.
Dynamic SL and TP Levels Implementation: Utilizes tick-based calculations to set Stop-Loss and Take-Profit levels, adapting to the current market volatility.
Advanced Telegram Integration: Provides detailed alerts including information such as the asset, signal time, entry price, and SL/TP levels, facilitating real-time decision-making.
Complete Customization: Allows users to adjust key parameters, including operation schedules, weekdays, and visual settings, adapting to different trading styles.
Enhanced Chart Visualization: Includes visual elements like candle color changes based on signal state, event markers, and halos to highlight important moments.
Default Strategy Properties: Specific configuration for optimal risk management and simulation.
How the Strategy Works
Capturing Prices at Key Moments:
- The strategy records the closing price at two user-defined specific times. These times typically correspond to periods of high market volatility, such as the opening of the European session and the US pre-market.
- Rationale: Volatility and trading volume usually increase during these times, presenting opportunities for significant price movements.
Generating Signals Based on Price Comparison:
- Buy Signal: If the second closing price is lower than the first, it indicates possible accumulation and is interpreted as a bullish signal.
- Sell Signal: If the second closing price is higher than the first, it suggests possible distribution and is interpreted as a bearish signal.
- Signals are only generated on selected trading days, allowing you to avoid days with lower liquidity or higher risk.
Calculating Dynamic SL and TP Levels:
- Stop-Loss (SL) and Take-Profit (TP) levels are calculated based on the entry price and a user-defined number of ticks, adapting to market volatility.
- The strategy offers the option to base these levels on the close of the signal candle or the open of the next candle, providing flexibility according to the trader's preference.
- SL and TP boxes are drawn on the chart for visual reference, facilitating trade management.
Automatic Execution and Alerts:
- Upon signal generation, the strategy automatically executes a market order (buy or sell).
- Sends a detailed alert to your Telegram channel, including essential information for quick decision-making.
Visual Elements:
- Colors candles based on the signal state: buy, sell, or neutral, allowing for quick trend identification.
- Provides a smooth color transition between signal states and uses markers and halos to highlight important events and signals on the chart.
Trade Management:
- Manages open trades with automatic exit conditions based on the established SL and TP levels.
- Includes mechanisms to prevent exceeding TradingView's limitations on boxes and labels, ensuring optimal script performance.
Originality and utility:
- This strategy incorporates a unique approach focusing on specific time patterns and their relationship to institutional activity in the market.
How to Use the Strategy
Add the Script to the Chart:
- Go to the indicators menu in TradingView.
- Search for " Liquid Pours Xtreme " and add it to your chart.
Set Up Telegram Alerts:
- Enter your Telegram Chat ID in the script parameters to receive alerts.
- Customize the Buy and Sell alert messages as desired.
Configure Time Patterns:
- Set the hours and minutes for the two times you want to compare closing prices, aligning them with relevant market sessions or events.
Set SL and TP Parameters:
- Define the number of ticks for the Stop-Loss and Take-Profit levels, adapting them to the asset you're trading and your risk tolerance.
- Choose the basis for SL and TP calculation (close of the signal candle or open of the next candle).
Select Trading Days:
- Enable or disable trading on specific days of the week, allowing you to avoid days with lower activity or unexpected volatility.
Customize Visual Elements:
- Adjust the colors and styles of visual elements to enhance readability and suit your personal preferences.
Monitor the Strategy:
- Observe the chart for signals and use Telegram alerts to stay informed of new opportunities, even when you're not at your terminal.
Testing and Optimization:
- Use TradingView's backtesting features to evaluate the historical performance of the strategy with different parameters.
- Adjust and optimize the parameters based on the results and your own analysis.
Adjust the Strategy Properties:
- Ensure that the strategy properties (order size, commission, slippage) are aligned with your trading account and platform to obtain realistic results.
Strategy Properties (Important)
This script backtest is conducted on M30 EURUSD , using the following backtesting properties:
Initial Capital: $10,000
Order Size: 50,000 Contracts (equivalent to 0.5% of the capital)
Commission: $0.20 per order
Slippage: 1 tick
Pyramiding: 1 order
Verify Price for Limit Orders: 0 ticks
Recalculate on Order Execution: Enabled
Recalculate on Every Tick: Enabled
Recalculate After Order Filled: Enabled
Bar Magnifier for Backtesting Precision: Enabled
We use these properties to ensure a realistic preview of the backtesting system. Note that default properties may vary for different reasons:
- Order Size: It is essential to calculate the contract size according to the traded asset and desired risk level.
- Commission and Slippage: These costs can vary depending on the market and instrument; there is no default value that might return realistic results.
We strongly recommend all users adjust the Properties within the script settings to align with their accounts and trading platforms to ensure the results from the strategies are realistic.
Backtesting Results:
- Net Profit: $4,037.50 (40.37%)
- Total Closed Trades : 292
- Profitability Percentage: 26.71%
- Profit Factor: 1.369
- Max Drawdown: $769.30 (6.28%)
- Average Trade: $13.83 (0.03%)
- Average Bars in Trades: 11
These results were obtained under the mentioned conditions and properties, providing an overview of the strategy's historical performance.
Interpreting Results:
- The strategy has demonstrated profitability in the analyzed period, although with a win rate of 26.71%, indicating that success relies on a favorable risk-reward ratio.
- The profit factor of 1.369 suggests that total gains exceed total losses by that proportion.
- It is crucial to consider the maximum drawdown of 6.28% when evaluating the strategy's suitability to your risk tolerance.
Risk Warning:
Trading leveraged financial instruments carries a high level of risk and may not be suitable for all investors. Before deciding to trade, you should carefully consider your investment objectives, level of experience, and risk tolerance. Past performance does not guarantee future results. It is essential to conduct additional testing and adjust the strategy according to your needs.
---
What Makes This Strategy Original?
Time-Based Pattern Approach: Unlike conventional strategies, this strategy focuses on identifying time patterns that reflect institutional activity and macroeconomic events that can influence the market.
Advanced Technological Integration: The combination of automatic execution and customized alerts via Telegram provides an efficient and modern tool for active traders.
Customization and Adaptability: The wide range of adjustable parameters allows the strategy to be tailored to different assets, time zones, and trading styles.
Enhanced Visual Tools: Incorporated visual elements facilitate quick market interpretation and informed decision-making.
Additional Considerations
Continuous Testing and Optimization: Users are encouraged to perform additional backtesting and optimize parameters according to their own observations and requirements.
Complementary Analysis: Use this strategy in conjunction with other indicators and fundamental analysis to reinforce decision-making.
Rigorous Risk Management: Ensure that SL and TP levels, as well as position sizing, align with your risk management plan.
Updates and Support: I am committed to providing updates and improvements based on community feedback. For inquiries or suggestions, feel free to contact me.
---
Example Configuration
Assuming you want to use the strategy with the following parameters:
Telegram Chat ID: Your unique Telegram Chat ID
First Time (Hour:Minute): 6:30
Second Time (Hour:Minute): 7:30
SL Ticks: 100
TP Ticks: 400
SL and TP Basis: Close of the Signal Candle
Trading Days: Tuesday, Wednesday, Thursday
Simulated Initial Capital: $10,000
Risk per Trade in Simulation: $50 (-0.5% of capital)
Slippage and Commissions in Simulation: 1 tick of slippage and $0.20 commission per trade
---
Conclusion
The Liquid Pours Xtreme strategy offers an innovative approach by combining specific time analysis with robust risk management and modern technological tools. Its original and adaptable design makes it valuable for traders looking to diversify their methods and capitalize on opportunities based on less conventional patterns.
Ready for immediate implementation in TradingView, this strategy can enrich your trading arsenal and contribute to a more informed and structured approach to your operations.
---
Final Disclaimer:
Financial markets are volatile and can present significant risks. This strategy should be used as part of a comprehensive trading approach and does not guarantee positive results. It is always advisable to consult with a professional financial advisor before making investment decisions.
---
Wskaźniki i strategie
Enhanced Swing Trading Strategy//@version=5
strategy("Enhanced Swing Trading Strategy", overlay=true)
// Input Parameters
smaShortLength = input.int(50, title="Short SMA Length")
smaLongLength = input.int(200, title="Long SMA Length")
rsiLength = input.int(14, title="RSI Length")
rsiOverbought = input.int(70, title="RSI Overbought Level")
rsiOversold = input.int(30, title="RSI Oversold Level")
takeProfitPerc = input.float(2.0, title="Take Profit (%)")
stopLossPerc = input.float(1.0, title="Stop Loss (%)")
riskPerc = input.float(1.0, title="Risk per Trade (%)")
alertOnSignal = input.bool(true, title="Enable Alerts")
// Indicators
smaShort = ta.sma(close, smaShortLength)
smaLong = ta.sma(close, smaLongLength)
rsi = ta.rsi(close, rsiLength)
= ta.macd(close, 12, 26, 9)
// Conditions
longCondition = ta.crossover(smaShort, smaLong) and rsi > rsiOversold and macdLine > signalLine
shortCondition = ta.crossunder(smaShort, smaLong) and rsi < rsiOverbought and macdLine < signalLine
// Position Sizing based on Risk
capital = strategy.equity
riskAmount = capital * (riskPerc / 100)
stopLossValue = riskAmount / (stopLossPerc / 100)
positionSize = stopLossValue / close
// Entry Signals
if (longCondition)
strategy.entry("Long", strategy.long, qty=positionSize)
if alertOnSignal
alert("Swing Trading: Long Position Opened", alert.freq_once)
if (shortCondition)
strategy.entry("Short", strategy.short, qty=positionSize)
if alertOnSignal
alert("Swing Trading: Short Position Opened", alert.freq_once)
// Exit Conditions
strategy.exit("Take Profit/Stop Loss",
from_entry="Long",
profit=takeProfitPerc,
loss=stopLossPerc)
strategy.exit("Take Profit/Stop Loss",
from_entry="Short",
profit=takeProfitPerc,
loss=stopLossPerc)
// Plotting
plot(smaShort, color=color.blue, title="SMA 50")
plot(smaLong, color=color.red, title="SMA 200")
hline(rsiOverbought, "RSI Overbought", color=color.red)
hline(rsiOversold, "RSI Oversold", color=color.green)
plot(macdLine, color=color.green, title="MACD Line")
plot(signalLine, color=color.orange, title="Signal Line")
// Draw Entry and Exit Labels
if (strategy.position_size > 0)
label.new(bar_index, high, "Long Open", style=label.style_label_up, color=color.green)
if (strategy.position_size < 0)
label.new(bar_index, low, "Short Open", style=label.style_label_down, color=color.red)
VIDYA Auto-Trading(Reversal Logic)
Purpose and Unique Features
This script leverages the Variable Index Dynamic Average (VIDYA) to implement a dynamic trend-following auto-trading strategy. By adapting to price volatility, it optimizes entry points and strengthens risk management. Key differentiators of this strategy include:
VIDYA Characteristics:
Quickly responds to price momentum changes through dynamic calculations.
Incorporates volatility adjustments for enhanced trend detection accuracy.
ATR Band Utilization:
Measures market volatility to set stop-loss levels and guide risk management.
Supports more calculated trade entries in volatile markets.
Visual Trend Representation:
Displays "green zones" for uptrends and "red zones" for downtrends.
Enables intuitive understanding of trend continuation and reversal.
Usage Instructions
Entry Conditions
Long Entry:
Enter when the price crosses above the upper band.
Close any previous short positions and initiate a new long position.
Short Entry:
Enter when the price crosses below the lower band.
Close any previous long positions and initiate a new short position.
Exit Conditions
Take Profit and Stop Loss:
Reverse Position Strategy or Position Reversal Strategy
Account Size: ¥100,0000
Commissions and Slippage: Assumed commission of 94 pips per trade and slippage of 1 pip.
Risk per Trade: 10% of account equity (adjustable based on risk tolerance).
Script Parameters
VIDYA Length: The period for calculating the trend (e.g., 14).
Momentum Period: The lookback period for calculating the Chande Momentum Oscillator (CMO).
ATR Band Distance: Adjustment coefficient for the band width (e.g., 1.5).
Price Source: Choose from close, open, high, or low prices for VIDYA calculation.
Trend Display Colors: Customize the colors for uptrend and downtrend zones.
Visualization Options: Toggle the display of trend lines, bands, and other elements on or off.
Strategy Features and Enhancements
Dynamic Momentum Adaptation:
Utilizes VIDYA's sensitivity to momentum changes for rapid trend detection.
Volatility-Aware Risk Management:
Employs ATR to dynamically adjust risk levels, ensuring resilience in volatile markets.
Enhanced Visual Indicators:
Clearly plots trend zones and entry points on the chart.
Simplifies analysis with intuitive visual cues.
Credits
This script is inspired by the innovative work of BigBeluga, whose indicators laid the foundation for this enhanced trend-following strategy. By leveraging BigBeluga’s insights, this script integrates VIDYA, ATR Bands, and other technical elements to create a more dynamic and intuitive trading tool.
We extend our gratitude to BigBeluga and the broader trading community for their invaluable contributions, which have enabled this advanced implementation.
Disclaimer:
This script is provided for educational purposes, and past performance does not guarantee future results. Always practice proper risk management in live trading scenarios.
By leveraging VIDYA, this strategy provides a precise and intuitive approach to trend-following. It is particularly effective in capturing market reversals and adapting to sudden price changes in volatile environments.
TheHorsyAlgoPROThe Horsy algo is an automated strategy that uses any minute Higher timeframe range as reference and search for a purge of liquidity on the HTF high or low where buyside or sell side liquidity is, the algo only search this at specific desired times that can be configured according to the time you usually trade, the strategy is known as Turtle soup purge and reverse or lately as CRT.
Why is useful?
The purpose of this Algorithm is to help turtle soup traders to quickly identify when the market is likely to reverse the algo evaluates if the opportunity is worth it, base on risk reward and other desired filters. Also this strategy can help to quickly backtest the trader strategy it can be configured in different timeframes and adapt to the trader personality, they can easily see the results and statistics and notice if its profitable or not.
This algo is useful for intraday traders looking for a purge and reverse at a key times and at key HTF price levels this only looks the previous HTF highs and lows but is important to also monitor Order blocks, FVGs, gaps, or wicks to have the best results.
How it works and how it does it?
The Horsy algo simply Jumps from one type of liquidity to another one buyside to sell side or vice versa. In order for the algo to trigger an entry it has to meet these conditions
1. Take HTF liquidity, trade above a HTF high or below a HTF low in the selected time window
2. Make a change in the state of delivery with a close below the previous candle low for shorts and close above previous candle high for longs.
3. Allow for a reasonable risk reward, it will use the highest high for shorts and the lowest low for longs. The default take profit is the opposite side of the range.
4. Validate others user filters this include enter only trades aligned with the HTF bias, or trades aligned with the LTF bias or booth. The algo have the option to enter only premium and discount entries. And finally, an option to allow for different contract sizes depending of the maximum percent of the account we want to risk default is 1%. For this last option is important to check the initial balance and leverage are configured correctly, is disable by default because it requires more capital to perform well.
We can see the algo performing in the picture below with a short trade, notice there are some white lines, they are the high or the low of HTF candle that start generating inside candles in the HTF meaning a possible consolidation. The algo plots the HTF ranges in a shaded boxes as you can see below
The HTF bias as you can see in the picture is calculated based on the last close of the HTF meaning close above previous HTF high is bullish close below previous HTF low is bearish. This HTF bias level is also the last HTF mid-price or 50%. By default, this line is enabled.
The LTF bias is calculated based on the range created from the expansion outside the previous HTF range is also the mid-price. If the LTF close above previous HTF high is bullish and if the LTF close below previous HTF low is bearish. By default this LTF bias line is disable.
This strategy includes an original and personal developed code that uses dealing ranges to recognize if the market is expanding, retracing, reversing or consolidating. This allow the algo to exit the position when it detects a retracement or at the end of the expansion. This is the default exit type.
You can monitor the previous dealing ranges created in history with an option than can be enable, by default is disable, this ranges are created after price takes buyside and then sell side or vice versa. So this dealing ranges can be useful also to identify minor pools of liquidity and premium and discount in the lower timeframe.
The picture below is a long example, the exit in this case is just at the high of the range. The normal take profit is in a blue line for longs.
How to use it?
First select the desired HTF timeframe recommended is from 30min to 240min then you setup the chart on the lower timeframe you want to trade recommended is from 1min to 15min to enter. By default This strategy is designed to work for intraday during key times when price take stops and then moves quickly away from them. You can select as much as 6 different times or just one. After you select the desired time window where the algo will look for the purge and reverse, They are highlighted in the candles that change colors excluding the gray ones that indicates consolidation.
Then the Algo allow to performs several additional filters in the entries you can select if you want to trade only longs or shorts trades, you can select when to move the stop loss to Break even. In deviations of the risk or you can just select to remove risk when price hits the 50% of previous HTF range.
You can select the minimum desired risk reward of the trade before is allow to be taken. Once is configured correctly the algo should trigger signals with a triangle up or down plus the strategy entry.
At the beginning of the picture there are some blue lines in the HTF high low and close, this is to easily identify that the market is in the Asia session, the time can be configured by the user, these lines are normally gray.
On the right top of the screen you can see some statistics about the strategy how many trades it took, ARR is an approximated value of the accumulated total risk reward of all the trades when they get closed in the simulation.
Profit factor and percent profitable are also shown should be green it means that the strategy makes money over time. But apart from that is important to notice how it makes money it is stable over time? it is a roller coaster? that why I Include this other measurements MxcsTps is the maximum consecutives take profits and Mxcsls is the maximum consecutive stop losses it takes, the slash number after it is the consecutive Break evens. So this way you know what to expect and what is normal in the strategy.
The algo shows all the times the stop loss, take profit and break even level if enable in the colored red lines for short and blue lines for longs. You can also select how price will manage the profit or stoploss point meaning that you can choose to wait for the candle to close to invalidate your idea or to take profit. This is good to avoid liquidity sweeps but can also lead to mayor loses if the idea is wrong. The default setting is to close the trade when price takes the high or low where the stoploss is, the take profit is taken after a retracement to allow to profit on expansions. You can select also to exit on a reversal if you want to ride all the move. This last option has to be used with caution because sometimes price just retrace or reverse very fast decreasing the trade profit and overall strategy performance.
The algo have the option to use standard deviation from the normal risk if you prefer to prevent liquidity sweeps near the stop level this make wider stops but can lead to increased loses so it has to be used carefully.
Below is a picture that show the entry stop and take profit levels with an exit on a retracement activated.
Strategy Results
The backtesting results are obtained simulating a 2000usd account in the Micro Nasdaq using 1 contract per trade. Commission are set to 2usd per contract, slippage to 1tick. You can see in list of trades we are not risking more than 1 % percent of the account. The backtested range is from august to November 2024. This strategy doesn’t generate too much trades because of the time filters and conditions that has to be meet to take an entry but you can see the results of the last 4months with the available data that are around 32 trades.
The default settings for this strategy is HTF as 240min designed to work on a LTF 5min chart, the default purge times are 245-300, 745-800, 845-900, 1045-1100 and 1245-1300 UTC-4, the algo will look for shorts or longs, with a minimum risk reward of 2.0. With an additional filter of the HTFBias. The take profit is by default taken on the first retracement after hitting the target. The default settings are optimized to work on the Nasdaq or Spy, but can also perform well in other assets with the correct adjustments.
Remember entries constitute only a small component of a complete winning strategy. Other factors like risk management, position-sizing, trading frequency, trading fees, and many others must also be properly managed to achieve profitability. Past performance doesn’t guarantee future results. To really take advantage of this strategy you have to study turtle soup and the HTF key levels use this only as a confirmation that your overall idea will play out and use it to backtest your model.
Summary of features
·Adaptable strategy to different HTF timeframes from 1-1440min
· Select up to 6 different purge time windows UTC-4, UTC-5
· Choose desired Risk Reward per trade
· Easily see the HTF high low close and 50% key levels in the LTF
· Identify HTF consolidations that generate key major liquidity pools
· HTF/LTF bias filters to trade in favor of the big trend or in sync
· Shaded boxes that indicate if the market is bullish, bearish or consolidating
· See the current midpoint of the last expansion move
· Optimal trade entry filter to trade only in a discount or premium
· Customizable trade management take profit, stop, breakeven level
· Option to exit on a close, retracement or reversal after hitting the take profit level
· Option to exit on a close or reversal after hitting stop loss
· Configurable breakeven point with standard deviations or at 50% of the HTF
· Calculate different contract sizes depending of a percentage of the initial balance
· Standard deviations from normal risk can be used to prevent liquidity sweeps
· See dealing ranges history to check minor pools of liquidity and premium or discount
· Dashboard with instant statistics about the strategy current settings
DNSE VN301!, SMA & EMA Cross StrategyDiscover the tailored Pinescript to trade VN30F1M Future Contracts intraday, the strategy focuses on SMA & EMA crosses to identify potential entry/exit points. The script closes all positions by 14:25 to avoid holding any contracts overnight.
HNX:VN301!
www.tradingview.com
Setting & Backtest result:
1-minute chart, initial capital of VND 100 million, entering 4 contracts per time, backtest result from Jan-2024 to Nov-2024 yielded a return over 40%, executed over 1,000 trades (average of 4 trades/day), winning trades rate ~ 30% with a profit factor of 1.10.
The default setting of the script:
A decent optimization is reached when SMA and EMA periods are set to 60 and 15 respectively while the Long/Short stop-loss level is set to 20 ticks (2 points) from the entry price.
Entry & Exit conditions:
Long signals are generated when ema(15) crosses over sma(60) while Short signals happen when ema(15) crosses under sma(60). Long orders are closed when ema(15) crosses under sma(60) while Short orders are closed when ema(15) crosses over sma(60).
Exit conditions happen when (whichever came first):
Another Long/Short signal is generated
The Stop-loss level is reached
The Cut-off time is reached (14:25 every day)
*Disclaimers:
Futures Contracts Trading are subjected to a high degree of risk and price movements can fluctuate significantly. This script functions as a reference source and should be used after users have clearly understood how futures trading works, accessed their risk tolerance level, and are knowledgeable of the functioning logic behind the script.
Users are solely responsible for their investment decisions, and DNSE is not responsible for any potential losses from applying such a strategy to real-life trading activities. Past performance is not indicative/guarantee of future results, kindly reach out to us should you have specific questions about this script.
---------------------------------------------------------------------------------------
Khám phá Pinescript được thiết kế riêng để giao dịch Hợp đồng tương lai VN30F1M trong ngày, chiến lược tập trung vào các đường SMA & EMA cắt nhau để xác định các điểm vào/ra tiềm năng. Chiến lược sẽ đóng tất cả các vị thế trước 14:25 để tránh giữ bất kỳ hợp đồng nào qua đêm.
Thiết lập & Kết quả backtest:
Chart 1 phút, vốn ban đầu là 100 triệu đồng, vào 4 hợp đồng mỗi lần, kết quả backtest từ tháng 1/2024 tới tháng 11/2024 mang lại lợi nhuận trên 40%, thực hiện hơn 1.000 giao dịch (trung bình 4 giao dịch/ngày), tỷ lệ giao dịch thắng ~ 30% với hệ số lợi nhuận là 1,10.
Thiết lập mặc định của chiến lược:
Đạt được một mức tối ưu ổn khi SMA và EMA periods được đặt lần lượt là 60 và 15 trong khi mức cắt lỗ được đặt thành 20 tick (2 điểm) từ giá vào.
Điều kiện Mở và Đóng vị thế:
Tín hiệu Long được tạo ra khi ema(15) cắt trên sma(60) trong khi tín hiệu Short xảy ra khi ema(15) cắt dưới sma(60). Lệnh Long được đóng khi ema(15) cắt dưới sma(60) trong khi lệnh Short được đóng khi ema(15) cắt lên sma(60).
Điều kiện đóng vị thể xảy ra khi (tùy điều kiện nào đến trước):
Một tín hiệu Long/Short khác được tạo ra
Giá chạm mức cắt lỗ
Lệnh chưa đóng nhưng tới giờ cut-off (14:25 hàng ngày)
*Tuyên bố miễn trừ trách nhiệm:
Giao dịch hợp đồng tương lai có mức rủi ro cao và giá có thể dao động đáng kể. Chiến lược này hoạt động như một nguồn tham khảo và nên được sử dụng sau khi người dùng đã hiểu rõ cách thức giao dịch hợp đồng tương lai, đã đánh giá mức độ chấp nhận rủi ro của bản thân và hiểu rõ về logic vận hành của chiến lược này.
Người dùng hoàn toàn chịu trách nhiệm về các quyết định đầu tư của mình và DNSE không chịu trách nhiệm về bất kỳ khoản lỗ tiềm ẩn nào khi áp dụng chiến lược này vào các hoạt động giao dịch thực tế. Hiệu suất trong quá khứ không chỉ ra/cam kết kết quả trong tương lai, vui lòng liên hệ với chúng tôi nếu bạn có thắc mắc cụ thể về chiến lược giao dịch này.
Gold Friday Anomaly StrategyThis script implements the " Gold Friday Anomaly Strategy ," a well-known historical trading strategy that leverages the gold market's behavior from Thursday evening to Friday close. It is a backtesting-focused strategy designed to assess the historical performance of this pattern. Traders use this anomaly as it captures a recurring market tendency observed over the years.
What It Does:
Entry Condition: The strategy enters a long position at the beginning of the Friday trading session (Thursday evening close) within the defined backtesting period.
Exit Condition: Friday evening close.
Backtesting Controls: Allows users to set custom backtesting periods to evaluate strategy performance over specific date ranges.
Key Features:
Custom Backtest Periods: Easily configurable inputs to set the start and end date of the backtesting range.
Fixed Slippage and Commission Settings: Ensures realistic simulation of trading conditions.
Process Orders on Close: Backtesting is optimized by processing orders at the bar's close.
Important Notes:
Backtesting Only: This script is intended purely for backtesting purposes. Past performance is not indicative of future results.
Live Trading Recommendations: For live trading, it is highly recommended to use limit orders instead of market orders, especially during evening sessions, as market order slippage can be significant.
Default Settings:
Entry size: 10% of equity per trade.
Slippage: 1 tick.
Commission: 0.05% per trade.
Bollinger Breakout Strategy with Direction Control [4H crypto]Bollinger Breakout Strategy with Direction Control - User Guide
This strategy leverages Bollinger Bands, RSI, and directional filters to identify potential breakout trading opportunities. It is designed for traders looking to capitalize on significant price movements while maintaining control over trade direction (long, short, or both). Here’s how to use this strategy effectively:
How the Strategy Works
Indicators Used:
Bollinger Bands:
A volatility-based indicator with an upper and lower band around a simple moving average (SMA). The bands expand or contract based on market volatility.
RSI (Relative Strength Index):
Measures momentum to determine overbought or oversold conditions. In this strategy, RSI is used to confirm breakout strength.
Trade Direction Control:
You can select whether to trade:
Long only: Buy positions.
Short only: Sell positions.
Both: Trade in both directions depending on conditions.
Breakout Conditions:
Long Trade:
The price closes above the upper Bollinger Band.
RSI is above the midline (50), confirming upward momentum.
The "Trade Direction" setting allows either "Long" or "Both."
Short Trade:
The price closes below the lower Bollinger Band.
RSI is below the midline (50), confirming downward momentum.
The "Trade Direction" setting allows either "Short" or "Both."
Risk Management:
Stop-Loss:
Long trades: Set at 2% below the entry price.
Short trades: Set at 2% above the entry price.
Take-Profit:
Calculated using a Risk/Reward Ratio (default is 2:1).
Adjust this in the strategy settings.
Inputs and Customization
Key Parameters:
Bollinger Bands Length: Default is 20. Adjust based on the desired sensitivity.
Multiplier: Default is 2.0. Higher values widen the bands; lower values narrow them.
RSI Length: Default is 14, which is standard for RSI.
Risk/Reward Ratio: Default is 2.0. Increase for more aggressive profit targets, decrease for conservative exits.
Trade Direction:
Options: "Long," "Short," or "Both."
Example: Set to "Long" in a bullish market to focus only on buy trades.
How to Use This Strategy
Adding the Strategy:
Paste the script into TradingView’s Pine Editor and add it to your chart.
Setting Parameters:
Adjust the Bollinger Band settings, RSI, and Risk/Reward Ratio to fit the asset and timeframe you're trading.
Analyzing Signals:
Green line (Upper Band): Signals breakout potential for long trades.
Red line (Lower Band): Signals breakout potential for short trades.
Blue line (Basis): Central Bollinger Band (SMA), helpful for understanding price trends.
Testing the Strategy:
Use the Strategy Tester in TradingView to backtest performance on your chosen asset and timeframe.
Optimizing for Assets:
Forex pairs, cryptocurrencies (like BTC), or stocks with high volatility are ideal for this strategy.
Works best on higher timeframes like 4H or Daily.
Best Practices
Combine with Volume: Confirm breakouts with increased volume for higher reliability.
Avoid Sideways Markets: Use additional trend filters (like ADX) to avoid trades in low-volatility conditions.
Optimize Parameters: Regularly adjust the Bollinger Bands multiplier and RSI settings to match the asset's behavior.
By utilizing this strategy, you can effectively trade breakouts while maintaining flexibility in trade direction. Adjust the parameters to match your trading style and market conditions for optimal results!
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
Kairos StrategyKairos meaning: The right or critical moment
Overview
Kairos Strategy combines multiple technical indicators and filters to create a robust framework for identifying, confirming, and managing trade entries in both trending and ranging markets. The strategy's core revolves around Hull Moving Average (HMA) variants for primary trend detection, supported by VWMA, SMMA, and ZLSMA for precision in signal confirmation. The integration of Parabolic SAR, ATR-based Stop Loss, and RSI filters ensures accurate entry points and risk control. This multi-layered approach provides flexibility and reliability across timeframes and market conditions.
Methodology
The Kairos Strategy employs a systematic approach to analyze market dynamics:
Primary Trend Identification
The Hull Moving Average (HMA) and its variants (THMA and EHMA) detect major trends.
Users can adjust sources like VWMA, SMMA, and ZLSMA for improved accuracy and trend clarity.
Multi-Indicator Integration
Parabolic SAR signals align with price direction to identify actionable trade zones.
RSI Filters ensure trades occur during optimal momentum conditions, avoiding overbought/oversold areas.
Dynamic Risk Management
ATR-based Stop Loss adapts to volatility, ensuring proper risk/reward ratios.
A customizable trailing stop follows price movements, locking profits while minimizing risk.
Signal Filtering
To enhance reliability, entries are validated by avoiding conditions where price interacts directly with the moving averages.
Customization and Flexibility
The Kairos Strategy empowers traders to adapt to different trading styles and market environments through an array of customizable settings. Each component of the strategy is fine-tuned for flexibility and precision, ensuring it meets the diverse needs of its users.
Configurable Indicators and Sources
Select from multiple moving average options, including LSMA, VWMA, SMMA, VAMA, and ZLSMA, for trend identification and crossover signals.
Adjust the length, smoothing type, and multiplier settings for each indicator to suit various market conditions and timeframes.
Incorporate higher timeframes for broader trend validation without sacrificing detail on lower timeframes.
Risk-Reward Optimization
Define distinct risk-reward ratios for both long and short trades, allowing for tailored approaches to each market scenario.
Enable ATR-based stop-loss calculations for adaptive risk management that responds to market volatility.
Utilize bar-based stop-loss levels for simpler, price-action-driven risk placement.
Strategy Logic
The Kairos Strategy's multi-layered logic is designed to maximize trading opportunities while minimizing false signals:
Entry Conditions
Crossover Signals: The strategy identifies buy or sell signals when a selected moving average crosses over the Hull MA in the direction of the trend.
Momentum Validation: RSI filters ensure that entries are aligned with favorable momentum conditions, reducing exposure to false signals during choppy markets.
Trend Alignment: Parabolic SAR confirms that entries align with the current price trend, adding an additional layer of validation.
Price Interaction Check: The strategy avoids signals when price touches key levels, such as the moving averages or crossover sources, ensuring cleaner entries.
Exit Conditions
Stop-Loss Placement: Choose between ATR-based or bar-based stop-loss calculations, ensuring exits are optimized for risk control.
Take-Profit Targets: Automatically calculated based on customizable risk-reward ratios, providing a consistent framework for locking in gains.
Trailing Stops: Optional trailing stops dynamically adjust with price movement, preserving profits as trends evolve.
Key Benefits
Versatility Across Markets: Effective in both trending and ranging conditions, with settings adaptable to any trading style.
Enhanced Signal Accuracy: Multi-indicator validation and dynamic filtering reduce noise and improve entry timing.
Robust Risk Management: Advanced stop-loss and risk-reward configurations safeguard capital while optimizing trade potential.
User-Friendly Interface: Intuitive settings and customizable visuals make the strategy accessible to both novice and experienced traders.
Use Cases
Trend Trading: Utilize the Hull MA and its variants to capture long-term trends with precision and confidence.
Scalping: Leverage shorter timeframes and the strategy's adaptive indicators for quick, high-frequency trades.
Swing Trading: Combine multi-timeframe analysis and dynamic stop-loss settings to capture medium-term market moves.
Backtest Results
Symbol: BTCUSDT.P Bitcoin / TetherUS PREPERTUAL CONTRACT Binance
Timeframe: 1h
Operating window: Date range of backtests is 2022.01.08 - 2024.11.26. It is chosen to let the strategy to close all opened positions.
Commission and Slippage: Includes a standard Binance commission of 0.07% and accounts for possible slippage over 5 ticks.
Initial capital: 1000 USDT
Percent of capital used in every trade: 100 USDT on 30x leverage = 3000 USDT
Maximum Single Profit: 463.95 USDT
Maximum Single Position Loss: 219.34 USDT
Net Profit: +7,302.60 USDT (730.26%)
Total Trades: 156 (52.56% Win rate)
Profit Factor: 2.443
Maximum Drawdown: 640.29 USDT (-29.65%)
Average Profit per Trade: 46.81 USDT (+1.56%)
I recommend this strategy for leverage trading, that's why the trading properties are set this way!
Disclaimer
This tool is designed for educational and informational purposes, reflecting Kairos dedication to empowering traders with knowledge. Keep in mind that past performance is not indicative of future results. Always test strategies in a simulated environment before applying them in live markets.
Supertrend and MACD strategyThe Supertrend and MACD Strategy is a comprehensive trading approach designed to capitalize on market trends by using a combination of the Supertrend indicator, the Exponential Moving Average (EMA), and the Moving Average Convergence Divergence (MACD). This strategy aims to identify optimal entry and exit points for both long and short trades, while incorporating strict risk management rules.
Indicators Used:
Supertrend: This indicator is used to identify the overall trend direction. It provides clear signals for trend reversals, helping traders to enter trades in the direction of the prevailing trend.
200-period EMA: This long-term moving average is used to determine the primary trend direction. The strategy only takes long trades when the price is above the 200 EMA and short trades when the price is below it.
MACD: The MACD is used to gauge the momentum and confirm the signals provided by the Supertrend and EMA. It consists of the MACD line, the signal line, and the histogram.
Entry Conditions:
Long Entry:
The Supertrend indicator shows an uptrend (direction > 0).
The MACD line is above the signal line (macd > signal).
The price is above the 200-period EMA (close > ema200).
Short Entry:
The Supertrend indicator shows a downtrend (direction < 0).
The MACD line is below the signal line (macd < signal).
The price is below the 200-period EMA (close < ema200).
Exit Conditions:
Long Exit:
Exit the long position when the MACD line crosses below the signal line (ta.crossunder(macd, signal)).
Set a stop loss (SL) below the lowest low of the last 10 periods (lowestLow - 1).
Short Exit:
Exit the short position when the MACD line crosses above the signal line (ta.crossover(macd, signal)).
Set a stop loss (SL) above the highest high of the last 10 periods (highestHigh + 1).
Risk Management:
The strategy ensures that no new positions are opened if there is already an open trade, preventing overexposure in the market.
Alerts:
Alerts are set to notify traders when the MACD crosses the signal line, providing timely updates for potential exit points.
Triple CCI Strategy MFI Confirmed [Skyrexio]Overview
Triple CCI Strategy MFI Confirmed leverages 3 different periods Commodity Channel Index (CCI) indicator in conjunction Money Flow Index (MFI) and Exponential Moving Average (EMA) to obtain the high probability setups. Fast period CCI is used for having the high probability to enter in the direction of short term trend, middle and slow period CCI are used for confirmation, if market now likely in the mid and long-term uptrend. MFI is used to confirm trade with the money inflow/outflow with the high probability. EMA is used as an additional trend filter. Moreover, strategy uses exponential moving average (EMA) to trail the price when it reaches the specific level. More information in "Methodology" and "Justification of Methodology" paragraphs. The strategy opens only long trades.
Unique Features
Dynamic stop-loss system: Instead of fixed stop-loss level strategy utilizes average true range (ATR) multiplied by user given number subtracted from the position entry price as a dynamic stop loss level.
Configurable Trading Periods: Users can tailor the strategy to specific market windows, adapting to different market conditions.
Four layers trade filtering system: Strategy utilizes two different period CCI indicators, MFI and EMA indicators to confirm the signals produced by fast period CCI.
Trailing take profit level: After reaching the trailing profit activation level scrip activate the trailing of long trade using EMA. More information in methodology.
Methodology
The strategy opens long trade when the following price met the conditions:
Fast period CCI shall crossover the zero-line.
Slow and Middle period CCI shall be above zero-lines.
Price shall close above the EMA. Crossover is not obligatory
MFI shall be above 50
When long trade is executed, strategy set the stop-loss level at the price ATR multiplied by user-given value below the entry price. This level is recalculated on every next candle close, adjusting to the current market volatility.
At the same time strategy set up the trailing stop validation level. When the price crosses the level equals entry price plus ATR multiplied by user-given value script starts to trail the price with EMA. If price closes below EMA long trade is closed. When the trailing starts, script prints the label “Trailing Activated”.
Strategy settings
In the inputs window user can setup the following strategy settings:
ATR Stop Loss (by default = 1.75)
ATR Trailing Profit Activation Level (by default = 2.25)
CCI Fast Length (by default = 14, used for calculation short term period CCI)
CCI Middle Length (by default = 25, used for calculation short term period CCI)
CCI Slow Length (by default = 50, used for calculation long term period CCI)
MFI Length (by default = 14, used for calculation MFI
EMA Length (by default = 50, period of EMA, used for trend filtering EMA calculation)
Trailing EMA Length (by default = 20)
User can choose the optimal parameters during backtesting on certain price chart.
Justification of Methodology
Before understanding why this particular combination of indicator has been chosen let's briefly explain what is CCI, MFI and EMA.
The Commodity Channel Index (CCI) is a momentum-based technical indicator that measures the deviation of a security's price from its average price over a specific period. It helps traders identify overbought or oversold conditions and potential trend reversals.
The CCI formula is:
CCI = (Typical Price − SMA) / (0.015 × Mean Deviation)
Typical Price (TP): This is calculated as the average of the high, low, and closing prices for the period.
Simple Moving Average (SMA): This is the average of the Typical Prices over a specific number of periods.
Mean Deviation: This is the average of the absolute differences between the Typical Price and the SMA.
The result is a value that typically fluctuates between +100 and -100, though it is not bounded and can go higher or lower depending on the price movement.
The Money Flow Index (MFI) is a technical indicator that measures the strength of money flowing into and out of a security. It combines price and volume data to assess buying and selling pressure and is often used to identify overbought or oversold conditions. The formula for MFI involves several steps:
1. Calculate the Typical Price (TP):
TP = (high + low + close) / 3
2. Calculate the Raw Money Flow (RMF):
Raw Money Flow = TP × Volume
3. Determine Positive and Negative Money Flow:
If the current TP is greater than the previous TP, it's Positive Money Flow.
If the current TP is less than the previous TP, it's Negative Money Flow.
4. Calculate the Money Flow Ratio (MFR):
Money Flow Ratio = Sum of Positive Money Flow (over n periods) / Sum of Negative Money Flow (over n periods)
5. Calculate the Money Flow Index (MFI):
MFI = 100 − (100 / (1 + Money Flow Ratio))
MFI above 80 can be considered as overbought, below 20 - oversold.
The Exponential Moving Average (EMA) is a type of moving average that places greater weight and significance on the most recent data points. It is widely used in technical analysis to smooth price data and identify trends more quickly than the Simple Moving Average (SMA).
Formula:
1. Calculate the multiplier
Multiplier = 2 / (n + 1) , Where n is the number of periods.
2. EMA Calculation
EMA = (Current Price) × Multiplier + (Previous EMA) × (1 − Multiplier)
This strategy leverages Fast period CCI, which shall break the zero line to the upside to say that probability of short term trend change to the upside increased. This zero line crossover shall be confirmed by the Middle and Slow periods CCI Indicators. At the moment of breakout these two CCIs shall be above 0, indicating that there is a high probability that price is in middle and long term uptrend. This approach increases chances to have a long trade setup in the direction of mid-term and long-term trends when the short-term trend starts to reverse to the upside.
Additionally strategy uses MFI to have a greater probability that fast CCI breakout is confirmed by this indicator. We consider the values of MFI above 50 as a higher probability that trend change from downtrend to the uptrend is real. Script opens long trades only if MFI is above 50. As you already know from the MFI description, it incorporates volume in its calculation, therefore we have another one confirmation factor.
Finally, strategy uses EMA an additional 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.
ATR is used to adjust the strategy risk management to the current market volatility. If volatility is low, we don’t need the large stop loss to understand the there is a high probability that we made a mistake opening the trade. User can setup the settings ATR Stop Loss and ATR Trailing Profit Activation Level to realize his own risk to reward preferences, but the unique feature of a strategy is that after reaching trailing profit activation level strategy is trying to follow the trend until it is likely to be finished instead of using fixed risk management settings. It allows sometimes to be involved in the large movements. It’s also important to make a note, that script uses another one EMA (by default = 20 period) as a trailing profit level.
Backtest Results
Operating window: Date range of backtests is 2022.04.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: 50%
Maximum Single Position Loss: -4.13%
Maximum Single Profit: +19.66%
Net Profit: +5421.21 USDT (+54.21%)
Total Trades: 108 (44.44% win rate)
Profit Factor: 2.006
Maximum Accumulated Loss: 777.40 USDT (-7.77%)
Average Profit per Trade: 50.20 USDT (+0.85%)
Average Trade Duration: 44 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 2h 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
BTCUSD Momentum After Abnormal DaysThis indicator identifies abnormal days in the Bitcoin market (BTCUSD) based on daily returns exceeding specific thresholds defined by a statistical approach. It is inspired by the findings of Caporale and Plastun (2020), who analyzed the cryptocurrency market's inefficiencies and identified exploitable patterns, particularly around abnormal returns.
Key Concept:
Abnormal Days:
Days where the daily return significantly deviates (positively or negatively) from the historical average.
Positive abnormal days: Returns exceed the mean return plus k times the standard deviation.
Negative abnormal days: Returns fall below the mean return minus k times the standard deviation.
Momentum Effect:
As described in the academic paper, on abnormal days, prices tend to move in the direction of the abnormal return until the end of the trading day, creating momentum effects. This can be leveraged by traders for profit opportunities.
How It Works:
Calculation:
The script calculates the daily return as the percentage difference between the open and close prices. It then derives the mean and standard deviation of returns over a configurable lookback period.
Thresholds:
The script dynamically computes upper and lower thresholds for abnormal days using the mean and standard deviation. Days exceeding these thresholds are flagged as abnormal.
Visualization:
The mean return and thresholds are plotted as dynamic lines.
Abnormal days are visually highlighted with transparent green (positive) or red (negative) backgrounds on the chart.
References:
This indicator is based on the methodology discussed in "Momentum Effects in the Cryptocurrency Market After One-Day Abnormal Returns" by Caporale and Plastun (2020). Their research demonstrates that hourly returns during abnormal days exhibit a strong momentum effect, moving in the same direction as the abnormal return. This behavior contradicts the efficient market hypothesis and suggests profitable trading opportunities.
"Prices tend to move in the direction of abnormal returns till the end of the day, which implies the existence of a momentum effect on that day giving rise to exploitable profit opportunities" (Caporale & Plastun, 2020).
SMA Buy/Sell Strategy with Significant Slope and Dynamic TP/SLDescription:
This strategy uses a simple moving average (SMA) to detect trading opportunities based on the slope and proximity of price action. It ensures trades are only executed during significant trends, reducing false signals caused by sideways movements. The strategy incorporates dynamic risk management with an initial ambitious Take Profit (TP) and a Trailing Stop Loss (SL) to protect profits.
Key Features:
Trend Detection with SMA:
Two SMAs are calculated: one on High values and one on Low values.
Signals are generated when the price crosses these SMAs, ensuring:
Buy: Price closes above the SMA on High, with a significant upward slope.
Sell: Price closes below the SMA on Low, with a significant downward slope.
Slope Significance Check:
The slope of the SMA is calculated over a configurable period.
Only trends with a slope variation exceeding a user-defined percentage threshold are considered significant.
Dynamic Risk Management:
Ambitious Initial TP: Positions target a high percentage gain upon entry.
Trailing SL: Automatically adjusts as the price moves in favor of the trade, locking in profits.
Automatic Position Management:
Opposing signals close existing positions to avoid conflicting trades.
Configurable position size for risk control.
Parameters:
SMA Period: Number of candles for calculating the SMA.
Initial Take Profit (%): Percentage gain for the initial TP.
Trailing Stop Loss (%): Percentage for trailing SL based on the current price.
Slope Threshold (%): Minimum percentage change in SMA slope to confirm trend significance.
How It Works:
Buy Signal:
The price closes above the SMA on High values.
The slope of the SMA (on High) is positive and exceeds the slope threshold.
Sell Signal:
The price closes below the SMA on Low values.
The slope of the SMA (on Low) is negative and exceeds the slope threshold.
Exits:
A position closes at the Take Profit level, Trailing Stop Loss, or when an opposing signal is generated.
Use Case:
This strategy is ideal for trending markets where price action respects moving averages. It can be used on any timeframe or asset but is particularly effective in markets with clear directional movements.
Recommended Settings:
Timeframe: Works well on higher timeframes (e.g., 1H, 4H, Daily).
Slope Threshold (%): Default is 5%, adjust based on market volatility.
Initial TP and Trailing SL: Tailor to your risk/reward preferences.
By utilizing this strategy, traders can capitalize on significant market trends while dynamically managing risk. Test it on historical data to optimize the parameters for your preferred market!
Breaks and Retests - Free990Strategy Description: "Breaks and Retests - Free990"
The "Breaks and Retests - Free990" strategy is based on identifying breakout and retest opportunities for potential entries in both long and short trades. The idea is to detect price breakouts above resistance levels or below support levels, and subsequently identify retests that confirm the breakout levels. The strategy offers an automated approach to enter trades after a breakout followed by a retest, which serves as a confirmation of trend continuation.
Key Components:
Support and Resistance Detection:
The strategy calculates pivot levels based on historical price movements to define support and resistance areas. A lookback range is used to determine these key levels.
Breakouts and Retests:
The system identifies when a breakout occurs above a resistance level or below a support level.
It then waits for a retest of the previously broken level as confirmation, which is often a better entry opportunity.
Trade Direction Selection:
Users can choose between "Long Only," "Short Only," or "Both" directions for trading based on their market view.
Stop Loss and Trailing Stop:
An initial stop loss is placed at a defined percentage away from the entry.
The trailing stop loss is activated after the position gains a specified percentage in profit.
Long Entry:
A long entry is triggered if the price breaks above a resistance level and subsequently retests that level successfully.
The entry condition checks if the breakout was confirmed and if a retest was valid.
The long entry is only executed if the user-selected direction is either "Long Only" or "Both."
Short Entry:
A short entry is triggered if the price breaks below a support level and subsequently retests that level.
The short entry is only executed if the user-selected direction is either "Short Only" or "Both."
sell_condition checks whether the support has been broken and whether the retest condition is valid.
An initial stop loss is placed when the trade is opened to limit the risk if the trade moves against the position.
The stop loss is calculated based on a user-defined percentage (stop_loss_percent) of the entry price.
pinescript
Copy code
stop_loss_price := strategy.position_avg_price * (1 - stop_loss_percent / 100)
For long positions, the stop loss is placed below the entry price.
For short positions, the stop loss is placed above the entry price.
Trailing Stop:
When a position achieves a certain profit threshold (profit_threshold_percent), the trailing stop mechanism is activated.
For long positions, the trailing stop follows the highest price reached, ensuring that some profit is locked in if the price reverses.
For short positions, the trailing stop follows the lowest price reached.
Code Logic for Trailing Stop:
Exit Execution:
The strategy exits the position when the price hits the calculated stop loss level.
This includes both the initial stop loss and the trailing stop that adjusts as the trade progresses.
Code Logic for Exit:
Summary:
Breaks and Retests - Free990 uses support and resistance levels to identify breakouts, followed by retests for confirmation.
Entry Points: Triggered when a breakout is confirmed and a retest occurs, for both long and short trades.
Exit Points:
Initial Stop Loss: Limits risk for both long and short trades.
Trailing Stop Loss: Locks in profits as the price moves in favor of the position.
This strategy aims to capture the momentum after breakouts and minimize losses through effective use of stop loss and trailing stops. It gives the flexibility of selecting trade direction and ensures trades are taken with confirmation through the retest, which helps to reduce false breakouts.
Original Code by @HoanGhetti
30-Minute Candle Strategy30-Minute Candle Trading Strategy
This strategy works on a 30-minute candle timeframe. When a new 30-minute candle opens, the following actions will take place based on the previous 30-minute candle's closing price:
Buy Trade Setup:
If the market opens above the previous 30-minute candle's closing price, a buy trade will be executed immediately at the market price.
The stop-loss will be set at the previous 30-minute candle's closing price.
There will be no fixed target.
The trade will be closed 1 minute before the current 30-minute candle closes, regardless of profit or loss.
Sell Trade Setup:
If a buy trade hits the stop-loss and the market moves below the previous 30-minute candle's closing price, a sell trade will be executed immediately at the market price.
The stop-loss for the sell trade will also be set at the previous 30-minute candle's closing price.
There will be no fixed target.
The trade will be closed 1 minute before the current 30-minute candle closes, regardless of profit or loss.
Procedure:
This process will repeat for every 30-minute candle.
If the market crosses the previous 30-minute candle's closing price to the upside, a buy trade will be executed, and the stop-loss will be set at the previous candle's closing price.
If the market crosses the previous 30-minute candle's closing price to the downside, a sell trade will be executed, and the stop-loss will also be set at the previous candle's closing price.
Each trade will be closed 1 minute before the current candle closes.
Key Points:
This strategy applies to every new 30-minute candle.
The stop-loss will always be based on the previous 30-minute candle's closing price.
If a stop-loss is hit, the strategy will automatically switch to the opposite trade (buy to sell or sell to buy) based on market movement crossing the previous candle's closing price.
This is a repetitive and systematic approach to trading, ensuring the rules are followed for every 30-minute candle.
BTC Seasonality Strategy (Weekly)This strategy identifies potential weekend opportunities in Bitcoin (BTC) markets by leveraging the concept of seasonality, entering a position at a predefined time and day, and exiting at a specified time and day.
Key Features
Customizable Time and Day Selection:
Users can select the entry and exit days and corresponding times (in EST).
Directional Flexibility:
The strategy allows traders to choose between long or short positions.
TradingView Compliance:
The script adheres to TradingView's house rules, avoids overly complex conditions, and provides clear user-configurable inputs.
How It Works
The script determines the current weekday and hour in EST, converting TradingView's UTC time for accurate comparisons.
If the current day and hour match the selected entry conditions, a trade (long or short) is opened.
The position is closed when the current day and hour match the specified exit conditions.
Theoretical Basis
Market Seasonality:
The concept of seasonality in financial markets refers to predictable patterns based on time, such as weekends or specific days of the week. Studies have shown that cryptocurrency markets exhibit unique trading behaviors during weekends due to reduced institutional activity and higher retail participation behavioral Biases**:
Retail traders often dominate weekend markets, potentially causing predictable inefficiencies .
Reverences**
Baur, D. G., Hong, K., & Lee, A. D. (2018). Bitcoin: Medium of exchange or speculative assets? Journal of International Financial Markets, Institutions and Money, 54, 177–189.
Urquhart, A. (2016). The inefficiency of Bitcoin. Economics Letters, 148, 80–82.
RSI Strategy With TP/SL - Lower TFThis Pine Script strategy integrates the Relative Strength Index (RSI) for trade signals with user-defined Take Profit (TP) and Stop Loss (SL) levels. It's designed for flexible application in different market conditions, offering long, short, or dual-direction trading.
Short Description
The strategy uses the RSI to identify overbought and oversold market conditions:
Buy signal: When RSI drops below the specified "Buy Level."
Sell signal: When RSI rises above the "Sell Level."
Additionally, it manages risk and profit targets with:
Take Profit (TP): Exits trades when the price reaches a percentage gain.
Stop Loss (SL): Exits trades to limit losses if the price falls by a certain percentage.
The strategy is versatile and includes options for visualizing performance, monthly profit/loss data, and detailed trade metrics.
How to Use
Set Parameters:
RSI Period: Default is 14. Adjust based on your analysis.
RSI Buy/Sell Levels:
Buy Level: Default is 40. Consider higher levels for conservative entries.
Sell Level: Default is 60. Lower this for earlier exits.
Take Profit (%): Set your profit target (default: 5%).
Stop Loss (%): Set your risk tolerance (default: 2%).
Trade Direction: Choose "Long Only," "Short Only," or "Both."
Interpret Signals:
Buy signals appear when RSI crosses below the buy threshold.
Sell signals appear when RSI crosses above the sell threshold.
Risk Management:
The strategy dynamically calculates TP and SL levels for each trade.
TP/SL is applied using the percentage input based on the entry price.
Monitor Performance:
Review trade statistics in the "Strategy Tester."
Use the monthly performance table to track P/L across months.
Customize Alerts:
Alerts for buy, sell, TP, and SL events can be used to automate notifications.
Key Features
Configurable RSI Settings: Adaptable to various market conditions.
Risk Management: Built-in TP and SL management.
Customizable Trade Direction: Tailored for long-only, short-only, or both directions.
Monthly P/L Table: Visualizes performance trends over time.
Alerts: Notifies when critical trade events occur.
Please do your own research before ase this to your real trading.
16. SMC Strategy with SL - low TimeframeOverview
The "SMC Strategy with SL - low Timeframe" is a comprehensive trading strategy that uses key concepts from Smart Money Theory to identify favorable areas in the market for buying or selling. This strategy takes advantage of price imbalances, support and resistance zones, and swing highs/lows to generate high-probability trade signals.
The key features of this strategy include:
Swing High/Low Analysis: Used to determine the Premium, Equilibrium, and Discount Zones.
Order Block Integration: An added layer of confluence to identify valid buy and sell signals.
Trend Direction Confirmation: Using a Simple Moving Average (SMA) to determine the overall trend.
Entry and Exit Rules: Based on price position relative to key zones and moving average, along with optional stop-loss and take-profit levels.
Detailed Description
Swing High and Swing Low Analysis
The script calculates Swing High and Swing Low based on the most recent price highs and lows over a specified look-back period (swingHighLength and swingLowLength, set to 8 by default).
It then derives the Premium, Equilibrium, and Discount Zones:
Premium Zone: Represents potential resistance, calculated based on recent swing highs.
Discount Zone: Represents potential support, calculated based on recent swing lows.
Equilibrium: The midpoint between Swing High and Swing Low, dividing the price range into Premium (above equilibrium) and Discount (below equilibrium) areas.
Zone Visualization
The strategy plots the Premium Zone (resistance) in red, the Discount Zone (support) in green, and the Equilibrium level in blue on the chart. This helps visually assess the current price relative to these important areas.
Simple Moving Average (SMA)
A 50-period Simple Moving Average (SMA) is added to help identify the trend direction.
Buy signals are valid only if the price is above the SMA, indicating an uptrend.
Sell signals are valid only if the price is below the SMA, indicating a downtrend.
Entry Rules
The script generates buy or sell signals when certain conditions are met:
A buy signal is triggered when:
Price is below the Equilibrium and within the Discount Zone.
Price is above the SMA.
The buy signal is further confirmed by the presence of an Order Block (recent lowest price area).
A sell signal is triggered when:
Price is above the Equilibrium and within the Premium Zone.
Price is below the SMA.
The sell signal is further confirmed by the presence of an Order Block (recent highest price area).
Order Block
The strategy defines Order Blocks as recent highs and lows within a look-back period (orderBlockLength set to 20 by default).
These blocks represent areas where large players (smart money) have historically been active, increasing the probability of the price reacting in these areas again.
Trade Management and Trade Direction
The user can set Trade Direction to either "Long Only," "Short Only," or "Both." This allows the strategy to adapt based on market conditions or trading preferences.
Based on the Trade Direction, the strategy either:
Closes open trades that are against new signals.
Allows only specific directional trades (either long or short).
Stop-loss levels are defined based on a fixed percentage (stop_loss_percent), which helps to manage risk and minimize losses.
Exit Rules
The strategy uses stop-loss levels for risk management.
A stop-loss price is set at a fixed percentage below the entry price for long positions or above the entry price for short positions.
When the price hits the defined stop-loss level, the trade is closed.
Liquidity Zones
The script identifies recent Swing Highs and Lows as potential liquidity zones. These are levels where price could react strongly, as they represent areas of interest for large traders.
The liquidity zones are plotted as crosses on the chart, marking areas where price may encounter significant buying or selling pressure.
Visual Feedback
The script uses visual markers (green for buy signals and red for sell signals) to indicate potential entries on the chart.
It also plots liquidity zones to help traders identify areas where stop hunts and liquidity grabs might occur.
Monthly Performance Dashboard
The script includes a performance tracking feature that displays monthly profit and loss metrics on the chart.
This dashboard allows the trader to see a visual representation of trading performance over time, providing insights into profitability and consistency.
The table shows profit or loss for each month and year, allowing the user to track the overall success of the strategy.
Key Benefits
Smart Money Concepts (SMC): This strategy incorporates SMC principles like order blocks and liquidity zones, which are used by institutional traders to determine potential market moves.
Zone Analysis: The use of Premium, Discount, and Equilibrium zones provides a solid framework for determining where to enter and exit trades based on price discounts or premiums.
Confluence: Signals are not taken in isolation. They are confirmed by factors like trend direction (SMA) and order blocks, providing greater trade accuracy.
Risk Management: By integrating stop-loss functionality, traders can manage their risks effectively.
Visual Performance Metrics: The monthly and yearly performance dashboard gives valuable feedback on how well the strategy has performed historically.
Practical Use
Buy in Discount Zone: Traders would be looking to buy when the price is discounted relative to its recent range and is above the SMA, indicating an overall uptrend.
Sell in Premium Zone: Conversely, traders would be looking to sell when the price is at a premium relative to its recent range and below the SMA, indicating an overall downtrend.
Order Block Confirmation: Ensures that buying or selling is supported by historical price behavior at significant levels, providing confidence that the market is likely to react at these areas.
This strategy is designed to help traders take advantage of price inefficiencies and areas where institutional traders are likely to be active, increasing the odds of successful trades. By leveraging Smart Money concepts and strong technical confluence, it aims to provide high-probability trade setups.
Dual Strategy Selector V2 - CryptogyaniOverview:
This script provides traders with a dual-strategy system that they can toggle between using a simple dropdown menu in the input settings. It is designed to cater to different trading styles and needs, offering both simplicity and advanced filtering techniques. The strategies are built around moving average crossovers, enhanced by configurable risk management tools like take profit levels, trailing stops, and ATR-based stop-loss.
Key Features:
Two Strategies in One Script:
Strategy 1: A classic moving average crossover strategy for identifying entry signals based on trend reversals. Includes user-defined take profit and trailing stop-loss options for profit locking.
Strategy 2: An advanced trend-following system that incorporates:
A higher timeframe trend filter to confirm entry signals.
ATR-based stop-loss for dynamic risk management.
Configurable partial take profit to secure gains while letting the trade run.
Highly Customizable:
All key parameters such as SMA lengths, take profit levels, ATR multiplier, and timeframe for the trend filter are adjustable via the input settings.
Dynamic Toggle:
Traders can switch between Strategy 1 and Strategy 2 with a single dropdown, allowing them to adapt the strategy to market conditions.
How It Works:
Strategy 1:
Entry Logic: A long trade is triggered when the fast SMA crosses above the slow SMA.
Exit Logic: The trade exits at either a user-defined take profit level (percentage or pips) or via an optional trailing stop that dynamically adjusts based on price movement.
Strategy 2:
Entry Logic: Builds on the SMA crossover logic but adds a higher timeframe trend filter to align trades with the broader market direction.
Risk Management:
ATR-Based Stop-Loss: Protects against adverse moves with a volatility-adjusted stop-loss.
Partial Take Profit: Allows traders to secure a percentage of gains while keeping some exposure for extended trends.
How to Use:
Select Your Strategy:
Use the dropdown in the input settings to choose Strategy 1 or Strategy 2.
Configure Parameters:
Adjust SMA lengths, take profit, and risk management settings to align with your trading style.
For Strategy 2, specify the higher timeframe for trend filtering.
Deploy and Monitor:
Apply the script to your preferred asset and timeframe.
Use the backtest results to fine-tune settings for optimal performance.
Why Choose This Script?:
This script stands out due to its dual-strategy flexibility and enhanced features:
For beginners: Strategy 1 provides a simple yet effective trend-following system with minimal setup.
For advanced traders: Strategy 2 includes powerful tools like trend filters and ATR-based stop-loss, making it ideal for challenging market conditions.
By combining simplicity with advanced features, this script offers something for everyone while maintaining full transparency and user customization.
Default Settings:
Strategy 1:
Fast SMA: 21, Slow SMA: 49
Take Profit: 7% or 50 pips
Trailing Stop: Optional (disabled by default)
Strategy 2:
Fast SMA: 20, Slow SMA: 50
ATR Multiplier: 1.5
Partial Take Profit: 50%
Higher Timeframe: 1 Day (1D)
NUTJP CDC ActionZone 20241. Core Components of the Strategy
• Fast EMA and Slow EMA:
• The Fast EMA (shorter period) is more reactive to recent price changes.
• The Slow EMA (longer period) reacts slower and provides a smoother view of the overall trend.
• Relationship Between Fast EMA and Slow EMA:
• When the Fast EMA is above the Slow EMA, the market is considered Bullish.
• When the Fast EMA is below the Slow EMA, the market is considered Bearish.
2. Zones Based on Price and EMAs
The strategy defines six zones based on the position of the price, Fast EMA, and Slow EMA:
1. Green Zone (Buy):
• Bullish trend (Fast EMA > Slow EMA)
• Price is above the Fast EMA.
• Indicates a strong uptrend and suggests buying.
2. Blue and Light Blue Zones (Pre-Buy):
• Price is above the Fast EMA but below or near the Slow EMA.
• Represents potential bullish signals but not strong enough to trigger a buy.
3. Red Zone (Sell):
• Bearish trend (Fast EMA < Slow EMA)
• Price is below the Fast EMA.
• Indicates a strong downtrend and suggests selling or avoiding long trades.
4. Orange and Yellow Zones (Pre-Sell):
• Price is below the Fast EMA but above or near the Slow EMA.
• Represents potential bearish signals but not strong enough to trigger a sell.
These zones help traders visualize the market conditions and determine whether to buy, hold, or sell.
3. Buy and Sell Conditions
• Buy Condition:
A buy signal is triggered when:
• The price enters the Green Zone (Bullish trend and price > Fast EMA).
• It’s the first green candle after a non-green candle.
• Sell Condition:
A sell signal is triggered when:
• The price enters the Red Zone (Bearish trend and price < Fast EMA).
• It’s the first red candle after a non-red candle.
4. Trade Execution Logic
• Buy:
The strategy enters a long position (buy) when the above buy condition is met.
• Sell:
The strategy exits the long position when the sell condition is met.
Note: It doesn’t support short trades, meaning it doesn’t enter sell positions.
5. Momentum-Based Signals (Optional)
The indicator also includes momentum signals using Stochastic RSI to provide additional buy/sell signals:
• These are based on oversold and overbought levels of the Stochastic RSI.
• It filters signals depending on whether the trend is Bullish or Bearish.
6. Visual Features
The indicator is designed to make the trading zones and signals visually intuitive:
• Bar Colors:
Candlesticks are colored based on the current zone (e.g., Green for Buy, Red for Sell).
• EMA Lines:
The Fast EMA and Slow EMA are plotted, making it easy to see crossover points.
• Buy/Sell Signals:
Marked with shapes (e.g., circles) below/above bars for clarity.
7. Strategy Assumptions
• Trend-Following Nature:
This strategy assumes that trends persist. It works best in trending markets but might give false signals in ranging markets.
• Lagging Nature of EMAs:
As EMAs are lagging indicators, buy and sell signals may occur after significant moves have already begun or ended.
• Momentum Confirmation (Optional):
Adding momentum signals can help filter false signals, though it’s not part of the core logic.
8. Usage Recommendations
• Timeframes:
Works on various timeframes but may perform better on higher timeframes (e.g., 1H, Daily) to reduce noise.
• Markets:
Can be applied to stocks, forex, and cryptocurrencies.
• Backtesting and Optimization:
Before live trading, backtest the strategy with different EMA periods and other parameters to find optimal settings for your market and timeframe.
Skeleton Key LiteSkeleton Key Lite Strategy
Note : Every input, except for the API Alerts, depends on an external indicator to provide the necessary values for the strategy to function.
Definitions
Strategy Direction: The trading direction (long or short) as determined by an external source, such as an indicator.
Threshold Conditions:
- Enter Condition: Defines the condition for entering a trade.
- Exit Condition: Defines the condition for exiting a trade.
Stop Loss (SL):
- Trail SL: A trailing stop loss, dynamically updated during the trade.
- Basic SL: A static stop loss level.
- Emergency SL (ER SL): A fallback stop loss for extreme conditions.
- Max SL: The maximum risk tolerance in stop loss.
- Limit SL: A predefined stop loss that is executed as a limit order.
Take Profit (TP):
- Max TP: The maximum profit target for a trade.
- Limit TP: A predefined take profit level executed as a limit order.
API Alerts:
- API Entry: JSON-based configuration for sending entry signals.
- API Exit: JSON-based configuration for sending exit signals.
Broad Concept
The Skeleton Key Lite strategy script is designed to provide a generalized framework for orchestrating trade execution based on external indicators. It allows QuantAlchemy and others to encapsulate strategies into indicators, which can then be backtested and automated using this strategy script.
Inputs
Note : All inputs are dependent on external indicators for values except for the API Alerts.
Strategy Direction:
- Source: Direction signal from an external indicator.
- Options: `LONG` (`1`), `SHORT` (`-1`).
Trade Conditions:
- Enter: Source input, trigger for entry condition.
- Exit: Source input, trigger for exit condition.
Stops and Take Profits:
- Trail SL: Enable/disable dynamic trailing stop loss.
- Basic SL: Enable/disable static stop loss.
- Emergency SL: Enable/disable emergency stop loss.
- Max SL: Enable/disable maximum risk stop loss.
- Max TP: Enable/disable maximum take profit.
- Limit SL: Enable/disable predefined stop loss executed as a limit order.
- Limit TP: Enable/disable predefined take profit executed as a limit order.
Alerts:
- API Entry: Configurable JSON message for entry signals.
- API Exit: Configurable JSON message for exit signals.
How It Works
Trade Logic:
- Conditions for entering and exiting trades are evaluated based on the selected input sources.
Stop Loss and Take Profit Management:
- Multiple stop loss types (trailing, basic, emergency, etc.) and take profit levels are calculated dynamically during the trade entry. Trailing stop loss is updated during the trade based on the selected input.
API Alerts:
- Alerts are triggered using customizable JSON messages, which can be integrated with external trading systems or APIs.
Trade Execution:
- Enter: Initiates a new trade if entry conditions are met and there is no open position.
- Exit: Closes all trades if exit conditions are met or stop loss/take profit thresholds are hit.
Key Features
Customizable: Fully configurable entry and exit conditions based on external indicators.
Encapsulation: Integrates seamlessly with indicators, allowing strategies to be developed as indicator-based signals.
Comprehensive Risk Management:
- Multiple stop loss and take profit options.
- Emergency stop loss for unexpected conditions.
API Integration: Alerts are designed to interface with external systems for automation and monitoring.
Plots
The script plots key variables on the chart for better visualization:
Enter and Exit Signals:
- `enter`: Displays when the entry condition is triggered.
- `exit`: Displays when the exit condition is triggered.
Risk Management Levels:
- `trailSL`: Current trailing stop loss level.
- `basicSL`: Static stop loss level.
- `erSL`: Emergency stop loss level.
- `maxSL`: Maximum risk stop loss level.
Profit Management Levels:
- `maxTP`: Maximum take profit level.
- `limitTP`: Limit-based take profit level.
Limit Orders:
- `limitSL`: Limit-based stop loss level.
- `limitTP`: Limit-based take profit level.
Proposed Interpretations
Entry and Exit Points:
- Use the plotted signals (`enter`, `exit`) to analyze the trade entry and exit points visually.
Risk and Profit Levels:
- Monitor the stop loss (`SL`) and take profit (`TP`) levels to assess trade performance.
Dynamic Trail SL:
- Observe the `trailSL` to evaluate how the trailing stop adapts during the trade.
Limitations
Dependence on Indicators:
- This script relies on external indicators to provide signals for strategy execution.
No Indicator Included:
- Users must integrate an appropriate indicator for source inputs.
Back-Test Constraints:
- Back-testing results depend on the accuracy and design of the integrated indicators.
Final Thoughts
The Skeleton Key Lite strategy by QuantAlchemy provides a robust framework for automated trading by leveraging indicator-based signals. Its flexibility and comprehensive risk management make it a valuable tool for traders seeking to implement and backtest custom strategies.
Disclaimer
This script is for educational purposes only. Trading involves risk, and past performance does not guarantee future results. Use at your own discretion and risk.
ADX Breakout Strategy█ OVERVIEW
The ADX Breakout strategy leverages the Average Directional Index (ADX) to identify and execute breakout trades within specified trading sessions. Designed for the NQ and ES 30-minute charts, this strategy aims to capture significant price movements while managing risk through predefined stop losses and trade limits.
This strategy was taken from a strategy that was posted on YouTube. I would link the video, but I believe is is "against house rules".
█ CONCEPTS
The strategy is built upon the following key concepts:
ADX Indicator: Utilizes the ADX to gauge the strength of a trend. Trades are initiated when the ADX value is below a certain threshold, indicating potential for trend development.
Trade Session Management: Limits trading to specific hours to align with optimal market activity periods.
Risk Management: Implements a fixed dollar stop loss and restricts the number of trades per session to control exposure.
█ FEATURES
Customizable Stop Loss: Set your preferred stop loss amount to manage risk effectively.
Trade Session Configuration: Define the trading hours to focus on the most active market periods.
Entry Conditions: Enter long positions when the price breaks above the highest close in the lookback window and the ADX indicates potential trend strength.
Trade Limits: Restrict the number of trades per session to maintain disciplined trading.
Automated Exit: Automatically closes all positions at the end of the trading session to avoid overnight risk.
█ HOW TO USE
Configure Inputs :
Stop Loss ($): Set the maximum loss per trade.
Trade Session: Define the active trading hours.
Highest Lookback Window: Specify the number of bars to consider for the highest close.
Apply the Strategy :
Add the ADX Breakout strategy to your chart on TradingView.
Ensure you are using a 30-minute timeframe for optimal performance.
█ LIMITATIONS
Market Conditions: The strategy is optimized for trending markets and may underperform in sideways or highly volatile conditions.
Timeframe Specific: Designed specifically for 30-minute charts; performance may vary on different timeframes.
Single Asset Focus: Primarily tested on NQ and ES instruments; effectiveness on other symbols is not guaranteed.
█ DISCLAIMER
This ADX Breakout strategy is provided for educational and informational purposes only. It is not financial advice and should not be construed as such. Trading involves significant risk, and you may incur substantial losses. Always perform your own analysis and consider your financial situation before using this or any other trading strategy. The source material for this strategy is publicly available in the comments at the beginning of the code script. This strategy has been published openly for anyone to review and verify its methodology and performance.
Optimized Grid with KNN_2.0Strategy Overview
This strategy, named "Optimized Grid with KNN_2.0," is designed to optimize trading decisions using a combination of grid trading, K-Nearest Neighbors (KNN) algorithm, and a greedy algorithm. The strategy aims to maximize profits by dynamically adjusting entry and exit thresholds based on market conditions and historical data.
Key Components
Grid Trading:
The strategy uses a grid-based approach to place buy and sell orders at predefined price levels. This helps in capturing profits from market fluctuations.
K-Nearest Neighbors (KNN) Algorithm:
The KNN algorithm is used to optimize entry and exit points based on historical price data. It identifies the nearest neighbors (similar price movements) and adjusts the thresholds accordingly.
Greedy Algorithm:
The greedy algorithm is employed to dynamically adjust the stop-loss and take-profit levels. It ensures that the strategy captures maximum profits by adjusting thresholds based on recent price changes.
Detailed Explanation
Grid Trading:
The strategy defines a grid of price levels where buy and sell orders are placed. The openTh and closeTh parameters determine the thresholds for opening and closing positions.
The t3_fast and t3_slow indicators are used to generate trading signals based on the crossover and crossunder of these indicators.
KNN Algorithm:
The KNN algorithm is used to find the nearest neighbors (similar price movements) in the historical data. It calculates the distance between the current price and historical prices to identify the most similar price movements.
The algorithm then adjusts the entry and exit thresholds based on the average change in price of the nearest neighbors.
Greedy Algorithm:
The greedy algorithm dynamically adjusts the stop-loss and take-profit levels based on recent price changes. It ensures that the strategy captures maximum profits by adjusting thresholds in real-time.
The algorithm uses the average_change variable to calculate the average price change of the nearest neighbors and adjusts the thresholds accordingly.