Стратегия Pine Script®
Индикаторы и стратегии
DayTradeMind Combined High Win Rate StrategyThe DayTradeMind Combined High Win Rate Strategy is a trend-following system that relies on confluence—the idea that a trade signal is stronger when multiple independent indicators agree. Instead of entering on a single indicator's whim, it uses a "voting" system to qualify entries and a strict risk-to-reward ratio to manage exits.Here is a breakdown of the three main layers of this strategy:1. The Voting Engine (Confluence Model)The strategy tracks four indicators and assigns a "point" for a bullish or bearish bias. It requires a minimum number of points (set by minConfirmations, usually 2/4) before it even considers a trade.IndicatorBullish Condition (1 point)Bearish Condition (1 point)PurposeMACDMACD Line > Signal LineMACD Line < Signal LineMeasures short-term momentum.DonchianPrice > 20-period MedianPrice < 20-period MedianIdentifies price relative to recent range.SuperTrendPrice above trend linePrice below trend lineFilters for the "Macro" trend direction.%B (Bollinger)Price in lower-mid range (0.2–0.5)Price in upper-mid range (0.5–0.8)Prevents buying when overextended.2. The Entry TriggerHaving enough "votes" (confirmations) isn't enough to enter. The strategy waits for a trigger event to ensure you aren't entering a stale trend. An entry only occurs if the minimum confirmations are met AND one of the following happens on the current bar:MACD Cross: The MACD line crosses over the signal line.Structural Break: The price crosses over the Donchian Middle (Median) line.This "Confirmation + Trigger" approach is designed to catch the start of a momentum push rather than buying a flat market.3. Mathematical Risk ManagementThe performance you see in your backtest (like the 46.86% return) is largely driven by the 2:1 Reward-to-Risk (RR) Ratio.Stop Loss (SL): Fixed at 2% below entry.Take Profit (TP): Fixed at 4% above entry.By aiming for a target twice as large as the risk, the strategy can remain profitable even with a win rate as low as 35%–40%. Mathematically, your winning trades compensate for more than two losing trades.Visualizing the SystemTriangles: Small green (up) and red (down) triangles appear on your chart only when the Votes + Trigger align perfectly.Background Shading: Faint green or red bands show you exactly when the "Confluence" is active. If the background is gray, the indicators are in conflict.Dashboard: The table in the top-right summarizes the current "score" for each indicator, letting you know how close you are to a potential trade signal.
Стратегия Pine Script®
Universal Signal Trading Tool : Single TargetInternal V 128.0
Overview
This script by maurya_algo_trader is designed for four major things
Connect external buy/sell entry signal (from indicator) as well as optional exit signal (bool as well as limit) if available
SL/Target/TSL : Set various types of Target, Stoploss and trailing stoploss through this script
Trade/Risk Managements : Control the no of trades, day or month profits or loss etc.
Time managements : Sessions for trade timings
Execute trades (Equity, Futures and Options) on various brokers (Currently available for Dhan, Flattrade, 5Paisa, Anand Rathi and Delta exchange) automatically via webhook features through only single alerts
(currently available only for indian market : NSE, BSE, MCX and Delta exchange India crypto)
How to Connect External Signals for Entry, Exit(optional)
To connect external signals it is mandatory that the external signal script must be in the form of an “indicator” (Not in strategy).
In the tradingview community indicator you can find readymade indicator buy/sell signals (e.g. ut bot alerts). Mostly the buy/sell signal plotted via plotshap() function which gives the particular value (mostly: 1). This can be seen in “Data Window” (Right side of Tradingview just below the alert section). When you keep the cursor on the candle at buy or sell signal, it gives the value “1” and on the rest of the candles it will be “0”.
In Settings/Input tab you will find “EXTERNAL ENTRY” section where you can select the buy signal in drop down menu of “External Ling Entry Signal” and in same line default value 1 is already present (You can change it if plotted signal showing any other numbers for Buy signal). Similarly Choose sell signal in drop down menu of “External Short Entry Signal”. It also has the same “1” value by default but if it is different like” -1” you can change it manually.
If you have your own strategy, you need to convert it into an indicator first by removing the strategy function from the entire script (if you know the pine script coding or you can message me for the same). Then set the variable for the logic (bool condition) of long entry and short entry. And then plot the logic by following pine codes :
long_entry_cond = *your long condition logic variables (unique bool condition)*
short_entry_cond = *your short condition logic variables (unique bool condition)*
plot(long_entry_cond ? 1 : 0, '✅✅Long Entry Connector✅✅', display = display.data_window)
plot(short_entry_cond ? 1 : 0, '⛔⛔Short Entry Connector⛔⛔', display = display.data_window)
This will create the external plots which can be retrieved in the dropdown menu of “EXTERNAL ENTRY”.
If you have any external exits (other than opposite entry) you can use them similarly in sections of “EXTERNAL EXIT”. If you have any Take profit or take SL (at limit price) then it can also be retrieved in External TAKE PROFIT and EXTERNAL TAKE SL section by selecting the appropriate option in the dropdown menu.
Once proper signal attachment done with dropdown menu, you can see various entry exit labels like : “Long Entry”, “Short Entry”, “Long Exit” and “Short Exit”.
In addition to original entry, advance entry options are available like : “Entry at second candle of the day if no position”; “Entry at high/low breakout of actual Buy/Sell candle”; and “Add buffer to high/low of buy sell candle in points/percentage (inputs).
SL/Target Settings
By default, target and SL are off.
You can select various target types below and set the value accordingly (additional multiplier input available to optimize various interval of target level) :
Value (INR 1000 : not applicable of Index);
Percentage,
Points,
R:R (Multiplier of SL (Point/Percentage) );
No of Bars: Exit at set no of bars after entry.
Various stoploss types available like :
Value (INR 1000 : not applicable of Index);
Percentage,
Points,
Low/High During entry : A fix SL as low or high of no of candle back
Following options are one kind trailing Stoploss
HH/LL of period of candle : As candle moves ahead fix length of candle’s low or high move a one kind of trailing stoploss
ATR : Supertrend as trailing SL you need to add length and multiplier in respective input tabs
Pivot : This is the pivot point of right and left side candles length (low for long side and high for short) add left and right side candle length in respective input tabs.
Opposite band of Bollinger : Lower Band for Long Side and Upper band for Short side
TSL settings
TSL settings have the following types of options. By default it is off. This section is specifically designed to activate TSL after some market achieved some distance from its entry and TSL can be started from desired distance from entry or SL.
High/Low : It trails by distance of previous to new high created after entry
Step : It trails by by given inputs of distance: at every 50 points trails 50 points
Pivot/HH/LL od period of candle, ATR, opposite band of Bollinger these options are same as available in Stoploss section. The difference is only You can choose where the TSL is activated where it start from that you can decide in section.
Trade/Risk Managements
Trade direction : Both/Only Long/ Only short
Reverse Trade : You can reverse the trade if SL/TSL hit if it is in loss/profit options
Skip Opposite trade: If SL and Target or TSL is set then you can skip opposite trade until your SL/Target or TSL hit
Close trade if profitable at no of candle new highest close (for long) and lowest close (for short)
Max no of orders per day
Max Profit Per day
Max loss per day
Max Profit per month
Max Loss per month
Kill All Trades on chart
This option enables you to take only fresh entries after creating the alert. So many times Trade is running on chart and still we have not taken any order or created alert and I want a fresh entry signal (with any exit signal of previous entry). So for that you need to set the current date and times after the last entry on the chart. This will show you a pink color vertical draggable line. Before the pink line all signals disappear. Only after that you have to create an alert to take trade.
Date Filter
This filter is enabled to backtest from a specific date. But remember that date should not be beyond the unavailable candles on the chart. For Deep backtest you must use the tradingview premium plan feature in the strategy section.
Always unclick this option if you are trading via webhook
Time Management
Auto square off on click option available for NSE, NSE and MCX symbols, where mostly between 15:00 to 15:30 hours for NSE/BSE and 23:00 to 23:30 hours for MCX depending upon timeframe.
Upto two sessions you can set for trading: 0000 to 0000 means continue trading without any time restriction: Always set in 24 hour format. Input always shows in candles opening time instead of closing time.
Example
Trade timing : 09:30 - 15:00 (All entry and exit as per logic)
Squareoff timing : 15:00 – 15:30 (Only Exit happen at first candle close between 15:00 to 15:30, for 1 min TF it square off on 15:01, for 5 min TF 15:05 and for 15 min TF 15:15)
Algo Settings
Select broker : Dhan, Flattrade, 5Paisa,Anand Rathi, Delta Exchange
Instrument: Option, Future, Equity (What are you trading?)
For Future always use 1! (for current month) and 2! (for next month expiry) symbol chart (eg. NIFTY1! Or NIFTY2!)
Order type: Delivery (carry forward), Intraday ( Always set autosquare off of square off settings in time management). This selection also affects signals on the equity chart, Intraday shows both long and short signals while Delivery option shows only long side signals because in equity short trade is not allowed in delivery.
Quantity: for equity use no of shares that you what to trade, for future and options always use no of lot: enter 1 for 1 lot (please do not use lot size).
Client ID: You need to add client Id if you use broker Flattrade or Anand Rathi
Secret key from Json : Paste secret code for Dhan/Flattarde/Anand Rathi while strategy Id for delta exchange, no need of secret code for 5 paisa.
Secret code for Dhan: Order/Webhook/ Manage/ select webhook expiry/ creat webhook/ add any script/ creat json/ copy secret code from json without any inverted coma
Secret code from Flattrade: Order/webhook/login to creat webhook/ copy code from json (longer in character)
Strategy Id for Delta exchange : Algo/trading bot/Creat webhook/OTP-2FA-submit/ copy strategy id from json
deltaexchangeindia.freshdesk.com
Option settings
If you are trading options then select OPTION in instrument.
Option Buyer or seller: If you are option buyer then by default it is OPT BUYING
OPT BUYING: buy CE when long entry and buy PE when short entry on index chart, while it shows only long trades on option premium chart
OPT SELLING: sell PE when long entry and sell CE when short entry on index chart, while it shows only short trade on option premium chart
BOTH: This option is only used when you want to trade both long (Option Buying) and short signal (Option Selling) on option premium charts. Do not use on index chart; this is exclusively for option premium chart.
Strike selection : ATM : At the money, OTM: out of the Money (low Premium), ITM : In the money (Higher Premium)
You can trade the strike in multiple of your choice like in Nifty strike difference is 50 , but if dont want to trade 50 multiple strike 25850 or 25950 and you only want to trade 25800, 25900 then click on that option and enter strike difference 100.
Set expiry: for NSE and BSE according to instrument it has specific expiry day
Current Auto Expiry : Nearest expiry date (tuesday for NSE and thursday for BSE) for nifty50 current week tuesday and for Banknifty Current month last tuesday.
Current week/Next week/Next to Next week : for Nifty50 only
Current Month: Monthly expiry for NSE and BSE
Next Month: Next Monthly Expiry for NSE and BSE
Manual Date Input : Select this option for MCX and delta exchange india as well as NSE/BSE if date is not accurate automatically function. Suppose any Tuesday expiry for NSE is on holiday then you must select Manual date input.
Manual Expiry date: When you select Manual Input Date in above option then only you can select particular date of option expiry.
Delay Entry order by approx seconds: This option exclusively for Future and equity where new entry and previous exit order fire at the same time which cause margin release issues and hence order rejected due to low margin. This option gives signals at the same time but fires order after some seconds. Minimum 5 seconds are set but according to your symbols liquidity increases seconds specifically in MCX market where more than 10 seconds is appropriate. Always monitor such trades.
Consent and disclaimer
Always click this option : 'Trading involves a risk of loss and may not appropriate for every one. Please consider carefully if trading is appropriate for you. Past performance is not indicative of future results. Any signals appear on chart are for education purpose only. This signals can be optimised by yourself changing the variables in the indicator\'s input tab on various instruments and timeframe. It is your responsibility knowing that by clicking you are accepting that indicator would trade on your behalf at your own risk. We are not SEBI registered.'
Show Monthly Performance Table
This option enable the Monthly Performance in table form where month wise profit and loss are showing (on index it shows in point form). Percentage in () depends upon initial capital set in the property tab. Various Statistical parameters are also seen in table like : % profitability, profit factor, No of trades (W winnings and L Lossing), Max Run-Up, Max Drawdown, Initial capital, Backtest Range. This data only shows that shows on strategy tester without any deep backtesting.
Show Small PNL Table
This option enables a small profit and loss table for today’s trade only (except the last candle close)
Show Algo Setting Details Table
This table enables you to show which settings have you done for automation and also guides if you select the wrong option showing in red background color. Symbols, instruments, broker, client id, secret key, position on chart, expiry date (most important for FNO) please verify this date with actual option chain expiry date. Wrong expiry date lead to no execution of trade.
Creat Alert for Automation
At the end of indicator on three dot click on “Add alert on Universal Signal Trading Tool : Single Target”. Which Creat on Pop-Out Page with three different tab:
Settings Message and Notifications
#Settings
Symbols : current symbol
Condition: Universal Signal Trading Tool : Single Target
Interval: Same as chart
#Message
Alert Name: Type your Custom alert name
Message: by default you will this message : {{strategy.order.alert_message}}
Please do not change this message, do not use any json message here
#Notifications
Click on webhook url : (Only available if you have Tradingview subscription and two factor authentication is done) paste brokers valid webhook here (Use only active webhook). Please do not use api webhook, use only tradingview webhook separately available for tradingview User’s broker account.
Play sound as per your need
How to update an alert?
Once you create an alert on the current indicator and current chart with the same timeframe then green color watch you can see next to indicator name on chart. If green watch does not appear then the current indicator setting/symbol/timeframe is different from the setting in alert.
So if you have made any changes then you must update the alert.
See the right top side of the alert in the alert section: pause/ restart, edit and delete option are available. Click on edit option then pop-up window will open, select appropriate symbol if it is different, in condition dropdown menu if indicator name shows two time means second name is the new settings, so select second indicator name and select timeframe as same as chart and then click ok. Check if the green watch appears or not.
Trouble shooting
Q : I am not able to see signals on chart?
Check initial capital on chart, increase zero at end if required.
Always unclick the backtest date filter.
Check entry exit external signal properly selected.
Q: Trade not executing on broker panel?
Is alert generated in alert log? If yes then check secret code, expiry date if trading FNO, valid webhook and symbols. If No then update your alert.
Q: Order fails at broker?
Click on the failed order and see the reason and approach us via message on tradingview.
Note: Strategy used in the above strategy is only for example and demonstration purpose. It does not indicate to use the same strategy.
Results shown here are using the supertrend indicator (attached to this script as external indicator) with ATR length 1 and factor 30 on Nifty 50 index chart on 5 minute timeframe.
Always use your own criteria, risk management and proper backtesting before using the live capital. Do not go for blind trading, always monitor the automated trade in synchronization. Any misbehave by system or technical glitches leads to unwanted loss. So, think first, practice and go according to your analysis.
Your feedback and reporting any kind of bug is appreciable. Please reach us via message, comment or communication method available in our profile.
Стратегия Pine Script®
Peachain BTC SystemBTC Specialist is a rule-based trading strategy
designed to analyze Bitcoin market structure
and adapt positioning to changing market conditions.
The strategy focuses on participating in sustained BTC trends
while reducing exposure during weak, choppy,
or unfavorable market regimes.
Core principles:
– Regime-based market assessment
– Dynamic long/short positioning based on BTC strength
– Emphasis on risk control and drawdown management
– Designed to operate across multiple Bitcoin market cycles
The strategy does not attempt to predict exact market tops
or bottoms. Instead, it prioritizes structured exposure
during favorable conditions and capital preservation
when conditions deteriorate.
This script is intended for analytical and educational purposes only.
It does not constitute financial advice.
Стратегия Pine Script®
Peachchain ETH StrategyPeaChain ETH Strategy is a rule-based trading system
designed to analyze Ethereum market structure
and adapt positioning to changing market conditions.
The strategy focuses on participating in sustained ETH trends
while reducing exposure during weak, choppy, or unfavorable regimes.
Core principles:
– Regime-based decision making
– Dynamic positioning based on market strength
– Emphasis on risk control and drawdown management
– Designed to operate across multiple market cycles
The strategy does not attempt to predict market tops or bottoms.
Instead, it prioritizes structured exposure during favorable conditions
and capital preservation when conditions deteriorate.
This script is intended as an analytical and educational tool.
It does not constitute financial advice.
Стратегия Pine Script®
Peachchain AVAX SystemPeaChain AVAX Allocation System is a rule-based trading framework
designed to analyze AVAX market structure and adapt exposure
to changing market regimes.
The system focuses on identifying periods of sustained momentum
and trend strength, while reducing or avoiding exposure
during weak, choppy, or unfavorable conditions.
Key characteristics:
– Regime-based positioning rather than fixed signals
– Dynamic exposure adjustment based on market strength
– Emphasis on risk management and drawdown control
– Designed to operate across multiple market cycles
The script is intended to be used as a decision-support tool,
helping traders understand when market conditions are favorable
or unfavorable for AVAX exposure.
This is not a predictive model and does not aim to call exact tops
or bottoms. It prioritizes structure, consistency, and positioning
over short-term noise.
For educational and analytical purposes only.
This script does not constitute financial advice.
Стратегия Pine Script®
Bitwardex AI Algo 2.0Bitwardex AI Algo — Adaptive Intelligent Strategy
══════════════════════════════════════════════
📋 OVERVIEW
This comprehensive algorithmic strategy combines adaptive trend detection using Gaussian smoothing, statistical cluster analysis for support/resistance identification, and intelligent risk management into a unified decision-support system.
Unlike simple indicator combinations, this strategy implements an integrated analytical architecture where each component directly influences the others — the Heikin Ashi transformation feeds into Gaussian smoothing with adaptive sigma parameters, which adapts to volatility metrics (ATR), while the clustering engine uses this preprocessed data to identify statistically significant price zones that the trend filter validates before execution. This creates a synergistic system where removing any component fundamentally changes the behavior of the others.
══════════════════════════════════════════════
🎯 WHAT MAKES THIS UNIQUE
▸ Integrated Analytical Pipeline
Most strategies use independent indicators that don't interact. This system implements a complete analytical chain where:
- Heikin Ashi preprocessing reduces noise before Gaussian smoothing
- Gaussian smoothing adapts its sigma parameter based on pseudo-K-means trend classification
- Statistical clustering uses the smoothed data to identify statistically significant price zones
- Trend filter validates cluster-based signals using the same Gaussian-smoothed trend line
- Removing any component fundamentally changes the behavior of the others
▸ Statistical Cluster-Based Support/Resistance
Unlike traditional pivot-based or Fibonacci levels, this system uses statistical clustering methods to identify support/resistance zones. The algorithm dynamically adjusts boundaries based on:
- Current volatility (ATR ratio)
- Cluster strength (density of price points in each cluster)
- Price dispersion metrics
This creates adaptive levels that respond to market conditions rather than fixed historical points.
▸ Self-Analyzing Performance
Built-in real-time performance tracking monitors winrates for each TP level across three time windows (last 10, last 25, all trades), automatically tests 40 parameter variations in parallel, and provides optimization recommendations with overfitting protection filters.
▸ Human-Readable Market Intelligence System
The system transforms complex multi-indicator analysis (RSI, MACD, ADX, Bollinger Bands, ATR, volume) into clear text summaries that evaluate inter-indicator relationships, identify conflicts and consistency, and provide actionable market insights.
══════════════════════════════════════════════
🧠 HOW IT WORKS — METHODOLOGY
▸ Price Preprocessing with Heikin Ashi
The system uses Heikin Ashi transformation to reduce market noise and highlight significant trend patterns. Critical design decision: only confirmed values from previous bars (ha_close_prev, ha_open_prev, ha_high_prev, ha_low_prev) are used, which completely eliminates signal repainting. This means that signals you see in backtest are identical to those you would receive in real-time — no changes after appearance.
▸ Adaptive Trend Detection using Gaussian Smoothing
Instead of standard moving averages, the system uses Gaussian smoothing with adaptive sigma parameters. The Gaussian kernel is calculated as: weight = exp(-i²/(2σ²)), where sigma = length / (6.0 * trendStrength).
The trendStrength parameter dynamically adjusts based on market conditions detected via pseudo-K-means clustering:
- In trending conditions (cluster 1 or -1): sigma is reduced (0.5x), making the filter more responsive
- In sideways conditions (cluster 0): standard sigma (1.0x) is used for balanced filtering
The trend line itself is calculated using a pseudo-K-means approach that classifies market state into three clusters:
- Feature vector:
- Normalization: price_change uses sigmoid(priceChange/ATR), CCI is clamped to then scaled to , price_deviation uses sigmoid
- Centroids: uptrend=0.75, downtrend=0.25, sideways=0.5
- Classification: assigns to nearest centroid via Euclidean distance
- Adaptive response: in trending clusters, trend line is pulled closer to price (0.5x distance multiplier) and smoothing is reduced
▸ Intelligent Sensitivity Adaptation
The key innovation is dynamic adaptation of processing parameters depending on current market state. The system uses pseudo-K-means clustering to classify market conditions:
- Cluster 1 (Uptrend): Centroid at 0.75, based on normalized price change + normalized CCI + normalized price deviation
- Cluster -1 (Downtrend): Centroid at 0.25
- Cluster 0 (Sideways): Centroid at 0.5
Based on cluster assignment, the system automatically adjusts:
In trending conditions (cluster 1 or -1): Sensitivity multiplier reduced to 0.5x, trendStrength reduced to 0.5, making the system more responsive
In volatile conditions: Volatility factor (ATR / SMA(ATR, 14)) increases noise filtering
In sideways movements: Standard parameters apply balanced approach
▸ Signal Generation through Statistical Cluster Analysis
The system uses statistical clustering methods to identify significant price zones that represent potential support and resistance levels. The clustering algorithm analyzes recent price data to group prices into statistically significant clusters, identifying areas where price has historically consolidated.
The identified cluster boundaries are dynamically adjusted based on multiple market factors:
- Current market volatility (measured through ATR ratios)
- Statistical strength of cluster formations
- Price dispersion metrics
- User-defined sensitivity parameters
This creates adaptive support/resistance levels that respond to changing market conditions rather than relying on fixed historical points. The boundaries are recalculated on each bar to reflect current market structure.
Signals are generated when Heikin Ashi close crosses these statistically justified boundaries:
Long signals occur when price crosses below the lower cluster boundary, indicating a move toward a potential support zone
Short signals occur when price crosses above the upper cluster boundary, indicating a move toward a potential resistance zone
▸ Validation through Trend Filter
All signals undergo validation through a trend filter using the Gaussian-smoothed trend line. The filter confirms signal direction matches current trend:
- Long signals require: trendSide == 1 (trend >= trend and ha_close_prev > trend)
- Short signals require: trendSide == -1 (trend <= trend and ha_close_prev < trend)
Optional multi-timeframe confirmation is available, where the system automatically selects a higher timeframe (e.g., 1min → 5min, 5min → 15min) for additional signal validation, ensuring consistency with broader market context.
══════════════════════════════════════════════
🔬 WHY THIS COMBINATION IS ORIGINAL
This strategy is not a simple mashup of indicators. The integration creates novel behavior:
1. Feedback Loop Between Components
- Statistical clustering identifies price zones, but these zones are calculated using Gaussian-smoothed Heikin Ashi data
- The Gaussian smoothing adapts its responsiveness based on pseudo-K-means trend classification
- The trend filter validates cluster-based signals using the same adaptive trend line
- This creates a feedback loop where each component informs and adjusts the others
2. Statistical Justification for Levels
Unlike fixed pivot points or Fibonacci retracements, support/resistance levels are:
- Dynamically recalculated using statistical clustering methods with minimum point requirements for validity
- Adjusted by volatility factor (ATR ratio) and cluster strength (density)
- Statistically validated through cluster formation strength
- This adapts to changing market regimes rather than relying on historical levels
3. Adaptive Smoothing Based on Market Regime
The Gaussian smoothing doesn't use fixed parameters. Instead:
- Sigma adapts based on market regime classification (trending vs sideways)
- In trending markets, reduced smoothing (0.5x sigma) allows faster response
- In sideways markets, standard smoothing filters noise effectively
- This prevents the common problem of lag in trends and noise in ranges
4. Multi-Layer Signal Validation
Signals must pass multiple validation layers:
- Cluster boundary crossing (statistical significance)
- Trend direction confirmation (adaptive trend filter)
- Optional multi-timeframe validation
- This reduces false signals compared to single-indicator approaches
══════════════════════════════════════════════
📊 UNIQUE FEATURES
▸ 🤖 AI Market Summary — Intelligent Market Analysis
The system transforms complex multi-indicator analysis into understandable text summaries written in the style of professional market reports. The system collects data from multiple sources:
Data Collection:
Trend metrics: price position relative to EMA, trend direction, trend strength (ADX)
Momentum indicators: RSI levels, MACD signals, momentum histogram
Volatility: ATR percentage value, Bollinger Bands width, squeeze detection
Volume analysis: current volume to average ratio, volume spike detection
Price action: candlestick pattern analysis, proximity to key levels
Processing and Analysis:
Each category is analyzed through specialized functions that not only calculate numerical scores but also evaluate inter-indicator relationships. The system identifies conflicts and consistency between different signals, creating a holistic picture of market conditions.
Summary Generation:
The result is a coherent text report that includes:
Current market state (trend/flat, volatility, phase)
Key support and resistance levels
Possible development scenarios
Identified risk factors and warnings
Recommendations for interpreting current situation
The summary updates with configurable frequency (default every 10 bars) to balance information freshness and readability.
▸ 📈 Multi-Level Winrate Tracking
The system provides detailed performance statistics for each take-profit level across three time windows, allowing tracking of both short-term changes and long-term trends.
Time Windows:
Last 10 trades : Shows immediate changes in performance, helps identify current shifts in strategy effectiveness
Last 25 trades : Reflects medium-term trends, balances between relevance and statistical significance
All trades : Provides long-term baseline for comparison
Visualization:
Each winrate matrix cell has color coding with gradient from dark red (0%) to bright green (100%), allowing instant assessment of each TP level's effectiveness.
Practical Applications:
Identifying most reliable TP levels in current market conditions
Detecting strategy degradation (when recent performance is significantly lower than historical)
Validating parameter changes — comparing performance before and after adjustments
Comparing effectiveness across different timeframes and instruments
Making decisions about volume distribution between TP levels
▸ ⚙️ AI Strategy Optimizer — Automatic Optimization
The system automatically tests 40 sensitivity parameter variations in real-time, providing optimization recommendations without the need for manual backtesting.
Mechanism:
On each confirmed bar, the system runs parallel sensitivity simulations using the backtest library. Each simulation:
1. Generates signals using calculateLevelsAndConditions() with different sensitivity multipliers
2. Fully reproduces the strategy's trading logic, including all risk management mechanisms (TP/SL, trailing stop, breakeven)
3. Calculates metrics: comprehensive score, winrate, profit factor, net profit
4. Applies configurable filters (minimum trades, winrate, profit, profit factor)
5. Selects best parameters based on four criteria: Optimal (balanced score), Best Profit, Best Winrate, Best Profit Factor
Optimization Metrics:
The system provides four different criteria for selecting optimal parameters:
Optimal : Balanced comprehensive score considering profit, winrate, and profit factor simultaneously. Recommended for most cases.
Best Profit : Maximizes net profit in absolute values. Suitable for aggressive traders willing to accept lower winrate for greater profit.
Best Winrate : Focuses on maximum percentage of winning trades. Ideal for conservative traders preferring stability.
Best Profit Factor : Optimizes profit to loss ratio. Shows how efficiently the strategy generates profit relative to risk.
Protection Filters:
To prevent overfitting and ensure statistical significance, configurable filters are available:
Minimum trades : Requires minimum number of historical trades for result validation (recommended ≥30)
Minimum winrate : Excludes options with unacceptably low win percentage
Minimum profit : Filters options that don't reach target profitability level
Minimum profit factor : Ensures profit/loss ratio meets requirements
Overfitting Protection:
Multiple metrics prevent optimization on a single statistic
Minimum trade requirements ensure statistical validity
Comparing different time windows helps identify degradation of "optimal" parameters
══════════════════════════════════════════════
🎯 RISK MANAGEMENT
▸ Take-Profit: Multi-Level Exit System
The strategy supports up to 4 independent take-profit levels, each configurable individually.
Calculation Modes:
Percentage mode : Fixed percentage from entry price, simple and clear
ATR mode : Distance calculated based on Average True Range, automatically adapts to current instrument volatility
Partial Exits:
Each TP level can close a configurable percentage of position, allowing flexible profit distribution strategy:
Default: 25% at each of first three TPs, 100% at fourth
Fully configurable volume distribution between levels
Ability to disable any level while keeping others
Multi-Level System Advantages:
Capturing profit at early stages of movement
Preserving part of position for potentially large moves
Reducing psychological pressure through partial profit locking
▸ Stop-Loss: Adaptive Protection
The system offers several stop-loss calculation methods for optimal capital protection.
Calculation Modes:
ATR mode : Stop is placed at distance multiple of current ATR. Automatically widens in volatile conditions and narrows in calm markets, providing adequate protection without excessive risk.
Percentage mode : Fixed percentage from entry price. Simple and predictable method, suitable for stable instruments.
Features:
Fully configurable multiplier/percentage
Ability to disable stop-loss (not recommended)
Automatic adjustment when breakeven or trailing stop activates
▸ Trailing Stop: Profit Protection
Advanced trailing stop system that automatically moves stop-loss in favorable direction, protecting profit while maintaining potential for further growth.
Activation Modes:
Immediate activation : Trailing starts immediately after position entry
Threshold activation : Trailing activates only after reaching certain profit percentage, allowing position to "breathe" at early stages
Calculation Modes:
Percentage mode : Stop held at fixed percentage from maximum achieved price
ATR mode : Trail distance calculated based on ATR, adapting to volatility
Key Features:
Stop moves only in favorable direction, never backward
Automatic update when new extremes are reached
Full integration with alert system for change notifications
▸ Breakeven: Automatic Entry Protection
The system automatically moves stop-loss to entry level after reaching certain profit threshold, guaranteeing no loss on further movement.
Activation Modes:
Percentage mode : Activation when reaching certain profit percentage
ATR mode : Activation when reaching distance multiple of ATR
TP-based mode : Activation when reaching one of take-profit levels (TP1, TP2, TP3, or TP4)
Advantages:
Psychological comfort — position protected from loss
Ability to hold position for large moves without risk
Automatic management without need for manual intervention
▸ Position Size Management
Flexible position size management system with multiple modes and additional optimization mechanisms.
Size Modes:
Fixed amount : Position opened for fixed amount in dollars (or other currency)
Percentage of deposit : Position size calculated as percentage of current deposit, automatically adapts to balance changes
Consolidation Risk Control:
Unique function that automatically increases position size when detecting periods of low volatility (consolidation). Logic is based on the fact that during low volatility periods, stop-losses are placed closer to price, meaning lower absolute risk per position. Size increase compensates for this, maintaining constant risk level.
Martingale (Optional):
The system supports optional martingale mechanism with configurable multiplier:
Activation only after losing trade
Configurable size increase multiplier (default 1.5x)
Protection against excessive increase through maximum position size limit
Automatic reset to base size after profitable trade
Leverage:
Full support for trading with leverage:
Configurable leverage value (default 10x)
Automatic position size calculation considering leverage
Correct profit/loss calculation including commissions
▸ Commissions
Full support for commission accounting:
Configurable commission percentage (default 0.04%)
Automatic commission accounting in profit/loss calculations
Commission impact considered in all backtests and optimizations
══════════════════════════════════════════════
📐 VISUAL INTERFACE
Information Tables:
▸ Control Panel
Comprehensive information panel displaying all key metrics:
Header and Status:
Strategy status indicator (LONG/SHORT/Waiting)
First trade date for history tracking
Current instrument and timeframe information
Winrate Matrix:
Three-dimensional matrix: 4 TP levels × 3 time windows
Color coding with gradient for instant assessment
Percentage values with integer precision
Allows quick identification of most effective levels
AI Strategy Optimizer:
Four recommendation rows with different optimization criteria
Display of recommended sensitivity for each criterion
Corresponding profit and profit factor metrics
Color coding for quick assessment of recommendation quality
Information about active optimization filters
Display Settings:
Table position selection (4 screen corners)
Configurable text size (tiny, small, normal)
Dark color scheme for comfortable viewing
▸ AI Market Summary Table
Separate table with textual market analysis in professional report style:
Content:
Complete textual summary of current market state
Analysis of trend, momentum, volatility, and volume
Identified key levels and scenarios
Risk factors and warnings
Settings:
Independent positioning from main panel
Configurable text size
Update frequency (default every 10 bars)
Automatic caching for performance optimization
Alert System:
▸ Internal Alerts
Human-readable alerts for manual trading or notifications:
Entry Alert:
Instrument ticker
Position direction (LONG/SHORT)
Entry price
All active TP levels with exit volumes
Stop-loss level
Leverage
Order size
TP Achievement Alert:
Ticker and position direction
Number of achieved TP level
Entry price for reference
SL Trigger Alert:
Ticker and position direction
Notification of position closure by stop-loss
Trailing Stop Alert:
Notification of trailing stop trigger
Position direction information
Breakeven Alert:
Notification of breakeven activation
New stop-loss level
Dynamic Exit Alert:
Exit reason (e.g., "RSI overbought exit")
Closed position direction
▸ Custom Alerts
Fully configurable text messages for each event type:
Custom entry alert
Custom TP achievement alert
Custom SL trigger alert
Useful for integration with external systems or message personalization
▸ JSON Format Alerts
JSON format alerts for integration with external trading systems
Features:
Complete information about all TP levels with exit volumes
Automatic generation of correct JSON structure
Support for all event types (entry, exit, SL change)
Structured format includes: key_hash, signal_hash, action, side, symbol, amount, leverage, stopLoss, take_profits array
══════════════════════════════════════════════
⚠️ IMPORTANT DISCLAIMERS
DOES NOT:
Predict future prices — identifies probabilistic setups
Guarantee profits — all trading involves risk
Work equally everywhere — performance varies by instrument/TF
Eliminate need for risk management — use appropriate sizing
Recommendations:
Paper trade first
Start with small positions
Monitor winrate tables continuously
Re-optimize if recent performance degrades
Understand the logic before live trading
This strategy is intended for educational and informational purposes. Conduct your own research before trading with real capital. Past performance does not guarantee future results.
Стратегия Pine Script®
Session Liquidity Sweep + Trend ConfirmationThis strategy aims to capture high-probability intraday trades by combining liquidity sweeps with a trend confirmation filter. It is designed for traders who want a systematic approach to trade breakouts during specific market sessions while controlling risk with ATR-based stops.
How it Works:
Session Filter: Trades are only considered during a defined session (default 9:30 - 11:00). This helps avoid low-volume periods that can lead to false signals.
Trend Confirmation: The strategy uses a 50-period EMA to identify the market trend. Long trades are only taken in an uptrend, and short trades in a downtrend.
Liquidity Sweep Detection:
A long entry occurs when price dips below the prior N-bar low but closes back above it, indicating a potential liquidity sweep that stops being triggered before the trend continues upward.
A short entry occurs when price spikes above the prior N-bar high but closes below it, signaling a potential sweep of stops before the downward trend resumes.
ATR-Based Risk Management:
Stop loss is calculated using the Average True Range (ATR) multiplied by a configurable factor (default 1.5).
Take profit is set based on a risk-reward ratio (default 2.5x).
Position Sizing: Default position size is 5% of equity per trade, making it suitable for risk-conscious trading.
Inputs:
Session Start/End (HHMM)
Liquidity Lookback Period (number of bars to define prior high/low)
ATR Length for stop calculation
ATR Stop Multiplier
Risk-Reward Ratio
EMA Trend Filter Length
Visuals:
Prior Liquidity High (red)
Prior Liquidity Low (green)
EMA Trend (blue)
Why Use This Strategy:
Captures stop-hunt moves often triggered by larger market participants.
Only trades with trend confirmation, reducing false signals.
Provides automatic ATR-based stop loss and take profit for consistent risk management.
Easy to adjust session time, ATR, EMA length, and risk-reward to suit your trading style.
Important Notes:
Assumes 0.05% commission and 1-pip slippage. Adjust according to your broker.
Not financial advice; intended for educational, backtesting, or paper trading purposes.
Always test strategies thoroughly before applying to live accounts.
Стратегия Pine Script®
Logit Alpha Ranker For BTCThe ORLA Ranker is a "Fat-Tail" strategy. It is designed to ignore noise and only participate in high-probability, high-conviction trends. Its ability to achieve a 3.8+ Profit Factor on BTC suggests that the Logit model effectively filters out the volatility "churn" that kills most retail trend-following scripts.
Efficiency: The strategy is highly selective, with only 66 trades over nearly a decade. This low frequency minimizes commission drag and slippage.
Стратегия Pine Script®
ezzy Golden Cross mit Target und StopA simple crossover system based on SMA 50 and SMA 200 including percentage target and stop loss.
Стратегия Pine Script®
ezzy_goldencross This strategy is a simple crossover trading strategy using SMA 50 and SMA 200 (long only). I also implemented a percentage profit target and stop loss.
Стратегия Pine Script®
S99XAU-strategyXAUdaily Trading System - Intelligent Solution
🌟 Core Value
An intelligent trading engine specifically designed for the gold market, combining multiple filtering mechanisms and dynamic risk control to identify high-probability trading opportunities in complex market conditions.
🔥 Four Core Modules
1. Dual-Line Resonance Signal System
Primary Frequency Tracker: Quickly captures subtle price change characteristics
Auxiliary Confirmation Line: Verifies trend strength and continuity
Collaborative Operation: Dual-line crossover combined with special algorithm processing to generate high-quality trading signals
2. Triple Intelligent Filtering Network
🔍 Volatility Activity Detection: Automatically identifies effective volatility, avoiding market noise
🔍 Capital Flow Confirmation: Analyzes volume anomalies to capture main force movements
🔍 Trend Environment Adaptation: Multi-timeframe trend consistency assessment to ensure trend-following trades
3. Dynamic Risk Management System
🛡️ Adaptive Protection: Adjusts stop-loss spacing based on market volatility rate
🎯 Intelligent Moving Protection: Automatically moves stop-loss upward when trend is favorable to lock in profits
📊 Risk Visualization: Real-time display of stop-loss line for clear understanding of risk boundaries
4. Visual Decision Panel
📈 Clear Signal Marking: Green for buy/Red for sell, intuitive and clear
⚠️ Filtering Tips: Gray markers show signals excluded by the system
🎯 Risk Monitoring: Continuous display of stop-loss line during holding period
Suitable Market Environment:
✅ Gold intraday trading
⚙️ Quick Start Guide
Load to gold 3-minute to 4-hour charts (depending on your preferred timeframe)
Start observing with default parameters
Familiarize yourself with signal characteristics in a demo account first
Adjust stop-loss parameters based on personal risk tolerance (Recommended: depending on your broker's gold quote decimal places, for 2 decimal places: 420, 80; for 3 decimal places: 4200, 800)
Friendly reminder: The maximum loss per trade is based on the gold price, not account balance. Recommended parameter: 0.2
💎 Why Choose This System?
For Beginners: Provides clear trading signals, avoiding complex analysis
For Experienced Traders: Complements existing trading systems, provides additional confirmation
For Busy Individuals: Automated signal generation saves chart-watching time
Professional Tip: Any trading system needs to match your personal risk tolerance. It's recommended to start with small positions to familiarize yourself with the system characteristics, find the parameter configuration that best suits you.
Стратегия Pine Script®
George QQQ 2H Gold Standard (Production)For QQQ 2H Gold Standard (Production).
In last 365 days QQQ backtest, P&L 45% Max.DD 10%
Short term back test only, 2h timeframe on QQQ only.
Стратегия Pine Script®
High Probability Trend Continuation (1:5 RR)this strategy is based on a high-probability trend continuation pattern, one of the most frequently occurring setups in financial markets. It uses EMA trend alignment to identify strong bullish or bearish conditions and waits for a controlled pullback before entering a trade in the direction of the trend.
Risk management is fully automated using ATR-based stop losses, ensuring the strategy adapts to market volatility. Each trade is executed with a fixed 1:5 risk-to-reward ratio, allowing profitability even with a modest win rate.
The strategy is designed to work across multiple markets and timeframes, including forex, stocks, indices, and crypto, making it suitable for both intraday and swing trading.
Стратегия Pine Script®
BTC 4H v5.5 Breakout - Retest (Perp) + Anti-Chop + Riskmy sdfgsdgsdg
fgsdgsdgs
FGsdgsdfgsdgs
fgsdgdsfgsdgsdgsdg
sfdgsdgf dfgsgsgsdgs. sdgsfsgsdg
Стратегия Pine Script®
PIPSHUSTLEHeikin Ashi + EMA 50 Strategy
A clean trend-following indicator that combines Heikin Ashi candles with the 50 EMA to filter market noise and identify high-probability entries. Buy signals appear when price stays above the EMA 50 with bullish Heikin Ashi momentum, while sell signals trigger below the EMA 50 with bearish confirmation. Ideal for spotting smooth trends and staying in profitable moves with clarity.
Стратегия Pine Script®
BTC 5m Cycle Scalper newwwcreate a strategy, which buys low and sell high, with the idea of smart hodl" and taking advantage of the crypto cycles.
I have create a freash strategy which you can editas you wish.
You can check the strategy tester to see if your reation works well and if not impve it forther until you have found a version, hich has the ighest profit to drawdown atio"
Strategy settings:
Make sure the straegyhas at least 2 trades stsrt trading from 2018-01-01 onwards. 0.1% commission. 1 tick slippage.
Avoidng Basic Issues: Tp Paste your latest code into the pine editor click into the text area (middle of the area or at the end of a code line) so you can be sure you have activated the text area before you select all and paste the new code.
Стратегия Pine Script®
Multi-Indicator Trend-Following Strategy 1-minute Gold strategyTrend following using many indicators to provide accurate buy and sell signals on the 1-minute gold chart
Стратегия Pine Script®
ORB Breakout Strategy📊 Overview
📈 Systematic intraday Opening Range Breakout (ORB) strategy
🧭 Designed for index CFDs (e.g. US500)
⏱️ Optimized for 5-minute charts during regular trading hours
🛡️ Strict risk management and position sizing
🚦 Maximum one trade per day
💡 Core Idea
🌅 The market establishes a key price range shortly after the open
🚀 A confirmed breakout from this opening range can signal directional momentum
🎯 The strategy trades only confirmed breakouts with predefined risk
📐 Opening Range Definition
⏰ Opening range is defined between 09:30 and 09:45 (exchange time)
🕯️ Uses the first three 5-minute candles of the session
⬆️ Opening Range High is the highest high of those candles
⬇️ Opening Range Low is the lowest low of those candles
🟢 Long Trade
📊 A 5-minute candle closes above the Opening Range High
🟩 A Fair Value Gap (FVG) exists relative to the candle 10 minutes earlier
🧲 A buy limit order is placed at the Opening Range High
🔴 Short Trade
📉 A 5-minute candle closes below the Opening Range Low
🟥 A Fair Value Gap (FVG) exists relative to the candle 10 minutes earlier
🧲 A sell limit order is placed at the Opening Range Low
🛑 Stop Loss
📉 Long trades use the low of the candle 10 minutes before the breakout
📈 Short trades use the high of the candle 10 minutes before the breakdown
🎯 Take Profit
⚖️ Fixed reward-to-risk ratio of 2:1
📏 Take profit distance equals two times the stop loss distance
💰 Position Sizing
💵 Fixed dollar risk per trade (default: $2,000)
📐 Position size is calculated dynamically based on stop loss distance
🔁 Risk remains consistent across changing volatility conditions
⏳ Trade Management Rules
🚦 Maximum one trade per day, including same-bar entries and exits
🕛 No new entries after 12:00 (exchange time)
⏰ All open positions are closed at 15:50
❌ Pending orders are cancelled after the entry cutoff or at session end
⚙️ Execution & Costs
💸 Commission model can be configured in the strategy settings
🧪 Backtests use TradingView Strategy Tester mechanics
📝 Notes
📚 This is a rules-based trading strategy, not a signal service
🔍 Results depend on instrument, broker feed, spreads, and commissions
🧠 Forward testing is strongly recommended before live trading
⚠️ Disclaimer
📖 This script is provided for educational and research purposes only
🚫 It does not constitute financial advice
🔥 Trading leveraged instruments involves significant risk
Стратегия Pine Script®
Gold Futures Prop-Firm Strategy (GC) 1-18-2026Overview
This is a long-only, session-based, multi-regime trading strategy designed specifically for Gold futures (GC / GC1!) on intraday timeframes (typically 5–15 minutes).
The strategy aims to capture high-probability moves during the New York and Asian sessions while avoiding major economic news events and enforcing strict daily risk limits — making it suitable for prop firm challenges (e.g. FTMO, FundedNext, Apex, etc.) that require consistent profitability, limited drawdown, and disciplined risk management.
Core Philosophy
Trade longs only (shorts were removed after analysis showed they were consistently unprofitable)
Different logic depending on session and market regime (trending vs ranging)
Heavy filtering using trend strength (ADX), volume confirmation, EMA alignment, Bollinger Bands, and RSI
Strict position sizing, daily loss cap, per-session trade limits, and news blackout periods
Trailing stop mechanism to let winners run while protecting against reversals
Trading Sessions & Time Windows (Eastern Time)
NY Session: 08:30 – 15:00 ET
NY AM (trend/breakout zone): 08:30 – 11:30 ET
NY PM (mean-reversion zone): 11:30 – 15:00 ET
Asia Session (mean-reversion zone): 18:00 – 02:00 ET
News blackouts: short windows around high-impact releases (CPI/NFP, ISM/Fed, FOMC)
Entry Logic (Long Only)
NY AM – Trend Following & Breakouts (strongest trend filter)
ADX > 30 (strong trend)
Price above 200 EMA (bull regime)
Fast EMA (21) crosses above Slow EMA (55) or breakout above 20-bar high
Volume spike (> 1.4 × 20-period SMA)
Max 2 trades per NY session per day
NY PM & Asia – Mean Reversion
ADX ≤ 30 (ranging market)
Price below lower Bollinger Band (20, 2.0)
RSI < 25 (deep oversold)
No volume filter required here
Max 2 trades per Asia session per day
Risk Management Rules
Position size: Fixed 1–2 contracts (user selectable)
Initial stop: 1.7 × ATR(14) below entry (tightened from original)
Trailing stop:
Activates after price moves +1.0 × ATR in profit
Trails by 1.0 × ATR (locked-in profits aggressively)
Daily loss limit: -$600 (stops all trading for the day once hit)
No trading during defined news windows
Pyramiding disabled (only one position at a time)
No short entries (removed after backtest analysis)
Indicators Used
EMA 21 / 55 / 200 (trend direction & filter)
ATR(14) × 0.85 (volatility base)
ADX(14) threshold 30 (strong trend confirmation)
Bollinger Bands (20, 2.0) for mean-reversion entries
RSI(14) with oversold < 25
Volume spike filter (1.4× SMA) for trend/breakout entries
20-bar highest high / lowest low for breakout detection
Visual Elements on Chart
Fast (blue), Slow (orange), and Filter (red) EMAs
Bollinger Bands (gray, semi-transparent fill)
Background coloring:
Red tint during news blackout periods
Purple tint when daily loss limit is hit
Intended Use Case
Prop trading firm evaluation accounts
Conservative intraday gold trading
Focus on high-quality long setups in trending (NY AM) and mean-reverting (Asia/PM) environments
Goal: positive expectancy with controlled drawdown, suitable for passing drawdown and profit targets
Стратегия Pine Script®
eth-usdc.P 1-hour xingchen fuli eth-usdc.P 1-hour xingchen fuli
Add xingchenfuli168 on Telegram to receive the user manual and the indicator backtesting data record sheet.
Стратегия Pine Script®
BTCUSD 1D Trend Strategy [Gemini]1Dchart
100% of equity per trade
0.1% commission
1 tick slippage
please convert this indicator to a trading strategy as you see fit
find attached the date of the chart and the indicator on BTCUSD 1D chart so you can make a better decision when to buy and sell
avoid forward looking and repainting at all costs.
Don't add tables to the chart
don't ever use line breaks in function calls:
long only
2018-2069
1D chart
100% of
Стратегия Pine Script®
Axis-Pro System | Trend Structure + Fibonacci Pullbacks Axis-Pro System is a comprehensive Trend Following strategy designed to trade high-probability pullbacks. Unlike indicators that merely chase price, this system patiently waits for market structure alignment before seeking an entry.
The system is built on the premise of "Quality over Quantity", utilizing volatility and structure filters to avoid choppy markets (ranges) and false breakouts.
🧠 Strategy Logic
The system makes decisions based on a strict 4-step hierarchy:
Higher Timeframe (HTF) Bias:
Analyzes the trend on a higher timeframe to ensure we are trading in the direction of the dominant flow.
Structure & BOS (Break of Structure):
Identifies clear impulses that break previous highs or lows. Once a BOS is confirmed, the system "arms" the trade and waits.
Fibonacci Zone Pullback:
It does not chase the breakout. Instead, it waits for a pullback into the "Discount Zone" (Golden Zone, configurable between 0.382 and 0.618) to improve the Risk/Reward ratio.
Validation & Trigger:
Uses an ATR expansion check to filter out low-volatility periods.
Requires candle confirmation and alignment with fast EMAs before pulling the trigger.
🛡️ Risk Management
The system incorporates advanced position management using a split execution model (50/50):
Dynamic Stop Loss: Automatically calculated using an ATR multiplier or the recent Swing High/Low (whichever offers better protection).
TP1 (Take Profit 1): Closes 50% of the position at a fixed R-multiple (e.g., 1.5R) to lock in profit and moves the Stop Loss to Break-Even.
TP2 (Runner): The remaining 50% is left to run for higher targets (e.g., 3.0R) or until the trend bends, maximizing gains during strong moves.
Trailing Stop: Optional feature to trail price with a fast EMA once the first target is hit.
⚙️ Settings & Features
The script is highly customizable for different assets (Crypto, Forex, Indices):
Date Range Filter: Includes a date selector to perform precise Backtesting on specific periods (e.g., testing specifically during a Bear Market vs. Bull Market).
Auto Trendlines: Automatically draws relevant trendlines for visual support.
Quality Filters: Options to toggle the EMA 200 filter and breakout buffers.
⚠️ Disclaimer
This strategy is a tool for analysis and backtesting purposes. Past performance does not guarantee future results. It is highly recommended to test the strategy on a Demo account first and adjust parameters according to the volatility of the specific asset being traded. Always use responsible risk management.
Стратегия Pine Script®






















