Heikin Ashi with WMA/EMA, Target, Stoploss, and Trailing Stop 22If you continue to experience the "Undeclared identifier 'label'" error, an alternative approach is to use the plotshape function instead of label.new. The plotshape function can place markers (such as "Buy" and "Sell") on the chart without directly using label, and it’s widely supported in Pine Script.
Candlestick analysis
Prame Weekly RSI and EMA Strategy Prame Weekly RSI and EMA Strategy
weekly RSI 14 is above 55
EMA 9 weeks of weekly RSI 14 is more than EMA 21 weeks of weekly RSI 14
price EMA 9 weeks is more than price EMA 21 weeks
Strategy without indicators v11. General Script Strategy
The objective of this strategy is to open buy or sell orders every new hour based on:
Whether the previous candle closed high (buy) or low (sell).
The presence of tops and bottoms to avoid opening orders at times of possible reversals.
The strategy also allows the user to set a date range (start date and end date) to calculate profit, loss, percentage of gain and percentage of loss only in that period.
2. Initial Settings and Parameters
Start Date and End Date: The start_date and end_date variables define the date range to account for profits and losses. These dates can be adjusted by the user to view results in specific periods.
3. Conditions for Order Entry
At each time change, the script checks the conditions for buying or selling, using the following variables and logic:
Detection of Bullish or Bearish Candle:
bullish_candle: True if the previous candle closed high.
bearish_candle: True if the previous candle closed lower.
Analysis of Tops and Bottoms:
To avoid opening orders close to tops and bottoms, the script uses the function find_top_and_bottom(period), which analyzes the last 500 candles and identifies the highest value (top) and the lowest value (bottom).
The variables current_top and current_bottom store these values.
next_top and next_bottom indicate whether the current candle is close to a top (prevents buying) or a bottom (prevents selling).
4. Opening Orders (Buy and Sell)
At each time change, the script checks the conditions to open buy or sell orders:
Condition for Sell:
The sell order is opened if the previous candle was bullish (bullish_candle) and is not close to a top (not next_top).
If there is an open buy order, it is closed before the new sell order.
Buy Condition:
The buy order is opened if the previous candle was bearish (bearish_candle) and is not near a bottom (not_near_bottom).
If there is an open sell order, it is closed before the new buy order.
5. Calculating Profit and Loss
The profit and loss calculation is only done within the configured date range (start_date and end_date):
Profit and Loss:
total_profit and total_loss accumulate the profit and loss values of all operations during the defined period.
percentage_gain and percentage_loss calculate the percentage of gain and loss in relation to the initial capital.
6. Displaying Results on the Chart
The script displays on the chart, next to the candles, the information on Total Profit, Total Loss, % Gain and % Loss:
Strategy Summary
Setting the Date Range: Allows you to set the period for calculating profit and loss.
Previous Candlestick Analysis: Decide whether to buy or sell based on the previous candlestick.
Preventing Entries at Tops and Bottoms: Avoids buying at tops and selling at bottoms to reduce false signals.
Result Calculation: Accumulates profits, losses and percentages within the configured date range.
Results Display on Chart: Displays the configured statistics directly on the chart, next to the candlesticks.
1. Estratégia Geral do Script
O objetivo dessa estratégia é abrir ordens de compra ou venda a cada nova hora com base em:
Se a vela anterior fechou em alta (compra) ou em baixa (venda).
A presença de topos e fundos para evitar abrir ordens em momentos de possíveis reversões.
A estratégia também permite que o usuário configure um intervalo de datas (data inicial e data final) para calcular o lucro, perda, percentual de ganho e percentual de perda apenas nesse período.
2. Configurações e Parâmetros Iniciais
Data Inicial e Data Final: As variáveis data_inicial e data_final definem o intervalo de datas para contabilizar os lucros e perdas. Essas datas podem ser ajustadas pelo usuário para visualizar resultados em períodos específicos.
3. Condições para Entrada de Ordens
A cada mudança de hora, o script verifica as condições de compra ou venda, usando as seguintes variáveis e lógicas:
Detecção de Vela de Alta ou Baixa:
vela_de_alta: Verdadeiro se a vela anterior fechou em alta.
vela_de_baixa: Verdadeiro se a vela anterior fechou em baixa.
Análise de Topos e Fundos:
Para evitar abrir ordens próximas de topos e fundos, o script utiliza a função find_top_and_bottom(periodo), que analisa as últimas 500 velas e identifica o valor mais alto (topo) e o valor mais baixo (fundo).
As variáveis topo_atual e fundo_atual armazenam esses valores.
topo_proximo e fundo_proximo indicam se a vela atual está perto de um topo (evita compra) ou de um fundo (evita venda).
4. Abertura de Ordens (Compra e Venda)
A cada mudança de hora, o script verifica as condições para abrir ordens de compra ou venda:
Condição para Venda:
A ordem de venda é aberta se a vela anterior foi de alta (vela_de_alta) e não está perto de um topo (not topo_proximo).
Se houver uma ordem de compra aberta, ela é fechada antes da nova ordem de venda.
Condição para Compra:
A ordem de compra é aberta se a vela anterior foi de baixa (vela_de_baixa) e não está perto de um fundo (not fundo_proximo).
Se houver uma ordem de venda aberta, ela é fechada antes da nova ordem de compra.
5. Cálculo de Lucros e Perdas
O cálculo de lucro e perda só é feito dentro do intervalo de datas configurado (data_inicial e data_final):
Lucro e Perda:
lucro_total e perca_total acumulam os valores de lucro e perda de todas as operações durante o período definido.
percentual_ganho e percentual_perca calculam o percentual de ganho e perda em relação ao capital inicial.
6. Exibição dos Resultados no Gráfico
O script exibe no gráfico, próximo das velas, as informações de Lucro Total, Perda Total, % de Ganho e % de Perda:
Resumo da Estratégia
Configuração de Intervalo de Datas: Permite configurar o período para cálculo do lucro e da perda.
Análise de Vela Anterior: Decide se a ordem é de compra ou venda com base na vela anterior.
Prevenção de Entradas em Topos e Fundos: Evita compras em topos e vendas em fundos para reduzir sinais falsos.
Cálculo de Resultados: Acumula lucros, perdas e percentuais dentro do período de datas configurado.
Exibição dos Resultados no Gráfico: Exibe as estatísticas configuradas diretamente no gráfico, próximo das velas.
SMC StrategyThis Pine Script strategy is based on Smart Money Concepts (SMC), designed for TradingView. Here's a brief summary of what the script does:
1. Swing High and Low Calculation: It identifies recent swing highs and lows, which are used to define key zones.
2. Equilibrium, Premium, and Discount Zones:
- Equilibrium is the midpoint between the swing high and low.
- Premium Zone is above the equilibrium, indicating a potential resistance area (sell zone).
- Discount Zone is below the equilibrium, indicating a potential support area (buy zone).
3. Simple Moving Average (SMA): It uses a 50-period SMA to determine the trend direction. If the price is above the SMA, the trend is bullish; if it's below, the trend is bearish.
4. Buy and Sell Signals:
- Buy Signal: Generated when the price is in the discount zone and above the equilibrium, with the price also above the SMA.
- Sell Signal: Triggered when the price is in the premium zone and below the equilibrium, with the price also below the SMA.
5. Order Blocks: It detects basic order blocks by identifying the highest high and lowest low within the last 20 bars. These levels help confirm the buy and sell signals.
6. Liquidity Zones: It marks the swing high and low as potential liquidity zones, indicating where price may reverse due to institutional players' activity.
The strategy then executes trades based on these signals, plotting buy and sell markers on the chart and showing the key levels (zones) and trend direction.
VWAP Stdev Bands Strategy (Long Only)The VWAP Stdev Bands Strategy (Long Only) is designed to identify potential long entry points in trending markets by utilizing the Volume Weighted Average Price (VWAP) and standard deviation bands. This strategy focuses on capturing upward price movements, leveraging statistical measures to determine optimal buy conditions.
Key Features:
VWAP Calculation: The strategy calculates the VWAP, which represents the average price a security has traded at throughout the day, weighted by volume. This is an essential indicator for determining the overall market trend.
Standard Deviation Bands: Two bands are created above and below the VWAP, calculated using specified standard deviations. These bands act as dynamic support and resistance levels, providing insight into price volatility and potential reversal points.
Trading Logic:
Long Entry Condition: A long position is triggered when the price crosses below the lower standard deviation band and then closes above it, signaling a potential price reversal to the upside.
Profit Target: The strategy allows users to set a predefined profit target, closing the long position once the specified target is reached.
Time Gap Between Orders: A customizable time gap can be specified to prevent multiple orders from being placed in quick succession, allowing for a more controlled trading approach.
Visualization: The VWAP and standard deviation bands are plotted on the chart with distinct colors, enabling traders to visually assess market conditions. The strategy also provides optional plotting of the previous day's VWAP for added context.
Use Cases:
Ideal for traders looking to engage in long-only positions within trending markets.
Suitable for intraday trading strategies or longer-term approaches based on market volatility.
Customization Options:
Users can adjust the standard deviation values, profit target, and time gap to tailor the strategy to their specific trading style and market conditions.
Note: As with any trading strategy, it is important to conduct thorough backtesting and analysis before live trading. Market conditions can change, and past performance does not guarantee future results.
US 30 Daily Breakout Strategy The US 30 Daily Breakout Strategy (Single Trade Per Breakout/Breakdown) is a trading approach for the US 30 (Dow Jones Industrial Average) that aims to capture breakout or breakdown moves based on the previous day’s high and low levels. The strategy includes mechanisms to take only one trade per breakout (or breakdown) each day and ensures that each trade is executed only when no other trade is open.
Entry Conditions:
Long Trade (Breakout): The strategy initiates a long position if the current candle closes above the previous day's high, indicating an upward breakout. Only one breakout trade can occur per day, regardless of whether the price remains above the previous high.
Short Trade (Breakdown): The strategy initiates a short position if the current candle closes below the previous day's low, indicating a downward breakdown. Similarly, only one breakdown trade can occur per day.
Risk Management:
Take Profit and Stop Loss: Each trade has a take profit and stop loss of 50 points, aiming to cap profit and limit loss effectively for each position.
Daily Reset Mechanism:
At the start of each new day (based on New York time), the strategy resets its flags, allowing it to look for new breakout or breakdown trades. This reset ensures that only one trade can be taken per breakout or breakdown level each day.
Execution Logic
Flags for Trade Limitation: Flags (breakout_traded and breakdown_traded) are used to ensure only one breakout or breakdown trade is taken per day. These flags reset daily.
Dynamic Plotting: The previous day’s high and low are plotted on the chart, providing a visual reference for potential breakout or breakdown levels.
Overall Objective
This strategy is designed to capture single-directional daily moves by identifying significant breakouts or breakdowns beyond the previous day’s range. The fixed profit and loss limits ensure the trades are managed with controlled risk, while the daily reset feature prevents overtrading and limits each trade opportunity to one breakout and one breakdown attempt per day.
Equilibrium Candles + Pattern [Honestcowboy]The Equilibrium Candles is a very simple trend continuation or reversal strategy depending on your settings.
How an Equilibrium Candle is created:
We calculate the equilibrium by measuring the mid point between highest and lowest point over X amount of bars back.
This now is the opening price for each bar and will be considered a green bar if price closes above equilibrium.
Bars get shaded by checking if regular candle close is higher than open etc. So you still see what the normal candles are doing.
Why are they useful?
The equilibrium is calculated the same as Baseline in Ichimoku Cloud. Which provides a point where price is very likely to retrace to. This script visualises the distance between close and equilibrium using candles. To provide a clear visual of how price relates to this equilibrium point.
This also makes it more straightforward to develop strategies based on this simple concept and makes the trader purely focus on this relationship and not think of any Ichimoku Cloud theories.
Script uses a very simple pattern to enter trades:
It will count how many candles have been one directional (above or below equilibrium)
Based on user input after X candles (7 by default) script shows we are in a trend (bg colors)
On the first pullback (candle closes on other side of equilibrium) it will look to enter a trade.
Places a stop order at the high of the candle if bullish trend or reverse if bearish trend.
If based on user input after X opposite candles (2 by default) order is not filled will cancel it and look for a new trend.
Use Reverse Logic:
There is a use reverse logic in the settings which on default is turned on. It will turn long orders into short orders making the stop orders become limit orders. It will use the normal long SL as target for the short. And TP as stop for the short. This to provide a means to reverse equity curve in case your pair is mean reverting by nature instead of trending.
ATR Calculation:
Averaged ATR, which is using ta.percentile_nearest_rank of 60% of a normal ATR (14 period) over the last 200 bars. This in simple words finds a value slightly above the mean ATR value over that period.
Big Candle Exit Logic:
Using Averaged ATR the script will check if a candle closes X times that ATR from the equilibrium point. This is then considered an overextension and all trades are closed.
This is also based on user input.
Simple trade management logic:
Checks if the user has selected to use TP and SL, or/and big candle exit.
Places a TP and SL based on averaged ATR at a multiplier based on user Input.
Closes trade if there is a Big Candle Exit or an opposite direction signal from indicator.
Script can be fully automated to MT5
There are risk settings in % and symbol settings provided at the bottom of the indicator. The script will send alert to MT5 broker trying to mimic the execution that happens on tradingview. There are always delays when using a bridge to MT5 broker and there could be errors so be mindful of that. This script sends alerts in format so they can be read by tradingview.to which is a bridge between the platforms.
Use the all alert function calls feature when setting up alerts and make sure you provide the right webhook if you want to use this approach.
There is also a simple buy and sell alert feature if you don't want to fully automate but still get alerts. These are available in the dropdown when creating an alert.
Almost every setting in this indicator has a tooltip added to it. So if any setting is not clear hover over the (?) icon on the right of the setting.
The backtest uses a 4% exposure per trade and a 10 point slippage. I did not include a commission cause I'm not personaly aware what the commissions are on most forex brokers. I'm only aware of minimal slippage to use in a backtest. Trading conditions vary per broker you use so always pay close attention to trading costs on your own broker. Use a full automation at your own risk and discretion and do proper backtesting.
Price Action StrategyThe **Price Action Strategy** is a tool designed to capture potential market reversals by utilizing classic reversal candlestick patterns such as Hammer, Shooting Star, Doji, and Pin Bar near dinamic support and resistance levels.
***Note to moderators
- The moving average was removed from the strategy because it was not suitable for the strategy and not participating in the entry or exit criteria.
- The moving average length has been replaced/renamed by the support/resistance lenght.
- The bullish engulfing and bearish engulfing patterns were also removed because in practice they were not working as entry criteria, since the candle price invariably closes far from the support/resistance level even considering the sensitivity range. There was no change in the backtest results after removing these patterns.
### Key Elements of the Strategy
1. Support and Resistance Levels
- Support and resistance are pivotal price levels where the asset has previously struggled to move lower (support) or higher (resistance). These levels act as psychological barriers where buying interest (at support) or selling interest (at resistance) often increases, potentially causing price reversals.
- In this strategy, support is calculated as the lowest low and resistance as the highest high over a 16-period length. When the price nears these levels, it indicates possible zones for a reversal, and the strategy looks for specific candlestick patterns to confirm an entry.
2. Candlestick Patterns
- This strategy uses classic reversal patterns, including:
- **Hammer**: Indicates a buy signal, suggesting rejection of lower prices.
- **Shooting Star**: Suggests a sell signal, showing rejection of higher prices.
- **Doji**: Reflects indecision and potential reversal.
- **Pin Bar**: Represents price rejection with a long shadow, often signaling a reversal.
By combining these reversal patterns with the proximity to dinamic support or resistance levels, the strategy aims to capture potential reversal movements.
3. Sensitivity Level
- The sensitivity parameter adjusts the acceptable range (Default 0.018 = 1.8%) around support and resistance levels within which reversal patterns can trigger trades (i.e. the closing price of the candle must occur within the specified range defined by the sensitivity parameter). A higher sensitivity value expands this range, potentially leading to less accurate signals, as it may allow for more false positives.
4. Entry Criteria
- **Buy (Long)**: A Hammer, Doji, or Pin Bar pattern near support.
- **Sell (Short)**: A Shooting Star, Doji, or Pin Bar near resistance.
5. Exit criteria
- Take profit = 9.5%
- Stop loss = 16%
6. No Repainting
- The Price Action Strategy is not subject to repainting.
7. Position Sizing by Equity and risk management
- This strategy has a default configuration to operate with 35% of the equity. The stop loss is set to 16% from the entry price. This way, the strategy is putting at risk about 16% of 35% of equity, that is, around 5.6% of equity for each trade. The percentage of equity and stop loss can be adjusted by the user according to their risk management.
8. Backtest results
- This strategy was subjected to deep backtest and operations in replay mode on **1000000MOGUSDT.P**, with the inclusion of transaction fees at 0.12% and slipagge of 5 ticks, and the past results have shown consistent profitability. Past results are no guarantee of future results. The strategy's backtest results may even be due to overfitting with past data.
9. Chart Visualization
- Support and resistance levels are displayed as green (support) and red (resistance) lines.
- Only the candlestick pattern that generated the entry signal to triger the trade is identified and labeled on the chart. During the operation, the occurrence of new Doji, Pin Bar, Hammer and Shooting Star patterns will not be demonstrated on the chart, since the exit criteria are based on percentage take profit and stop loss.
Doji:
Pin Bar and Doji
Shooting Star and Doji
Hammer
10. Default settings
Chart timeframe: 20 min
Moving average lenght: 16
Sensitivity: 0.018
Stop loss (%): 16
Take Profit (%): 9.5
BYBIT:1000000MOGUSDT.P
NNFX RSI EMA FVMA MACD ALGOThis Pine Script introduces a cutting-edge trading strategy that seamlessly integrates multiple technical indicators—namely, the Flexible Variable Moving Average ( FVMA ), Relative Strength Index ( RSI ), Moving Average Convergence Divergence ( MACD ), and Exponential Moving Average ( EMA )—to deliver a sophisticated trading experience. This script stands out due to its comprehensive approach, robust risk management, and the inclusion of crucial data tables for various timeframes, making it an invaluable tool for traders seeking to enhance their market performance.
Originality of the Strategy:
The originality of this script lies in its unique combination of multiple powerful indicators, enabling traders to benefit from diverse perspectives on market dynamics. This mashup enhances decision-making processes, providing multiple layers of confirmation for trade entries and exits. The strategy is designed to offer an innovative solution for traders looking to improve their performance through well-defined rules and a solid framework.
Flexible Variable Moving Average (FVMA):
The FVMA adapts dynamically to market conditions, offering a more responsive trend line than traditional moving averages. This flexibility allows for quick identification of trends and reversals, crucial for fast-paced trading environments.
Exponential Moving Average (EMA):
By giving greater weight to recent price data, the EMA enhances sensitivity to price changes, allowing for more accurate entries and exits when used alongside the FVMA. This combination maximizes the effectiveness of the strategy in identifying optimal trading opportunities.
Relative Strength Index (RSI):
The RSI helps identify overbought or oversold conditions, integrating seamlessly with other indicators to enhance the strategy's ability to pinpoint potential reversal points. This aspect of the strategy ensures that traders can make informed decisions based on market momentum.
Moving Average Convergence Divergence (MACD):
The MACD serves as an essential confirmation tool, providing insights into trend strength and momentum. This enhances the accuracy of entry and exit signals, allowing traders to make more informed decisions based on robust technical analysis.
Multi-Take Profit (TP) and Stop Loss (SL) Levels:
The strategy supports multiple TPs, allowing traders to lock in profits at various levels while effectively managing risk through a robust SL system. This flexibility caters to diverse trading styles and risk profiles, ensuring that the strategy can adapt to individual trader needs.
Default Properties:
Take Profit Levels: TP1 is set to 2.0, and TP2 is set to 2.9, which is designed to enhance profit potential while maintaining a solid risk-reward ratio.
Stop Loss: A SL is set at 2% of the 5% account balance, which helps to preserve capital and manage risk effectively, adhering to the guideline of not risking more than 5-10% of the account balance per trade.
Labeling System for Exits: Automatic labeling of TP and SL exits on the chart provides clear visualization of trading outcomes. This feature supports informed decision-making and performance tracking, aligning with the guideline of providing transparent results.
Custom Alerts System:
The inclusion of customizable alerts for trade entries, exits, and SL/TP hits keeps traders informed in real-time, enabling prompt actions without constant market monitoring. This is crucial for effective trade management and helps traders respond quickly to market changes.
API Boxes for Automated Trading:
The strategy features API boxes, allowing traders to set up automated trading based on indicator signals. This functionality enables seamless integration with trading platforms, enhancing efficiency and streamlining the trading process, which is particularly valuable for traders looking to optimize their execution.
Data Tables for Enhanced Analysis:
The script includes data tables displaying critical insights across various timeframes: 2-hour, daily, weekly, and monthly. These tables provide a comprehensive overview of market conditions, allowing traders to analyze trends and make informed decisions based on a broad spectrum of data. By leveraging this information, traders can identify high-probability setups and align their strategies with prevailing market trends, significantly increasing their chances of success.
Default Properties:
Initial Capital: £1,000, ensuring a realistic starting point for traders.
Risk per Trade: 5% of the account balance, promoting sustainable trading practices.
Commission: 0.1%, reflecting realistic transaction costs that traders may encounter.
Slippage: 1%, accounting for potential market volatility during trade execution.
Take Profit Levels:
TP1: 2.0
TP2: 2.9
Stop Loss (SL): 2% of the 5% account balance, which is well within acceptable risk parameters.
Compliance with TradingView Guidelines:
This script fully complies with TradingView's guidelines, specifically:
Strategy Results:
The strategy is designed to publish backtesting results that do not mislead traders. The realistic parameters outlined in the default properties ensure that traders have a clear understanding of potential outcomes.
The dataset used for backtesting has sufficient trades to produce a reliable sample size, aligning with the guideline of ideally having more than 100 trades.
Any deviations from recommended practices are justified in the script description, ensuring transparency and adherence to best practices.
The script explains the default properties in detail, providing a thorough understanding of how these settings influence performance.
Why This Script is Worth Paying For:
This Pine Script offers an unparalleled trading experience through its unique combination of technical indicators, comprehensive trade management features, and detailed data tables for multiple timeframes. Here are compelling reasons to invest in this strategy:
Holistic Approach: The integration of multiple indicators ensures a well-rounded perspective on market conditions, increasing the likelihood of successful trades.
Advanced Risk Management: The flexibility of multiple TPs and SLs empowers traders to tailor their risk profiles according to individual strategies, enhancing overall profitability.
Automated Trading Capability: The inclusion of API boxes for automated trading streamlines execution, allowing traders to capitalize on opportunities without the need for manual intervention.
Comprehensive Data Analysis: The detailed data tables provide invaluable insights across different timeframes, enabling traders to make informed decisions based on robust market analysis.
In summary, this innovative Pine Script represents a powerful tool designed to empower traders at all levels. Its originality, synergistic functionality, and comprehensive features create a dynamic and effective trading environment, justifying its value and positioning it as a must-have for anyone serious about achieving consistent trading success.
Gold Scalping Strategy with Precise EntriesThe Gold Scalping Strategy with Precise Entries is designed to take advantage of short-term price movements in the gold market (XAU/USD). This strategy uses a combination of technical indicators and chart patterns to identify precise buy and sell opportunities during times of consolidation and trend continuation.
Key Elements of the Strategy:
Exponential Moving Averages (EMAs):
50 EMA: Used as the shorter-term moving average to detect the recent price trend.
200 EMA: Used as the longer-term moving average to determine the overall market trend.
Trend Identification:
A bullish trend is identified when the 50 EMA is above the 200 EMA.
A bearish trend is identified when the 50 EMA is below the 200 EMA.
Average True Range (ATR):
ATR (14) is used to calculate the market's volatility and to set a dynamic stop loss based on recent price movements. Higher ATR values indicate higher volatility.
ATR helps define a suitable stop-loss distance from the entry point.
Relative Strength Index (RSI):
RSI (14) is used as a momentum oscillator to detect overbought or oversold conditions.
However, in this strategy, the RSI is primarily used as a consolidation filter to look for neutral zones (between 45 and 55), which may indicate a potential breakout or trend continuation after a consolidation phase.
Engulfing Patterns:
Bullish Engulfing: A bullish signal is generated when the current candle fully engulfs the previous bearish candle, indicating potential upward momentum.
Bearish Engulfing: A bearish signal is generated when the current candle fully engulfs the previous bullish candle, signaling potential downward momentum.
Precise Entry Conditions:
Long (Buy):
The 50 EMA is above the 200 EMA (bullish trend).
The RSI is between 45 and 55 (neutral/consolidation zone).
A bullish engulfing pattern occurs.
The price closes above the 50 EMA.
Short (Sell):
The 50 EMA is below the 200 EMA (bearish trend).
The RSI is between 45 and 55 (neutral/consolidation zone).
A bearish engulfing pattern occurs.
The price closes below the 50 EMA.
Take Profit and Stop Loss:
Take Profit: A fixed 20-pip target (where 1 pip = 0.10 movement in gold) is used for each trade.
Stop Loss: The stop-loss is dynamically set based on the ATR, ensuring that it adapts to current market volatility.
Visual Signals:
Buy and sell signals are visually plotted on the chart using green and red labels, indicating precise points of entry.
Advantages of This Strategy:
Trend Alignment: The strategy ensures that trades are taken in the direction of the overall trend, as indicated by the 50 and 200 EMAs.
Volatility Adaptation: The use of ATR allows the stop loss to adapt to the current market conditions, reducing the risk of premature exits in volatile markets.
Precise Entries: The combination of engulfing patterns and the neutral RSI zone provides a high-probability entry signal that captures momentum after consolidation.
Quick Scalping: With a fixed 20-pip profit target, the strategy is designed to capture small price movements quickly, which is ideal for scalping.
This strategy can be applied to lower timeframes (such as 1-minute, 5-minute, or 15-minute charts) for frequent trade opportunities in gold trading, making it suitable for day traders or scalpers. However, proper risk management should always be used due to the inherent volatility of gold.
E9 Shark-32 Pattern Strategy The E9 Shark-32 Pattern is a powerful trading tool designed to capitalize on the Shark-32 pattern—a specific Candlestick pattern.
The Shark-32 Pattern: What Is It?
The Shark-32 pattern is a technical formation that occurs when the following conditions are met:
Higher Highs and Lower Lows: The low of two bars ago is lower than the previous bar, and the previous bar's low is lower than the current bar. At the same time, the high of two bars ago is higher than the previous bar, and the previous bar’s high is higher than the current bar.
This unique setup forms the "Shark-32" pattern, which signals potential volume squeezes and trend changes in the market.
How Does the Strategy Work?
The E9 Shark-32 Pattern Strategy builds upon this pattern by defining clear entry and exit rules based on the pattern's confirmation. Here's a breakdown of how the strategy operates:
1. Identifying the Shark-32 Pattern
When the Shark-32 pattern is confirmed, the strategy "locks" the high and low prices from the initial bar of the pattern. These locked prices serve as key levels for future trade entries and exits.
2. Entry Conditions
The strategy waits for the price to cross the pattern's locked high or low, signaling potential market direction.
Long Entry: A long trade is triggered when the closing price crosses above the locked pattern high (green line).
Short Entry: A short trade is triggered when the closing price crosses below the locked pattern low (red line).
The strategy ensures that only one trade is taken for each Shark-32 pattern, preventing overtrading and allowing traders to focus on high-probability setups.
3. Stop Loss and Take Profit Levels
The strategy has built-in risk management through stop-loss and take-profit levels, which are visually represented by the lines on the chart:
Stop Loss:
Stop loss can be adjusted in settings.
Take Profit:
For long trades: The take-profit target is set at the upper white dotted line, which is projected above the pattern high.
For short trades: The take-profit target is set at the lower white dotted line, which is projected below the pattern low.
These clearly defined levels help traders to manage risk effectively while maximizing potential returns.
4. Visual Cues
To make trading decisions even easier, the strategy provides helpful visual cues:
Green Line (Pattern High): This line represents the high of the Shark-32 pattern and serves as a resistance level and short entry signal.
Red Line (Pattern Low): This line represents the low of the Shark-32 pattern and serves as a support level and long entry signal.
White Dotted Lines: These lines represent potential profit targets, projected both above and below the pattern. They help traders define where the market might go next.
Additionally, the strategy highlights the pattern formation with color-coded bars and background shading to draw attention to the Shark-32 pattern when it is confirmed. This adds a layer of visual confirmation, making it easier to spot opportunities in real-time.
5. No Repeated Trades
An important aspect of the strategy is that once a trade is taken (either long or short), no additional trades are executed until a new Shark-32 pattern is identified. This ensures that only valid and confirmed setups are acted upon.
Strategy Framework: 37 Strategies Unified with RM & PS BTCEURStrategy Framework: 37 Strategies Unified with Risk Management and Position Sizing
This comprehensive framework integrates over 37 independent strategies into a single, powerful trading system. Each strategy contributes its unique market perspective, culminating in a holistic decision-making process. The framework is further enhanced with sophisticated risk management and position sizing techniques.
Key Strategies Include:
• Moving average analysis
• Market structure evaluation
• Percentage rank calculations
• Sine wave correlation
• Fourier Frequency Transform (FFT) for signal composition analysis
• Bayesian statistical methods
• Seasonality patterns
• Signal-to-noise ratio assessment
• Horizontal & Indecision levels identification
• Trendlines and channels recognition
• Various oscillator-based strategies
• Open interest analysis
• Volume and volatility measurements
This diverse array of strategies provides a multi-faceted view of the asset, offering a clear and comprehensive understanding of market dynamics.
Optimization and Implementation:
• Each strategy is designed for easy optimization, with a maximum of 4 parameters.
• All strategies produce consistent signal types, which are aggregated for final market direction decisions.
• Individual optimization of each strategy is performed using the Zorro Platform, a professional C++ based tool.
• All strategies are tested to work by themselves with Walk-Forward back testing
• Strategies that don't enhance market regime definition are excluded, ensuring efficiency.
Two-Tiered Approach:
1. Market Regime Identification: The combined output of all strategies determines the market regime, visually represented by a color-coded cloud.
2. Trade Execution: Based on the identified regime, the system applies different entry and exit rules, employing trend-following in bull markets and mean reversion in bear markets.
This framework is optimized for cryptocurrencies, including BTC and ETH and others, offering a robust solution for trading in these volatile markets.
The color of the cloud encodes the market regime as determined by the 37 strategies, guiding the application of distinct trading rules for bull and bear markets.
This invitation-only TradingView script represents a culmination of extensive research and optimization, designed to provide serious traders with a powerful tool for navigating the complex cryptocurrency markets.
The strategy comes pre-configured with optimized parameters by default, so there's no need to make any adjustments. However, it’s important to use the timeframes and exchanges selected on screen . Also, a Premium account with 20.000 bars is needed since since starting points are important for the parameter optimizations. If you have any questions or concerns about the strategy, feel free to reach out.
For automation, I recommend using a tool like Autoview . The strategy is fully compatible with automated trading; you just need to select your exchange and set the maximum order size you're comfortable trading.
Free Month for Testing:
You are eligible for a free one-month trial to test the strategy before committing. This allows you to fully explore its capabilities without any immediate cost.
________________________________________
Important Information:
This is a premium script with access granted on an invite-only basis.
To request access or if you have further questions, please send me a direct message. There is a free month allowance for testing purposes.
Please note that this script involves complex calculations, and on rare occasions, you may encounter an error message from TradingView stating, "Calculation Takes Too Long." This is usually due to a temporary issue with server resources. If this happens, simply modify any parameter of the indicator and revert it back—this should resolve the issue.
________________________________________
General Disclaimer:
Trading stocks, futures, Forex, options, ETFs, cryptocurrencies, or any other financial instrument involves significant risks and rewards. You must be fully aware of the risks involved and be willing to accept them before participating in these markets.
Do not trade with money you cannot afford to lose. This communication is not a solicitation or an offer to buy or sell any financial instrument.
No guarantees are made regarding potential profits or losses from any account. Past performance of any trading strategy or methodology is not necessarily indicative of future results.
ICT Indicator with Paper TradingThe strategy implemented in the provided Pine Script is based on **ICT (Inner Circle Trader)** concepts, particularly focusing on **order blocks** to identify key levels for potential reversals or continuations in the market. Below is a detailed description of the strategy:
### 1. **Order Block Concept**
- **Order blocks** are price levels where large institutional orders accumulate, often leading to a reversal or continuation of price movement.
- In this strategy, **order blocks** are identified when:
- The high of the current bar crosses above the high of the previous bar (for bullish order blocks).
- The low of the current bar crosses below the low of the previous bar (for bearish order blocks).
### 2. **Buy and Sell Signal Generation**
The core of the strategy revolves around identifying the **breakout** of order blocks, which is interpreted as a signal to either enter or exit trades:
- **Buy Signal**:
- Generated when the closing price crosses **above** the last identified bullish order block (i.e., the highest point during the last upward crossover of highs).
- This signals a potential upward trend, and the strategy enters a long position.
- **Sell Signal**:
- Generated when the closing price crosses **below** the last identified bearish order block (i.e., the lowest point during the last downward crossover of lows).
- This signals a potential downward trend, and the strategy exits any open long positions.
### 3. **Strategy Execution**
The strategy is executed using the `strategy.entry()` and `strategy.close()` functions:
- **Enter Long Positions**: When a buy signal is generated, the strategy opens a long position (buying).
- **Exit Positions**: When a sell signal is generated, the strategy closes the long position.
### 4. **Visual Indicators on the Chart**
To make the strategy easier to follow visually, buy and sell signals are marked directly on the chart:
- **Buy signals** are indicated with a green upward-facing triangle above the bar where the signal occurred.
- **Sell signals** are indicated with a red downward-facing triangle below the bar where the signal occurred.
### 5. **Key Elements of the Strategy**
- **Trend Continuation and Reversals**: This strategy is attempting to capture trends based on the breakout of important price levels (order blocks). When the price breaks above or below a significant order block, it is expected that the market will continue in that direction.
- **Order Block Strength**: Order blocks are considered strong areas where price action could reverse or accelerate, based on how institutional investors place large orders.
### 6. **Paper Trading**
This script uses **paper trading** to simulate trades without actual money being involved. This allows users to backtest the strategy, seeing how it would have performed in historical market conditions.
### 7. **Basic Strategy Flow**
1. **Order Block Identification**: The script constantly monitors price movements to detect bullish and bearish order blocks.
2. **Buy Signal**: If the closing price crosses above the last order block high, the strategy interprets it as a sign of bullish momentum and enters a long position.
3. **Sell Signal**: If the closing price crosses below the last order block low, it signals a bearish momentum, and the strategy closes the long position.
4. **Visual Representation**: Buy and sell signals are displayed on the chart for easy identification.
### **Advantages of the Strategy:**
- **Simple and Clear Rules**: The strategy is based on clearly defined rules for identifying order blocks and trade signals.
- **Effective for Trend Following**: By focusing on breakouts of order blocks, this strategy attempts to capture strong trends in the market.
- **Visual Aids**: The plot of buy/sell signals helps traders to quickly see where trades would have been placed.
### **Limitations:**
- **No Shorting**: This strategy only enters long positions (buying). It does not account for shorting opportunities.
- **No Risk Management**: There are no built-in stop losses, trailing stops, or profit targets, which could expose the strategy to large losses during adverse market conditions.
- **Whipsaws in Range Markets**: The strategy could produce false signals in sideways or choppy markets, where breakouts are short-lived and prices quickly reverse.
### **Overall Strategy Objective:**
The goal of the strategy is to enter into long positions when the price breaks above a significant order block, and exit when it breaks below. The strategy is designed for trend-following, with the assumption that price will continue in the direction of the breakout.
Let me know if you'd like to enhance or modify this strategy further!
Liquidity strategy tester [Influxum]This tool is based on the concept of liquidity. It includes 10 methods for identifying liquidity in the market. Although this tool is presented as a strategy, we see it more as a data-gathering instrument.
Warning: This indicator/strategy is not intended to generate profitable strategies. It is designed to identify potential market advantages and help with identifying effective entry points to capitalize on those advantages.
Once again, we have advanced the methods of effectively searching for liquidity in the market. With strategies, defined by various entry methods and risk management, you can find your edge in the market. This tool is backed by thorough testing and development, and we plan to continue improving it.
In its current form, it can also be used to test well-known ICT or Smart Money concepts. Using various methods, you can define market structure and identify areas where liquidity is located.
Fair Value Gaps - one of the entry signal options is fair value gaps, where an imbalance between buyers and sellers in the market can be expected.
Time and Price Theory - you can test this by setting liquidity from a specific session and testing entries as that liquidity is grabbed
Judas Swing - can be tested as a market reversal after a breakout during the first hours of trading.
Power of Three - accumulation can be observed as the market moving within a certain range, identified as cluster liquidity in our tool, manipulation occurs with the break of liquidity, and distribution is the direction of the entry.
🟪 Methods of Identifying Liquidity
Pivot Liquidity
This refers to liquidity formed by local extremes – the highest or lowest prices reached in the market over a certain period. The period is defined by a pivot number and determines how many candles before and after the high/low were higher/lower. Simply put, the pivot number represents the number of adjacent candles to the left and right, with a lower high for a pivot high and a higher low for a pivot low. The higher the number, the more significant the high/low is. Behind these local market extremes, we expect to find orders waiting for breakout as well as stop-losses.
Gann Swing
Similar to pivot liquidity, Gann swing identifies significant market points. However, instead of candle highs and lows, it focuses on the closing prices. A Gann swing is formed when a candle closes above (or below) several previous closes (the number is again defined by a strength parameter).
Percentage Change
Apart from ticks, percentages are also a key unit of market movement. In the search for liquidity, we monitor when a local high or low is formed. For liquidity defined by percentage change, a high must be a certain percentage higher than the last low to confirm a significant high. Similarly, a low must be a defined percentage away from the last significant high to confirm a new low. With the right percentage settings, you can eliminate market noise.
Session Range (3x)
Session range is a popular concept for finding liquidity, especially in smart money concepts (SMC). You can set up liquidity visualization for the Asian, London, or New York sessions – or even all three at once. This tool allows you to work with up to three sessions, so you can easily track how and if the market reacts to liquidity grabs during these sessions.
Tip for traders: If you want to see the reaction to liquidity grab during a specific session at a certain time (e.g., the well-known killzone), you can set the Trading session in this tool to the exact time where you want to look for potential entries.
Unfinished Auction
Based on order flow theory, an unfinished auction occurs when the market reverses sharply without filling all pending orders. In price action terms, this can be seen as two candles at a local high or low with very similar or identical highs/lows. The maximum difference between these values is defined as Tolerance, with the default setting being 3 ticks. This setting is particularly useful for filtering out noise during slower market periods, like the Asian session.
Double Tops and Bottoms
A very popular concept not only from smart money concepts but also among price pattern traders is the double bottom and double top. This occurs when the market stops and reverses at a certain price twice in a row. In the tool, you can set how many candles apart these bottoms/tops can be by adjusting the Length parameter. According to some theories, double bottoms are more effective when there is a significant peak between the two bottoms. You can set this in the tool as the Swing value, which defines how large the movement (expressed in ticks) must be between the two peaks/bottoms. The final parameter you can adjust is Tolerance, which defines the possible price difference between the two peaks/bottoms, also expressed in ticks.
Range or Cluster Liquidity
When the market stays within a certain price range, there’s a chance that breakout orders and stop-losses are accumulating outside of this range. Our tool defines ranges in two ways:
Candle balance calculates the average price within a candle (open, high, low, and close), and it defines consolidation when the centers of candles are within a certain distance from each other.
Overlap confirms consolidation when a candle overlaps with the previous one by a set percentage.
Daily, Weekly, and Monthly Highs or Lows
These options simply define liquidity as the previous day’s, week’s, or month’s highs or lows.
Visual Settings
You can easily adjust how liquidity is displayed on the chart, choosing line style, color, and thickness. To display only uncollected liquidity, select "Delete grabbed liquidity."
Liquidity Duration
This setting allows you to control how long liquidity areas remain valid. You can cancel liquidity at the end of the day, the second day, or after a specific number of candles.
🟪 Strategy
Now we come to the part of working with strategies.
Max # of bars after liquidity grab – This parameter allows you to define how many candles you can search for entry signals from the moment liquidity is grabbed. If you are using engulfing as an entry signal, which consists of 2 candles, keep in mind that this number must be at least 2. In general, if you want to test a quick and sharp reaction, set this number as low as possible. If you want to wait for a structural change after the liquidity grab, which may require more candles, set the number a bit higher.
🟪 Strategy - entries
In this section, we define the signals or situations where we can enter the market after liquidity has been taken out.
Liquidity grab - This setup triggers a trade immediately after liquidity is grabbed, meaning the trade opens as the next candle forms.
Close below, close above - This refers to situations where the price closes below liquidity, but then reverses and closes above liquidity again, suggesting the liquidity grab was a false breakout.
Over bar - This occurs when the entire candle (high and low) passes beyond the liquidity level but then experiences a pullback.
Engulfing - A popular price action pattern that is included in this tool.
2HL - weak, medium, strong - A variation of a popular candlestick pattern.
Strong bar - A strong reactionary candle that forms after a liquidity grab. If liquidity is grabbed at a low, this would be a strong long candle that closes near its high and is significantly larger compared to typical volatility.
Naked bar - A candlestick pattern we’ve tested that serves as a good confirmation of market movement.
FVG (Fair Value Gap) - A currently popular concept. This is the only signal with additional settings. “Pending FVG order valid” means if a fair value gap forms after a liquidity grab, a limit order is placed, which remains valid for a set number of candles. “FVG minimal tick size” allows you to filter based on the gap size, measured in ticks. “GAP entry model” lets you decide whether to place the limit order at the gap close or its edge.
🟪 Strategy - General
Long, short - You can choose whether to focus on long or short trades. It’s interesting to see how long and short trades yield different results across various markets.
Pyramiding - By default, the tool opens only one trade at a time. If a new signal arises while a trade is open, it won’t enter another position unless the pyramiding box is checked. You also need to set the maximum number of open trades in the Properties.
Position size - Simply set the size of the traded position.
🟪 Strategy - Time
In this section, you can set time parameters for the strategy being tested.
Test since year - As the name implies, you can limit the testing to start from a specific year.
Trading session - Define the trading session during which you want to test entries. You can also visualize the background (BG) for confirmation.
Exclude session - You can set a session period during which you prefer not to search for trades. For example, when the New York session opens, volatility can sharply increase, potentially reducing the long-term success rate of the tested setup.
🟪 Strategy - Exits
This section lets you define risk management rules.
PT & SL - Set the profit target (PT) and stop loss (SL) here.
Lowest/highest since grab - This option sets the stop loss at the lowest point after a liquidity grab at a low or at the highest point after a liquidity grab at a high. Since markets usually overshoot during liquidity grabs, it’s good practice to place the stop loss at the furthest point after the grab. You can also set your risk-reward ratio (RRR) here. A value of 1 sets an RRR of 1:1, 2 means 2:1, and so on.
Lowest/highest last # bars - Similar to the previous option, but instead of finding the extreme after a liquidity grab, it identifies the furthest point within the last number of candles. You can set how far back to look using the # bars field (for an engulfing pattern, 2 is optimal since it’s made of two candles, and the stop loss can be placed at the edge of the engulfing pattern). The RRR setting works the same way as in the previous option.
Other side liquidity grab - If this option is checked, the trade will exit when liquidity is grabbed on the opposite side (i.e., if you entered on a liquidity grab at a low, the trade will exit when liquidity is grabbed at a high).
Exit after # bars - A popular exit strategy where you close the position after a set number of candles.
Exit after # bars in profit - This option exits the trade once the position is profitable for a certain number of consecutive candles. For example, if set to 5, the position will close when 5 consecutive candles are profitable. You can also set a maximum number of candles (in the max field), ensuring the trade is closed after a certain time even if the profit condition hasn’t been met.
🟪 Alerts
Alerts are a key tool for traders to ensure they don’t miss trading opportunities. They also allow traders to manage their time effectively. Who would want to sit in front of the computer all day waiting for a trading opportunity when they could be attending to other matters? In our tool, you currently have two options for receiving alerts:
Liquidity grabs alert – if you enable this feature and set an alert, the alert will be triggered every time a candle on the current timeframe closes and intersects with the displayed liquidity line.
Entry signals alert – this feature triggers an alert when a signal for entry is generated based on the option you’ve selected in the Entry type. It’s an ideal way to be notified only when a trading opportunity appears according to your predefined rules.
123 Reversal Trading StrategyThe 123 Reversal Trading Strategy is a technical analysis approach that seeks to identify potential reversal points in the market by analyzing price patterns. This Pine Script™ code implements a version of this strategy, and here’s a detailed description:
Strategy Overview
Objective: The strategy aims to identify bullish reversal patterns using the 123 pattern and manage trades with a specified holding period and a 20-day moving average as an additional exit condition.
Key Components:
Holding Period: The number of days to hold a trade is adjustable, with the default set to 7 days.
Moving Average: A 200-day simple moving average (SMA) is used to determine an exitcondition based on the price crossing this average.
Pattern Recognition:
Condition 1: The low of the current day must be lower than the low of the previous day.
Condition 2: The low of the previous day must be lower than the low from three days ago.
Condition 3: The low two days ago must be lower than the low from four days ago.
Condition 4: The high two days ago must be lower than the high three days ago.
Entry Condition: All four conditions must be met for a buy signal.
Exit Condition: The position is closed either after the specified holding period or when the price reaches or exceeds the 200-day moving average.
Relevant Literature
Graham, B., & Dodd, D. L. (1934). Security Analysis. This classic work introduces fundamental analysis and technical analysis principles which are foundational to understanding patterns like the 123 reversal.
Murphy, J. J. (1999). Technical Analysis of the Financial Markets. Murphy provides an extensive overview of technical indicators and chart patterns, including reversal patterns similar to the 123 pattern.
Elder, A. (1993). Trading for a Living. Elder discusses various trading strategies and technical analysis techniques that complement the understanding of reversal patterns and their application in trading.
Risks and Considerations
Pattern Reliability: The 123 reversal pattern, like many technical patterns, is not foolproof. It can generate false signals, especially in volatile or trending markets. This may lead to losses if the pattern does not play out as expected.
Market Conditions: The strategy may perform differently under various market conditions. In strongly trending markets, reversal patterns might not be as reliable.
Lagging Indicators: The use of the 200-day moving average as an exit condition can be considered a lagging indicator. This means it reacts to price movements with a delay, which might result in late exits and missed profit opportunities.
Holding Period: The fixed holding period of 7 days may not be optimal for all market conditions or stocks. It is essential to adjust the holding period based on market dynamics and individual stock behavior.
Overfitting: The parameters used (like the number of days and moving average length) are set based on historical data. Overfitting can occur if these parameters are tailored too specifically to past data, leading to reduced performance in future scenarios.
Conclusion
The 123 Reversal Trading Strategy is designed to identify potential market reversals using specific conditions related to price lows and highs. While it offers a structured approach to trading, it is essential to be aware of its limitations and potential risks. As with any trading strategy, it should be tested thoroughly in various market conditions and adjusted according to the individual trading style and risk tolerance.
VRS (Vegas Reversal Strategy)It is based on the reversal of the price after an accentuated volatility of the previous day. It is tested only on BTC, TF Day, and has an activation value equal to a spike of minimum 2.4% amplitude, a value that I have left in the settings free to be modified if it is found valid for other assets.
In the settings you can change how many of the latest longs or shorts I want to view in the past, colors and various aesthetics.
When the system detects a spike at the end of the day from 2.4% onwards it will signal the direction of Reversal, generating the 3 TP, dotted lines.
Entry into the market must be done at the close of the candle day, unfortunately at night time if you want to enter on the tick.
Stop above/below the spike that generated the condition.
If the Day2 candle closes FULL inside the spike, immediate and early closing of the operation.
There cannot be two consecutive Day events: if you are Long or Short and have taken a stop on the next candle, even if the latter generates another entry, this must not be activated.
TP 1 and 2 are both mandatory at 33% of the position, TP3, based on the current movement, can be considered to be left to run to the bitter end or in any case to structuring confirmations of a slowdown in the price.
Upon reaching TP1 it is mandatory to move the STOP to even.
In the event of the presence of extremely strong directional movements, for example Long direction, an opposite activation, Short, must be done but with reduced capital, on the contrary an activation in the same direction as the trend movement can be done with a surcharge. Always pay attention to Money Management and Risk Management.
Always manage Risk and Money Management in an adequate, technical and sustainable manner in relation to your capital. A fair exposure per transaction is between 1% and 2% of the capital.
Innocent Heikin Ashi Ethereum StrategyHello there, im back!
If you are familiar with my previous scripts, this one will seem like the future's nostalgia!
Functionality:
As you can see, all candles are randomly colored. This has no deeper meaning, it should remind you to switch to Heikin Ashi. The Strategy works on standard candle stick charts, but should be used with Heikin Ashi to see the actual results. (Regular OHLC calculations are included.)
Same as in my previous scripts we import our PVSRA Data from @TradersReality open source Indicator.
With this data and the help of moving averages, we have got an edge in the market.
Signal Logic:
When a "violently green" candle appears (high buy volume + tick speed) above the 50 EMA indicates a change in trend and sudden higher prices. Depending on OHLC of the candle itself and volume, Take Profit and Stop Loss is calculated. (The price margin is the only adjustable setting). Additionally, to make this script as simple and easily useable as possible, all other adjustable variables have been already set to the best suitable value and the chart was kept plain, except for the actual entries and exits.
Basic Settings and Adjustables:
Main Input 1: TP and SL combined price range. (Double, Triple R:R equally.)
Trade Inputs: All standard trade size and contract settings for testing available.
Special Settings:
Checkbox 1: Calculate Signal in Heikin Ashi chart, including regular candle OHLC („Open, High, Low, Close“)
Checkbox 2/3: Calculate by order fill or every tick.
Checkbox 4: Possible to fill orders on bar close.
Timeframe and practical usage:
Made for the 5 Minute to 1 hour timeframe.
Literally ONLY works on Ethereum and more or less on Bitcoin.
EVERY other asset has absolute 0% profitability.
Have fun and share with your friends!
Thanks for using!
Example Chart:
CZ Scalping/Doji Strategy v1The "CZ Scalping/Doji Strategy" is designed to detect potential buy and sell opportunities based on a combination of indicators, including the ATR (Average True Range), SMA (Simple Moving Average), HMA (Hull Moving Average), and Doji candles. It also incorporates a risk management system to define stop-loss and take-profit levels.
Key Parameters and Indicators
Key Value (keyValue): This is a sensitivity factor that influences the calculation of the ATR-based trailing stop. It affects how closely the stop-loss follows the price.
ATR Period (atrPeriod): The period used for calculating the ATR, which measures market volatility. A higher value smooths out short-term fluctuations, while a lower value makes the ATR more responsive to recent price changes.
SMA Length (smaLength): The length of the Simple Moving Average, which serves as a trend filter. The script can dynamically adjust the SMA length if high-frequency trading is enabled.
Risk-Reward Ratio (riskRewardRatio): Defines the desired risk-reward ratio for trades. This ratio determines the relationship between potential profit and the accepted loss for each trade.
Trade Range Multiplier (tradeRangeMultiplier): Multiplies the ATR-based stop-loss value to set a range for trade conditions.
Enable High Frequency (enableHighFrequency): A boolean switch that, when enabled, adjusts the SMA length and trade range multiplier for higher trading frequency.
Indicators
ATR (Average True Range): This is used to calculate the trailing stop-loss (xATRTrailingStop). The stop-loss dynamically adjusts based on the volatility of the asset.
SMA (Simple Moving Average): The SMA serves as a trend filter, allowing trades only when the price is above (for buy signals) or below (for sell signals) the SMA.
HMA (Hull Moving Average): The script calculates and plots three different HMAs with lengths of 20, 25, and 200 periods. These HMAs help to smooth out price data and identify trends more clearly.
Doji Candles: The script identifies and plots Doji candles, which are often seen as indecision points in the market. A Doji candle is characterized by a small difference between the open and close prices.
Trade Logic
Buy Condition: A buy signal is generated when the price crosses above the ATR-based trailing stop, and the price is above the SMA filter. The trade must also meet certain range criteria related to the ATR.
Sell Condition: A sell signal is generated when the price crosses below the ATR-based trailing stop, and the price is below the SMA filter. Similar range criteria apply.
Risk Management
Stop Loss: The stop loss is set based on the ATR and adjusted by the trade range multiplier.
Take Profit: The take profit is calculated as a multiple of the stop loss, determined by the risk-reward ratio.
Alerts
The script includes alert conditions for buy and sell signals, as well as for detecting Doji candles. These alerts can be used to notify traders when specific conditions are met.
Chart Visualization
Plots: The script plots the three HMAs and marks buy/sell signals on the chart with diamonds. The bars are colored based on their relation to the ATR trailing stop: green for bars above the stop and red for bars below.
Doji Indicator: Doji candles are marked on the chart with a special symbol.
Usage
This strategy is intended for traders looking for a scalping method that incorporates volatility-based trailing stops and trend filtering. The additional Doji indicator helps in identifying potential reversals or periods of indecision in the market.
Publishing Considerations
Before publishing this script, ensure that:
Originality: The description clearly explains the unique aspects of this strategy, including the use of the ATR-based trailing stop in combination with trend filtering and Doji candle detection.
Language: The description and title are in English.
Chart: Publish with a clean chart that only includes this script and clear visualizations of the strategy's signals and indicators.
Risk Management: The strategy uses realistic back testing parameters, including appropriate commission, slippage, and position sizing.
BTC 5 min SHBHilalimSB A Wedding Gift 🌙
What is HilalimSB🌙?
First of all, as mentioned in the title, HilalimSB is a wedding gift.
HilalimSB - Revealing the Secrets of the Trend
HilalimSB is a powerful indicator designed to help investors analyze market trends and optimize trading strategies. Designed to uncover the secrets at the heart of the trend, HilalimSB stands out with its unique features and impressive algorithm.
Hilalim Algorithm and Fixed ATR Value:
HilalimSB is equipped with a special algorithm called "Hilalim" to detect market trends. This algorithm can delve into the depths of price movements to determine the direction of the trend and provide users with the ability to predict future price movements. Additionally, HilalimSB uses its own fixed Average True Range (ATR) value. ATR is an indicator that measures price movement volatility and is often used to determine the strength of a trend. The fixed ATR value of HilalimSB has been tested over long periods and its reliability has been proven. This allows users to interpret the signals provided by the indicator more reliably.
ATR Calculation Steps
1.True Range Calculation:
+ The True Range (TR) is the greatest of the following three values:
1. Current high minus current low
2. Current high minus previous close (absolute value)
3. Current low minus previous close (absolute value)
2.Average True Range (ATR) Calculation:
-The initial ATR value is calculated as the average of the TR values over a specified period
(typically 14 periods).
-For subsequent periods, the ATR is calculated using the following formula:
ATRt=(ATRt−1×(n−1)+TRt)/n
Where:
+ ATRt is the ATR for the current period,
+ ATRt−1 is the ATR for the previous period,
+ TRt is the True Range for the current period,
+ n is the number of periods.
Pine Script to Calculate ATR with User-Defined Length and Multiplier
Here is the Pine Script code for calculating the ATR with user-defined X length and Y multiplier:
//@version=5
indicator("Custom ATR", overlay=false)
// User-defined inputs
X = input.int(14, minval=1, title="ATR Period (X)")
Y = input.float(1.0, title="ATR Multiplier (Y)")
// True Range calculation
TR1 = high - low
TR2 = math.abs(high - close )
TR3 = math.abs(low - close )
TR = math.max(TR1, math.max(TR2, TR3))
// ATR calculation
ATR = ta.rma(TR, X)
// Apply multiplier
customATR = ATR * Y
// Plot the ATR value
plot(customATR, title="Custom ATR", color=color.blue, linewidth=2)
This code can be added as a new Pine Script indicator in TradingView, allowing users to calculate and display the ATR on the chart according to their specified parameters.
HilalimSB's Distinction from Other ATR Indicators
HilalimSB emerges with its unique Average True Range (ATR) value, presenting itself to users. Equipped with a proprietary ATR algorithm, this indicator is released in a non-editable form for users. After meticulous testing across various instruments with predetermined period and multiplier values, it is made available for use.
ATR is acknowledged as a critical calculation tool in the financial sector. The ATR calculation process of HilalimSB is conducted as a result of various research efforts and concrete data-based computations. Therefore, the HilalimSB indicator is published with its proprietary ATR values, unavailable for modification.
The ATR period and multiplier values provided by HilalimSB constitute the fundamental logic of a trading strategy. This unique feature aids investors in making informed decisions.
Visual Aesthetics and Clear Charts:
HilalimSB provides a user-friendly interface with clear and impressive graphics. Trend changes are highlighted with vibrant colors and are visually easy to understand. You can choose colors based on eye comfort, allowing you to personalize your trading screen for a more enjoyable experience. While offering a flexible approach tailored to users' needs, HilalimSB also promises an aesthetic and professional experience.
Strong Signals and Buy/Sell Indicators:
After completing test operations, HilalimSB produces data at various time intervals. However, we would like to emphasize to users that based on our studies, it provides the best signals in 1-hour chart data. HilalimSB produces strong signals to identify trend reversals. Buy or sell points are clearly indicated, allowing users to develop and implement trading strategies based on these signals.
For example, let's imagine you wanted to open a position on BTC on 2023.11.02. You are aware that you need to calculate which of the buying or selling transactions would be more profitable. You need support from various indicators to open a position. Based on the analysis and calculations it has made from the data it contains, HilalimSB would have detected that the graph is more suitable for a selling position, and by producing a sell signal at the most ideal selling point at 08:00 on 2023.11.02 (UTC+3 Istanbul), it would have informed you of the direction the graph would follow, allowing you to benefit positively from a 2.56% decline.
Technology and Innovation:
HilalimSB aims to enhance the trading experience using the latest technology. With its innovative approach, it enables users to discover market opportunities and support their decisions. Thus, investors can make more informed and successful trades. Real-Time Data Analysis: HilalimSB analyzes market data in real-time and identifies updated trends instantly. This allows users to make more informed trading decisions by staying informed of the latest market developments. Continuous Update and Improvement: HilalimSB is constantly updated and improved. New features are added and existing ones are enhanced based on user feedback and market changes. Thus, HilalimSB always aims to provide the latest technology and the best user experience.
Social Order and Intrinsic Motivation:
Negative trends such as widespread illegal gambling and uncontrolled risk-taking can have adverse financial effects on society. The primary goal of HilalimSB is to counteract these negative trends by guiding and encouraging users with data-driven analysis and calculable investment systems. This allows investors to trade more consciously and safely.
What is BTC 5 min ☆SHB Strategy🌙?
BTC 5 min ☆SHB Strategy is a strategy supported by the HilalimSB algorithm created by the creator of HilalimSB. It automatically opens trades based on the data it receives, maintaining trades with its uniquely defined take profit and stop loss levels, and automatically closes trades when necessary. It stands out in the TradingView world with its unique take profit and stop loss markings. BTC 5 min ☆SHB Strategy is close to users' initiatives and is a strategy suitable for 5-minute trades and scalp operations developed on BTC.
What does the BTC 5 min ☆SHB Strategy target?
The primary goal of BTC 5 min ☆SHB Strategy is to close trades made by traders in short timeframes as profitably as possible and to determine the most effective trading points in low time periods, considering the commission rates of various brokerage firms. BTC 5 min ☆SHB Strategy is one of the rare profitable strategies released in short timeframes, with its useful interface, in addition to existing strategies in the markets. After extensive backtesting over a long period and achieving above-average success, BTC 5 min ☆SHB Strategy was decided to be released. Following the completion of test procedures under market conditions, it was presented to users with the unique visual effects of ☆SB.
BTC 5 min ☆SHB Strategy and Heikin Ashi
BTC 5 min ☆SHB Strategy produces data in Heikin-Ashi chart types, but since Heikin-Ashi chart types have their own calculation method, BTC 5 min ☆SHB Strategy has been published in a way that cannot produce data in this chart type due to BTC 5 min ☆SHB Strategy's ideology of appealing to all types of users, and any confusion that may arise is prevented in this way. Heikin-Ashi chart types, especially in short time intervals, carry significant risks considering the unique calculation methods involved. Thus, the possibility of being misled by the coder and causing financial losses has been completely eliminated. After the necessary conditions determined by the creator of BTC 5 min ☆SHB are met, BTC 5 min ☆SHB Heikin-Ashi will be shared exclusively with invited users only, upon request, to users who request an invitation.
Key Features:
+HilalimSHB Algorithm: This algorithm uses a dynamic ATR-based trend-following mechanism to identify the current market trend. The strategy detects trend reversals and takes positions accordingly.
+Heikin Ashi Compatibility: The strategy is optimized to work only with standard candlestick charts and automatically deactivates when Heikin Ashi charts are in use, preventing false signals.
+Advanced Chart Enhancements: The strategy offers clear graphical markers for buy/sell signals. Candlesticks are automatically colored based on trend direction, making market trends easier to follow.
Strategy Parameters:
+Take Profit (%): Defines the target price level for closing a position and automates profit-taking. The fixed value is set at 2%.
+Stop Loss (%): Specifies the stop-loss level to limit losses. The fixed value is set at 3%.
The shared image is a 5-minute chart of BTCUSDC.P with a fixed take profit value of 2% and a fixed stop loss value of 3%. The trades are opened with a commission rate of 0.063% set for the USDT trading pair on Binance.🌙
Scalper Bot [SMRT Algo]The SMRT Algo Bot is a trading strategy designed for use on TradingView, enabling traders to backtest and refine their strategies with precision. This bot is built to provide key performance metrics through TradingView’s strategy tester feature, offering insights such as net profit, maximum drawdown, profit factor, win rate, and more.
The SMRT Algo Bot is versatile, allowing traders to execute either pro-trend or contrarian strategies, each with customizable parameters to suit individual trading styles.
Traders can automate the bot to their brokerage platform via webhooks and use third-party software to facilitate this.
Core Features:
Backtesting Capabilities: The SMRT Algo Bot leverages TradingView’s powerful strategy tester, allowing traders to backtest their strategies over historical data. This feature is crucial for assessing the viability of a strategy before deploying it in live markets. By providing metrics such as net profit, maximum drawdown, profit factor, and win rate, traders can gain a comprehensive understanding of their strategy's performance, helping them to make informed decisions about potential adjustments or optimizations.
Advanced Take Profit and Stop Loss Methods: The SMRT Algo Bot offers multiple methods for setting Take Profit (TP) and Stop Loss (SL) levels, providing flexibility to match different market conditions and trading strategies.
Take Profit Methods:
- Normal (Percent-based): Traders can set their TP levels as a percentage. This method adjusts the TP dynamically based on market volatility, allowing for more responsive profit-taking in volatile markets.
- Donchian Channel: Alternatively, the bot can use the Donchian Channel to set TP levels, which is particularly useful in trend-following strategies. The Donchian Channel identifies the highest high and lowest low over a specified period, providing a clear target for profit-taking when prices reach extreme levels.
Stop Loss Methods:
- Percentage-Based Stop Loss: This method allows traders to set a fixed percentage of the entry price as the stop loss. It provides a straightforward, static risk management approach that is easy to implement.
- Normal (Percent-based): Traders can set their SL levels as a percentage. This method adjusts the SL dynamically based on market volatility, allowing for more responsive profit-taking in volatile markets.
- ATR Multiplier: Similar to the TP method, the SL can also be set using a multiple of the ATR.
Pro-Trend and Contrarian Strategies: The SMRT Algo Bot is designed to execute either pro-trend or contrarian trading strategies, though only one can be active at any given time.
Pro-Trend Strategy: This strategy aligns with the prevailing market trend, aiming to capitalize on the continuation of current price movements. It is particularly effective in trending markets, where momentum is expected to carry the price further in the direction of the trend.
Contrarian Strategy: In contrast, the contrarian strategy seeks to exploit potential reversals or corrections, trading against the prevailing trend. This approach is more suitable in overextended markets where a pullback is anticipated. Traders can switch between these strategies based on their market outlook and trading style.
Dashboard Display: A dashboard located in the bottom right corner of the TradingView interface provides real-time updates on the bot’s performance metrics. This includes key statistics such as net profit, drawdown, profit factor, and win rate, specific to the current instrument being tested. This immediate access to performance data allows traders to quickly assess the effectiveness of the strategy and make necessary adjustments on the fly.
Input Settings:
Reverse Signals: If turned on, buy trades will be shown as sell trades, etc.
Show Signal (Bar Color): Shows the signal bar as a green candle for buy or red candle for sell.
RSI: Used as a filter for one of the conditions for trade. Can be turned on/off by clicking on the checkbox.
Timeframe: Affects the timeframe of RSI filter.
Length: Length of RSI used in measurement.
First Cross: Whether or not to factor in the first RSI cross in the calculation.
Buy/Sell (Above/Below): Look for trades if RSI is above or below these values.
EMA: Used as a trend filter for one of the conditions for trade. Can be turned on/off by clicking on the checkbox.
Timeframe: Affects the timeframe of EMA filter.
Fast Length: Value for the fast EMA.
Middle Length: Value for the middle EMA
Slow Length: Value for the slow EMA.
ADX: Used as a volatility filter for one of the conditions for trade. Can be turned on/off by clicking on the checkbox.
Threshold: Threshold value for ADX.
ADX Smoothing: Smoothing value for the ADX
DI Length: DI length value for the ADX.
Donchian Channel Length: This value affects the length value of the DC. Used in TP calculation.
Close Trade On Opposite Signal: If true, the current trade will close if an opposite trade appears.
RSI: If turned on, it will also use the RSI to exit the trade (overextended zones).
Take Profit Option: Choose between normal (percentage-based) and Donchian Channel options.
Stop Loss Option: Choose between normal (percentage-based) and Donchian Channel options.
The SMRT Algo Bot’s components are designed to work together seamlessly, creating a comprehensive trading solution. Whether using the ATR multiplier for dynamic adjustments or the Donchian Channel for trend-based targets, these methods ensure that trades are managed effectively from entry to exit. The ability to switch between pro-trend and contrarian strategies offers adaptability, enabling traders to optimize their approach based on market behavior. The real-time dashboard ties everything together, providing continuous feedback that informs strategic adjustments.
Unlike basic or open-source bots, which often lack the flexibility to adapt to different market conditions, the SMRT Algo Bot provides a robust and dynamic trading solution. The inclusion of multiple TP and SL methods, particularly the ATR and Donchian Channel, adds significant value by offering traders tools that can be finely tuned to both volatile and trending markets.
The SMRT Algo Suite, which the SMRT Algo Bot is a part of, offers a comprehensive set of tools and features that extend beyond the capabilities of standard or open-source indicators, providing significant additional value to users.
What you also get with the SMRT Algo Suite:
Advanced Customization: Users can customize various aspects of the indicator, such as toggling the confirmation signals on or off and adjusting the parameters of the MA Filter. This customization enhances the adaptability of the tool to different trading styles and market conditions.
Enhanced Market Understanding: The combination of pullback logic, dynamic S/R zones, and MA filtering offers traders a nuanced understanding of market dynamics, helping them make more informed trading decisions.
Unique Features: The specific combination of pullback logic, dynamic S/R, and multi-level TP/SL management is unique to SMRT Algo, offering features that are not readily available in standard or open-source indicators.
Educational and Support Resources: As with other tools in the SMRT Algo suite, this indicator comes with comprehensive educational resources and access to a supportive trading community, as well as 24/7 Discord support.
The educational resources and community support included with SMRT Algo ensure that users can maximize the indicators’ potential, offering guidance on best practices and advanced usage.
SMRT Algo believe that there is no magic indicator that is able to print money. Indicator toolkits provide value via their convenience, adaptability and uniqueness. Combining these items can help a trader make more educated; less messy, more planned trades and in turn hopefully help them succeed.
RISK DISCLAIMER
Trading involves significant risk, and most day traders lose money. All content, tools, scripts, articles, and educational materials provided by SMRT Algo are intended solely for informational and educational purposes. Past performance is not indicative of future results. Always conduct your own research and consult with a licensed financial advisor before making any trading decisions.
Double Bottom and Top Hunter### Türkçe Açıklama:
Bu strateji, grafikte ikili dip ve ikili tepe formasyonlarını tespit ederek otomatik alım ve satım işlemleri gerçekleştirir. İkili dip, fiyatın belirli bir dönem içinde iki kez en düşük seviyeye ulaşması ile oluşur ve bu durumda strateji long (alım) işlemi açar. İkili tepe ise fiyatın belirli bir dönem içinde iki kez en yüksek seviyeye ulaşması ile oluşur ve bu durumda strateji short (satış) işlemi açar.
- **Dönem Uzunluğu ve Geriye Dönük Kontrol:** Strateji, varsayılan olarak 100 periyotluk bir zaman dilimini temel alır ve bu süre boyunca en düşük ve en yüksek fiyat seviyelerini belirler. Geriye dönük kontrol süresi de 100 periyot olarak ayarlanmıştır.
- **İşlem Açma Koşulları:** İkili dip tespit edildiğinde long pozisyon, ikili tepe tespit edildiğinde short pozisyon açılır.
- **İşlem Kapatma Koşulları:** İkili dipte, en yüksek seviyeye (HH) ulaşıldıktan sonra fiyatın daha düşük bir seviye (LL) yapması durumunda pozisyon kapanır. İkili tepede ise tam tersi bir durumda, pozisyon kapanır.
- **Zigzag Çizimi:** İkili dip ve tepe formasyonları, grafik üzerinde yeşil (dipler) ve kırmızı (tepeler) zigzag çizgileri ile gösterilir.
Bu strateji, özellikle 1, 3 ve 5 dakikalık kısa zaman dilimlerinde yüksek başarı oranına sahiptir ve piyasadaki kısa vadeli trend dönüşlerini yakalamada etkili bir araçtır.
### English Explanation:
This strategy automatically executes buy and sell orders by detecting double bottom and double top formations on the chart. A double bottom occurs when the price reaches a low level twice within a specific period, prompting the strategy to open a long (buy) position. Conversely, a double top forms when the price reaches a high level twice, leading the strategy to open a short (sell) position.
- **Period Length and Lookback Control:** By default, the strategy is based on a 100-period length, during which it identifies the lowest and highest price levels. The lookback control period is also set to 100 periods.
- **Entry Conditions:** A long position is opened when a double bottom is detected, while a short position is opened when a double top is identified.
- **Exit Conditions:** In the case of a double bottom, the position is closed after the price reaches a higher high (HH) and then makes a lower low (LL). For a double top, the opposite occurs before closing the position.
- **Zigzag Plotting:** The double bottom and top formations are visually represented on the chart with green (bottoms) and red (tops) zigzag lines.
This strategy is particularly successful in short timeframes such as 1, 3, and 5 minutes and is an effective tool for capturing short-term trend reversals in the market.
All Divergences with trend / SL - Uncle SamThanks to the main inspiration behind this strategy and the hard work of:
"Divergence for many indicators v4 by LonesomeTheBlue"
The "All Divergence" strategy is a versatile approach for identifying and acting upon various divergences in the market. Divergences occur when price and an indicator move in opposite directions, often signaling potential reversals. This strategy incorporates both regular and hidden divergences across multiple indicators (MACD, Stochastics, CCI, etc.) for a comprehensive analysis.
Key Features:
Comprehensive Divergence Analysis: The strategy scans for regular and hidden divergences across a variety of indicators, increasing the probability of identifying potential trade setups.
Trend Filter: To enhance accuracy, a moving average (MA) trend filter is integrated. This ensures trades align with the overall market trend, reducing the risk of false signals.
Customizable Risk Management: Users can adjust parameters for long/short stop-loss and take-profit levels to match their individual risk tolerance.
Additional Risk Management (Optional): An experimental MA-based risk management feature can be enabled to close positions if the market shows consecutive closes against the trend.
Clear Visuals: The script plots pivot points, divergence lines, and stop-loss levels on the chart for easy reference.
Strategy Settings (Defaults):
Enable Long/Short Strategy: True
Long/Short Stop Loss %: 2%
Long/Short Take Profit %: 5%
Enable MA Trend: True
MA Type: HMA (Hull Moving Average)
MA Length: 500
Use MA Risk Management: False (Experimental)
MA Risk Exit Candles: 2 (If enabled)
Pivot Period: 9
Source for Pivot Points: Close
Backtest Details (Example):
The strategy has been backtested on XAUUSD 1H (Goold/USD 1 hour timeframe) with a starting capital of $1,000. The backtest period covers around 2 years. A commission of 0.02% per trade and a 0.1% slippage per trade were factored in to simulate real-world trading costs.
Disclaimer:
This strategy is for educational and informational purposes only. Backtested results are not indicative of future performance. Use this strategy at your own risk. Always conduct your own analysis and consider consulting a financial professional before making any trading decisions.
Important Notes:
The default settings are a good starting point, but feel free to experiment to find optimal parameters for your specific trading style and market.
The MA-based risk management is an experimental feature. Use it with caution and thoroughly test it before deploying in live trading.
Backtest results can vary depending on the market, timeframe, and specific settings used. Always consider slippage and commission fees when evaluating a strategy's potential profitability.