אסטרטגיית Pine Script®
אינדיקטורים ואסטרטגיות
אסטרטגיית Pine Script®
Swing Strategy Feature Set A [theEccentricTrader]█ OVERVIEW
This swing strategy is part of a broader research and exploration framework designed to encourage users to experiment with a variety of technical concepts and evaluate the comparative effectiveness of different strategy configurations. For example, users can first configure a core strategy as a benchmark, then iteratively test a range of feature configurations as additional entry conditions and compare their performance against one another and against the core strategy.
Feature Set A includes concepts beginning with the letter "A" and forms part of a larger swing strategy suite that covers a wide range of technical concepts. The objective of the suite is not curve-fitting, but rather structured experimentation, exploration and statistical validation (or invalidation) of technical concepts.
Concepts exclusive to the feature set are as follows:
Accumulation/Distribution
Arnaud Legoux Moving Average
Aroon
Average True Range
Awesome Oscillator
█ OPERATIONAL
Initial Capital
The initial capital is defined as a monetary value denominated in a given base currency.
The default initial capital is set to 100,000.
The default base currency is set to the selected symbol's default base currency.
Users can adjust the initial capital and select an alternative base currency via strategy Settings/Properties.
Risk as Percentage of Equity
The equity is defined as the sum of initial capital, net profit and open profit.
The risk is defined as a percentage of equity per-trade. As a result, net profit outcomes are subject to compounding effects over time.
The default risk is set to 1% of equity.
Users can adjust the strategy's per-trade risk via strategy Settings/Inputs/STRATEGY.
For further information on how the risk is applied in practice, refer to the position sizing section below.
Unit of Value
The unit of value is defined as a decimal precision factor that converts user-defined point or pip distances into actual price units used by the selected symbol.
Different symbols express price movement using different conventions. For example, some symbols are quoted directly in whole price points, while others use pips or fractional point increments. The unit of value provides a normalisation layer that allows all distance-based logic in the strategy to operate consistently across symbols.
Examples:
A unit of value of 1 corresponds to a price increment of 1.0
A unit of value of 10 corresponds to a price increment of 0.1
A unit of value of 100 corresponds to a price increment of 0.01
A unit of value of 1000 corresponds to a price increment of 0.001
A unit of value of 10000 corresponds to a price increment of 0.0001
Users should consult their broker’s published symbol specifications to confirm how price movement is defined for the symbols they intend to backtest. Incorrect configuration of the unit of value may result in misaligned stop distances, targets and/or risk calculations.
The default unit of value is set to 1.
Users can adjust the unit of value via strategy Settings/Inputs/STRATEGY.
Stop Buffer
The stop buffer is defined as the number of points or pips beyond a stop loss level required for the level to be considered clearly breached.
The default stop buffer is set to 0 points/pips.
Users can adjust the stop buffer via strategy Settings/Inputs/STRATEGY.
Risk Range
The risk range is defined as the difference between the entry price and the stop loss price (inclusive of the stop buffer) for any given trade.
Position Sizing
Position sizing determines the quantity of contracts, shares or units opened for each trade based on the user-defined risk and the selected symbol’s pricing structure.
"syminfo.pointvalue" is a built-in Pine Script variable that defines the number of underlying units contained within a single contract for any given symbol, and is critical for accurate position size calculations.
The position size is calculated as follows:
The risk range is multiplied by the syminfo.pointvalue to convert the price movement into its monetary equivalent.
The user-defined risk amount (expressed as a percentage of equity) is divided by this monetary risk per unit to determine the position size.
This ensures that each trade risks a consistent proportion of account equity regardless of point or pip based quoting conventions, symbol price scale or contract specifications.
While the strategy targets a fixed percentage of equity risk per-trade, the exact risk applied cannot always be matched precisely due to symbol-specific constraints such as contract sizing and margin requirements. In these cases, the strategy opens the largest permissible position that does not violate operational constraints, resulting in a realised risk that is as close as possible to the user-defined risk without exceeding it.
For further information on the syminfo.pointvalue variable, please refer to:
www.tradingview.com
Margin
The margin is defined as the minimum percentage of a position’s notional value that must be covered by the strategy’s available equity in order for TradingView's strategy tester to simulate opening and maintaining that position. For example, a margin setting of 25% means the simulated account must hold equity equal to at least 25% of the position’s notional value in order to enter or maintain that trade, the remaining 75% is considered provided by the simulated broker.
A lower margin percentage allows the account to open larger positions relative to its equity, because the required equity portion is smaller. Conversely, a higher margin percentage demands more of the account's equity be committed to any given position.
When the account’s equity falls below the required margin, the strategy tester emulates a margin call event, in which the broker emulator forcibly closes or reduces positions so that remaining positions no longer exceed available equity relative to the margin requirement. This behaviour is documented as part of TradingView’s margin/leverage feature for strategies.
Margin settings in a strategy are used solely for simulation purposes and do not automatically match any broker’s real-world margin requirements (which can vary by broker, asset class and symbol). Users should consult their broker’s published specifications for further details.
The default margin is set to 25% for both long and short positions.
Users can adjust the margin for long and short positions independently via strategy Settings/Properties/MARGIN.
For further information on the strategy tester's margin functionality, please refer to:
www.tradingview.com
www.tradingview.com
Pyramiding
The pyramiding count is defined as the maximum number of open positions permitted at any one time. TradingView's strategy tester does not facilitate hedging, as such, long entries will close any open short positions and short entries will close any open long positions.
The default pyramiding count is set to 100.
Users can adjust the pyramiding count via strategy Settings/Properties.
For further information on TradingView's strategy tester and broker emulator, please refer to:
www.tradingview.com
Spread
The spread is defined as the difference between a given symbol's bid (buy) price and ask (sell) price.
Typical spreads vary by broker and symbol. Some brokers offer fixed spreads on certain symbols, while others offer variable spreads that fluctuate with market conditions. Users should consult their broker's published specifications for further details.
Commission
The commission is defined as a transaction cost applied by a broker and may be expressed as a percentage of position size, a per-contract fee or a fixed fee per-transaction.
Commission structures vary by broker and symbol. Some brokers charge no explicit commission and instead generate revenue through the spread or other indirect sources, while others will typically apply one of the three aforementioned commission types, depending on the product offered. Users should consult their broker's published specifications for further details.
The default commission is set to 0.005% of position size.
Users can select and adjust the commission type via strategy Settings/Properties/COST SIMULATION.
█ CORE STRATEGY
Green and Red Candles
A green candle is defined as a candle that closes at or above its open price and a red candle is defined as a candle that closes below its open price.
Swing Highs and Swing Lows
A swing high is defined as a green candle, or a series of consecutive green candles, followed by a single red candle that completes the swing and forms the peak.
A swing low is defined as a red candle, or a series of consecutive red candles, followed by a single green candle that completes the swing and forms the trough.
Peak and Trough Prices
The peak price of a complete swing high is either the high of the red candle that completes the swing high or the high of the preceding green candle, depending on which is higher.
The trough price of a complete swing low is either the low of the green candle that completes the swing low or the low of the preceding red candle, depending on which is lower.
Fixed Reward-to-Risk
Fixed reward-to-risk is defined as a user-defined reward multiple for a given unit of risk.
Variable Reward-to-Risk
Variable reward-to-risk is defined as a path-dependent reward multiple for a given unit of risk.
Swing High Swing Low (SHSL) Strategy
The SHSL strategy uses swing lows for core long entry conditions and swing highs for core short entry conditions. The strategy is designed for standard OHLC candlestick charts only and will not behave as intended on other chart types.
All entries are processed at candle close and use the candle close price for the entry price.
Long stop losses are anchored to the most recent trough and short stop losses are anchored to the most recent peak.
Users can choose between long-only and short-only configurations, or alternatively simulate trades in both directions (long-short). However, when the "Both" option is selected, long entries will close any open short positions and short entries will close any open long positions (as mentioned in the pyramiding sub-section above). This can and will result in variable reward-to-risk outcomes.
The default direction is set to "Long" for a long-only configuration.
The default exit type is set to "Target" for a fixed reward-to-risk configuration.
Long targets are determined by adding a user-defined multiple of the risk range to the entry price and short targets are determined by subtracting a user-defined multiple of the risk range from the entry price.
Even when using a fixed reward-to-risk configuration, realised reward-to-risk outcomes may vary due to market gaps, particularly when positions are held across session boundaries or market closures. Gaps can cause stop losses or exits to be executed at prices materially different from those implied by the strategy’s static distance calculations. Users who wish to minimise gap-related variability may consider applying the close at end of session filter (see core filters section below), accepting that this introduces its own form of reward-to-risk variability.
The default reward-to-risk is set to 1.
Users can adjust strategy parameters via strategy Settings/Inputs/STRATEGY. Selecting a non-target exit type removes profit targets and renders the reward-to-risk input inactive.
Trailing Stop Loss
A trailing stop loss is defined as an exit type that dynamically moves a stop loss level in a favourable direction when a predefined condition is met. For example, a predefined point move or the formation of a higher trough or lower peak.
Risk Range Trailing Stop Loss
The risk range trailing stop loss is defined as a trailing stop mechanism that activates once price has moved favourably by one full risk range. Upon activation, the stop loss is moved to breakeven and subsequently trails favourable price movement by the risk range into profit.
Users can apply this exit type by selecting "Trail" via strategy Settings/Inputs/STRATEGY.
Trend Trailing Stop Loss
The trend trailing stop loss is defined as a trailing stop mechanism that dynamically moves a stop loss level to newly formed higher troughs (for longs) or lower peaks (for shorts).
Users can apply this exit type by selecting "Trend Trail" via strategy Settings/Inputs/STRATEGY.
Candle Trailing Stop Loss
The candle trailing stop loss is defined as a trailing stop mechanism that dynamically moves a stop loss level to newly formed higher candle lows (for longs) or lower candle highs (for shorts).
Users can apply this exit type by selecting "Candle Trail" via strategy Settings/Inputs/STRATEGY.
Opposing Candle Colour Close
The opposing candle colour close exit type is defined as an exit condition that closes any long positions when a new red candle forms and closes any short positions when a new green candle forms.
Users can apply this exit type by selecting "Opposing Candle" via strategy Settings/Inputs/STRATEGY.
█ CORE FILTERS
Minimum Risk Range Filter
The minimum risk range filter is defined as an entry filter that invalidates trade signals with a risk range below a user-defined threshold.
The default minimum risk range is set to 4 points/pips.
Users can adjust the minimum risk range via strategy Settings/Inputs/RISK RANGE FILTER.
It is recommended that users set the minimum risk range at least 1–2 points/pips above the selected symbol’s spread to invalidate trades that would be completely impractical under realistic trading conditions.
Time Zone
The time zone is defined using either an IANA region identifier (e.g. Europe/London, America/New_York) or a fixed UTC/GMT offset (e.g. UTC+1, GMT-05:30). Fixed offsets do not account for daylight saving time.
The default time zone is set to Europe/London.
Users can change the time zone via strategy Settings/Inputs/TIME ZONE.
For further information on time zone configuration, please refer to:
data.iana.org
en.wikipedia.org
Session Filter
The session filter is defined as an entry filter that invalidates trade signals that fall outside a user-defined intraday trading session, with session start and end times bound to the strategy time zone.
TradingView candle timestamps represent the candle open time, not the candle close time. As a result, session boundaries are evaluated based on when a candle opens, even though entries and exits are processed at candle close.
To avoid trades being entered or held beyond the intended session end, users should configure the session end time at least one full timeframe period earlier than the desired practical session close. For example, on a 5-minute chart with a desired session end at 22:00, the session should typically be configured to end at 21:55. This ensures that no new trades are taken at the final session close and that any session-dependent exit logic is applied before the session ends in practice.
When using custom or non-standard timeframes where the desired session end does not align cleanly with candle boundaries, it is recommended that users set the session end two full timeframe periods earlier than the desired session end. This provides an additional safety buffer, ensuring the strategy avoids taking trades near the session boundary.
By default, the session filter is set to false and the default session is set to "2300-2155".
Users can apply the session filter and adjust session boundaries via strategy Settings/Inputs/SESSION FILTER.
Close At End of Session Filter
The close at end of session filter is defined as an exit filter that closes all open positions when the active trading session ends, provided that the session filter is appropriately configured and applied.
When enabled, the strategy monitors the session filter state and detects the transition from an active session to an inactive session. All open trades are closed on the first candle that falls outside the defined session window. This ensures that no positions are carried beyond the user-defined trading session.
The close at end of session filter operates independently of entry conditions and other exit types. When enabled, it will force the closure of all open positions at session end regardless of the selected exit configuration.
Enabling the close at end of session filter can result in variable reward-to-risk outcomes. Because positions are forcibly closed at session end regardless of stop loss or target placement, exits may occur at prices that differ from those implied by the fixed reward-to-risk configuration. This behaviour is intentional and reflects a design trade-off between enforcing strict session boundaries and allowing trades to reach their predefined directional objectives, regardless of how severely distorted the realised reward-to-risk outcomes could be in the event of price gaps.
By default, the close at end of session filter is set to false.
Users can apply the close at end of session filter via strategy Settings/Inputs/CLOSE AT END OF SESSION FILTER.
Users should also ensure that the session filter is applied and that session boundaries are configured appropriately with respect to candle timestamp behaviour, as described in the session filter section above.
Sample Period Filter
The sample period filter is defined as an entry filter that invalidates trade signals that fall outside a user-defined date-time range, with start and end date-times bound to the strategy time zone.
TradingView candle timestamps represent the candle open time, not the candle close time. As a result, sample period boundaries are evaluated based on when a candle opens, even though entries and exits are processed at candle close.
To avoid trades being entered beyond the intended sample period end, users should configure the sample period end date-time at least one full timeframe period earlier than the desired practical sample period end date-time. For example, on a 5-minute chart with a desired end date-time of 01/01/2026 22:00, the end date-time should typically be configured to 01/01/2026 21:55.
The default sample period start and end date-times are set to 01/01/1900 00:00 and 01/01/3000 00:00, respectively.
Users can adjust the sample period via strategy Settings/Inputs/SAMPLE PERIOD FILTER.
█ GENERIC FILTERS
Generic Filter Behaviour
Unless otherwise stated:
"None" inputs return true.
Filters return true only when their selected condition is satisfied.
Minimum Percentage Change Positive-Flat/Negative Filter
The minimum percentage change filter is an entry filter that measures the relative change of a time-series value over a configurable historical window and applies a directional threshold condition, invalidating trade signals that do not meet the directional threshold criteria.
The filter compares the current value to its value n bars ago and computes the percentage difference. A signal returns true only if this percentage change satisfies both:
The selected directional requirement.
The user-defined minimum percentage change magnitude.
"Positive-Flat" direction logic:
Accepts values that have increased or remained unchanged, provided the percentage change is greater than or equal to the minimum threshold.
"Negative" direction logic:
Accepts values that have decreased, provided the magnitude of the decrease meets or exceeds the minimum threshold.
When the minimum threshold is set to 0%, the filter behaves as a pure directional check:
"Positive-Flat" accepts ≥ 0% changes.
"Negative" accepts < 0% changes only.
Basic and Multi-Part Trend Filters
Basic and multi-part trend filters are defined as entry filters that evaluate changes in time-series values from one period to the next and invalidate trade signals that do not satisfy a user-defined trend condition.
Basic trends operate independently of prior trend state, whereas multi-part trends are defined by the presence or absence of preceding trend sequences. The multi-part trend states are distinguished numerically and the conditions are bound to a user-defined trend count.
"Basic Uptrend" returns true when a time-series value is greater than the preceding value. For example, a basic volume uptrend filter returns true if the most recent candle's volume is greater than the preceding candle's volume.
"Basic Downtrend" returns true when a time-series value is less than the preceding value. For example, a basic volume downtrend filter returns true if the most recent candle's volume is less than the preceding candle's volume.
"Uptrend" returns true while a multi-part uptrend state is valid. The uptrend state begins when a new basic uptrend forms following a basic downtrend and remains valid until a new basic downtrend forms. The user-defined trend count will determine which multi-part trend condition is selected. For example, if the user-defined trend count is set to 3, then only 3-part uptrend conditions will return true.
"Downtrend" returns true while a multi-part downtrend state is valid. The downtrend state begins when a new basic downtrend forms following a basic uptrend and remains valid until a new basic uptrend forms. The user-defined trend count will determine which multi-part trend condition is selected. For example, if the user-defined trend count is set to 3, then only 3-part downtrend conditions will return true.
Close Above-Equal/Below Filter
The close price above-equal/below filter is defined as an entry filter that evaluates the most recent candle close price relative to a given time-series value and invalidates trade signals that do not satisfy a user-defined directional condition.
"Above-Equal" returns true when the most recent candle close price is greater than or equal to any given time-series value.
"Below" returns true when the most recent candle close price is less than any given time-series value.
Moving Average (MA) Double and Triple Trend Filters
MA double and triple trend filters are defined as entry filters that evaluate the relative positioning of two or more MA values and invalidate trade signals that do not satisfy a user-defined directional condition.
"Above-Equal" returns true when one MA is greater than or equal to another MA.
"Below" returns true when one MA is less than another MA.
Basic and Exclusive Rejection Filters
The basic rejection filter is defined as an entry filter that evaluates swing-based wick or body rejections of a given price level and invalidates trade signals that do not satisfy the rejection criteria.
For long trades, "Rejection" returns true when all three of the following conditions are met:
The previous candle open is above a given rejection price.
The trough price is less than or equal to a given rejection price.
The green candle that completes the swing closes above a given rejection price.
For short trades, "Rejection" returns true when all three of the following conditions are met:
The previous candle open is below a given rejection price.
The peak price is greater than or equal to a given rejection price.
The red candle that completes the swing closes below a given rejection price.
The exclusive rejection filter is defined as an entry filter that meets basic rejection filter criteria for only one user-defined price level from a set of given price levels. If the rejection criteria is met for more than one of the given price levels the filter will return false.
Minimum and Maximum Boundary Filters
Minimum and maximum boundary filters are defined as entry filters used to constrain time-series values to predefined minimum and/or maximum thresholds, invalidating trade signals that do not satisfy a user-defined threshold criteria. The filters consist of two independent threshold components, minimum (above-equal) and maximum (below-equal), which may be applied individually or together.
When both components are applied simultaneously the filters act as a value range constraint, invalidating trade signals that fall outside of the specified bounds.
"Above-Equal" returns true when the evaluated value is greater than or equal to the user-defined minimum boundary.
"Below-Equal" returns true when the evaluated value is less than or equal to the user-defined maximum boundary.
Above-Equal/Below Zero Filter
The above-equal/below zero filter is defined as an entry filter that evaluates zero centred oscillator values relative to the zero line and invalidates trade signals that do not satisfy a user-defined directional condition.
"Above-Equal" returns true when the oscillator value is greater than or equal to zero.
"Below" returns true when the oscillator value is less than zero.
█ FEATURE SET A SPECIFIC FILTERS
All feature set specific indicators use the same calculations as the built-in TradingView indicators unless otherwise stated in the relevant filter sub-section. While users do not need to apply the indicators for the strategy to function, they can of course apply the relevant indicators as visual aids if they so desire.
For further information on how to apply built-in TradingView indicators, please refer to:
www.tradingview.com
Accumulation/Distribution (AD) Filters
The AD minimum percent change positive-flat/negative filter (see generic filters section above) defaults are as follows:
Mode is set to "None".
Minimum percent change is set to 0.
Lookback is set to 3.
The AD trend filter (see generic filters section above) defaults are as follows:
Mode is set to "None".
Trend count is set to 3.
Users can apply the AD filters and adjust filter parameters via strategy Settings/Inputs/Accumulation/Distribution (AD) Filters.
Arnaud Legoux Moving Average (ALMA) Filters
Users can define up to three independent ALMA series. The defaults are as follows:
ALMA 1: source = close, length = 50, offset = 0.85, sigma = 6.0, floor = false.
ALMA 2: source = close, length = 100, offset = 0.85, sigma = 6.0, floor = false.
ALMA 3: source = close, length = 200, offset = 0.85, sigma = 6.0, floor = false.
Users can adjust ALMA inputs via strategy Settings/Inputs/Arnaud Legoux Moving Average (ALMA).
Users can apply up to three independent close above-equal/below filters (see generic filters section above), one for each user-defined ALMA. The default mode for all three ALMA close above-equal/below filters is set to "None".
Users can apply up to three independent ALMA double trend filters (see generic filters section above), one filter for each of the three possible configurations. The defaults are as follows:
ALMA 1 above-equal/below ALMA 2 is set to "None".
ALMA 2 above-equal/below ALMA 3 is set to "None".
ALMA 1 above-equal/below ALMA 3 is set to "None".
The ALMA rejection filter is defined as an exclusive rejection filter (see generic filters section above) that will only return true if the user-defined ALMA is rejected exclusive of the other two ALMAs.
The default ALMA rejection filter mode is set to "None".
Users can apply the ALMA filters and adjust filter parameters via strategy Settings/Inputs/ALMA Filters.
Aroon Filters
The default Aroon length is set to 14.
Users can adjust the Aroon length via strategy Settings/Inputs/Aroon.
Minimum and maximum boundary filters (see generic filters section above) are included for both Aroon up and Aroon down values, the defaults are as follows:
Apply Aroon up above-equal is set to false
Aroon up above-equal threshold is set to 0%.
Apply Aroon up below is set to false
Aroon up below threshold is set to 100%.
Apply Aroon down above-equal is set to false
Aroon down above-equal threshold is set to 0%.
Apply Aroon down below is set to false
Aroon down below threshold is set to 100%.
Users can apply the Aroon filters and adjust filter parameters via strategy Settings/Inputs/Aroon Filters.
Average True Range (ATR) Filters
The default ATR length is set to 14.
Users can adjust the ATR length via strategy Settings/Inputs/Average True Range (ATR).
The risk range above-equal/below ATR filter is defined as an entry filter that evaluates the trade's risk range (evaluated independently for long and short risk ranges) relative to ATR and invalidates trade signals that do not satisfy the user-defined directional condition.
The default risk range above-equal/below ATR filter mode is set to "None".
The ATR minimum percent change positive-flat/negative filter (see generic filters section above) defaults are as follows:
Mode is set to "None".
Minimum percent change is set to 0.
Lookback is set to 3.
The ATR trend filter (see generic filters section above) defaults are as follows:
Mode is set to "None".
Trend count is set to 3.
Users can apply the ATR filters and adjust filter parameters via strategy Settings/Inputs/ATR Filters.
Awesome Oscillator (AO) Filters
The default AO inputs are as follows:
Source is set to hl2.
Short length is set to 5
Long length is set to 34.
Users can adjust the AO inputs via strategy Settings/Inputs/Awesome Oscillator (AO).
The AO calculations used in this script will vary from those used in the built-in TradingView indicator if the user adjusts the default settings. That is because the built-in TradingView indicator uses fixed parameters, while this script allows users to select their own source, short length and long length. Users can build their own AO indicator with custom parameters in Pine Script by copying the following code and pasting it into a new indicator:
//@version=6
indicator(title = "Awesome Oscillator", shorttitle = "AO", overlay = false)
import TradingView/ta/12 as ta
ao_source = input.source(defval = hl2, title = "AO Source", group = "Awesome Oscillator (AO)")
ao_short_length = input.int(defval = 5, title = "AO Short Length", minval = 1, group = "Awesome Oscillator (AO)")
ao_long_length = input.int(defval = 34, title = "AO Long Length", minval = 1, group = "Awesome Oscillator (AO)")
ao = ta.ao(ao_source, ao_short_length, ao_long_length)
diff = ao - ao
plot(ao, "AO", color = diff <= 0 ? #F44336 : #009688, style = plot.style_columns)
For further information on how to build Pine Script indicators, please refer to:
www.tradingview.com
www.tradingview.com
The default AO above-equal/below zero filter mode is set to "None".
The AO minimum percent change positive-flat/negative filter (see generic filters section above) defaults are as follows:
Mode is set to "None".
Minimum percent change is set to 0.
Lookback is set to 3.
The AO trend filter (see generic filters section above) defaults are as follows:
Mode is set to "None".
Trend count is set to 3.
Users can apply the AO filters and adjust filter parameters via strategy Settings/Inputs/AO Filters.
█ ALERTS
Users can set alerts for any given strategy configuration via the alerts dialogue box.
Users must first ensure that the correct condition (the strategy title) is selected from the first drop-down list in the alert dialogue box's condition field.
Default alert messages have been configured for both entries and exits so that users can more effectively distinguish between long and short entries and exits while using long-short configurations.
To get alerts for both entries and exits the user should change the value in the condition field's second drop-down list from "Order fills only and alert() function calls" to "Order fills only". When using "Order fills only" with long-short configurations, it is recommended that users define their alert via the alert name field and use only the default {{strategy.order.alert_message}} call in the alert message field.
Alert conditions generated by "Order fills only" are evaluated after entry conditions have been satisfied and operational constraints (risk, position size and margin requirements) have been applied. As such, trade signals that would result in position sizes exceeding the simulated account's margin constraints will not generate alerts.
To get alerts for entries only the user should change the value in the condition field's second drop-down list from "Order fills only and alert() function calls" to "alert() function calls only".
The default alert messages generated by "Order fills only" are as follows:
"long entry".
"long exit".
"short entry".
"short exit".
The default alert messages generated by "alert() function calls only" are as follows:
"long entry".
"short entry".
Alert conditions generated by "alert() function calls only" are operational-constraint-agnostic and will generate alerts whenever entry conditions are satisfied, regardless of the simulated account's margin constraints.
For further information on setting and managing alerts, please refer to:
www.tradingview.com
www.tradingview.com
www.tradingview.com
█ LIMITATIONS AND CONSIDERATIONS
Backtesting
Backtest results should always be interpreted cautiously. Strategy performance can vary significantly across time periods and sample sets. While strong historical performance does not guarantee future results, poor historical performance reliably indicates a weak strategy when sample sizes are statistically meaningful.
Statistical Significance and Path-Dependent Outcomes (Overfitting)
In statistical practice, sample sizes of 100 observations are sometimes cited as a rough lower bound for certain forms of basic significance testing. In the context of trading strategy evaluation, such sample sizes are rarely sufficient to produce results that are meaningfully reliable or replicable. Based on practical experience, sample sizes closer to 1,000 observations or more are generally required before performance characteristics begin to stabilise. As a general rule, larger sample sizes increase the reliability and replicability of observed results.
Path dependence refers to situations in which outcomes are determined not only by initial conditions, but by the specific and unique sequence of price movements over a given time period.
Even with large sample sizes, favourable net profit outcomes should be interpreted with caution when they are primarily driven by either variable reward-to-risk configurations or fixed reward-to-risk configurations that employ unrealistically high reward multiples. In both cases, performance is often strongly influenced by path-dependent effects, making such outcomes less reliable and less replicable.
Fixed reward-to-risk configurations are generally less susceptible to path dependence when the reward multiple is kept within reasonable bounds. However, empirical studies and practitioner research suggest that reward multiples above approximately 3:1 increasingly exhibit the same path-dependent characteristics observed in variable reward-to-risk strategies.
Bar Magnifier
Due to the limitations of OHLC data, intra-bar price movement cannot be precisely determined.
When both stop loss and target levels are reached within the same candle, assumptions are made by the strategy tester.
Pine Script's bar magnifier partially mitigates this limitation by evaluating lower-timeframe data. However, this feature is available only to TradingView Premium users and remains inherently limited.
For further information on the bar magnifier functionality, please refer to:
www.tradingview.com
www.tradingview.com
TradingView Premium users can enable bar magnifier via strategy Settings/Properties/FILL ORDERS.
Processing Orders at Candle Close
Backtests cannot accurately account for slippage between signal generation and trade execution.
A practical mitigation is to use fixed-distance stop losses and targets rather than absolute price levels, a feature supported by many brokers and APIs.
Empirical Probabilities
Empirical probabilities are derived directly from observed outcomes rather than from theoretical models or assumed distributions. In the context of trading, they are calculated by measuring the relative frequency of events (such as wins and losses) across a large sample of historical trades.
Unlike conditional or model-based probabilities, empirical probabilities make no assumptions. Their validity relies primarily on sample size and the consistency of the rules used to generate observations, making them particularly relevant for trading systems evaluated under the law of large numbers.
Empirical probabilities are most useful for comparative analysis, such as assessing how different configurations, filters or exit mechanisms alter the statistical behaviour of a strategy under identical conditions. They are not intended to represent true predictive probabilities or to imply stable future performance.
To study empirical probabilities for comparative purposes, it is recommended that users set commission and both long and short margin values to 0% in order to maximise sample size. However, users should not interpret any resulting profits as realistic. Setting commission and margin (in particular) to 0% produces highly distorted outcomes that are not representative of realistic live trading conditions.
█ DISCLAIMER
This Pine Script strategy is provided for educational purposes only and does not constitute financial advice in any form.
אסטרטגיית Pine Script®
Options Astra Strategy with Greeks by PoojaOptions Astra Strategy with Greeks by Pooja
Options Astra Strategy with Greeks by Pooja is a rule-based intraday options analysis system designed specifically for option premium charts.
The script combines price action logic, trend structure, and option-specific Greeks insights into a single, organized framework.
Instead of relying on a single indicator, this strategy uses multiple confirmation layers to identify potential BUY and SELL opportunities while filtering out low-quality market noise.
All calculations and signals are generated only after candle confirmation, helping reduce premature or repaint-like behavior.
The script is intended for educational and analytical use, allowing traders to visually study market behavior, trend alignment, and option sensitivity in real time.
🎯 Purpose of the Strategy
The primary purpose of Options Astra Strategy with Greeks is to help traders:
Understand directional bias in option premiums
Identify high-probability trend continuation or reversal zones
Analyze trades with the help of Delta, Gamma, Theta, Vega, IV behavior
Maintain structured decision-making instead of emotional or impulsive entries
This strategy is built to support traders who want:
A systematic framework rather than random signals
Clear visual structure for entries, trend shifts, and exits
Better awareness of option characteristics, not just price movement
⭐ Key Features
🎯 Option Trading Modes
Supports Option Buying, Option Selling, and Both-side trading
Traders can restrict signals based on their preferred trading style
Helps avoid unnecessary opposite-side signals during focused trading
🎛️ Separate Control: Signals vs Strategy
Independent control for visual signals and strategy execution
Users can analyze signals without enforcing automated trade logic
Useful for discretionary traders and educational analysis
🔀 Dual Strategy Engine
Built-in two independent strategies working together
Signals are generated only when multi-condition alignment is confirmed
Reduces false signals during uncertain market phases
📊 Option Greeks Dashboard (Integrated)
Real-time visualization of Delta, Gamma, Theta, Vega, and IV behavior
Helps understand option sensitivity beyond price movement
Designed for option premium analysis, not just index direction
🛑 Dual Stop Loss System
Supports Swing-based Stop Loss and Candle-based Stop Loss
User can switch methods based on market structure
Stop Loss visualization remains consistent for clarity
🎯 Target & Target Hit Visualization
Automatic target projection lines
Clear Target Hit and Stop Loss Hit labeling on chart
Helps review trade outcomes visually without manual marking
⚖️ Risk Management Controls
Adjustable Risk–Reward Ratio
Minimum stop-loss distance protection
Designed to encourage pre-defined risk planning
🔄 Trend Reverse Protection (TCE)
Built-in Trend Change Exit logic
Closes trades when an opposite confirmed trend appears
Helps reduce exposure during sudden reversals
⏰ Force Exit Mechanism
Optional time-based force exit
Designed for intraday traders to avoid:
Gap-up / Gap-down risk
Overnight option exposure
Particularly useful near market close
[/list}
🚧 Fake Breakout & Sideways Market Filters
Uses ADX, ATR, slope, and structure-based filters
Designed to avoid:
Low-momentum moves
Sideways and choppy conditions
Filters can be enabled or disabled individually
📈 Built-in Trend Tools
Integrated EMA, VWAP, and Supertrend
No need to add external indicators
Clean chart with internally managed calculations
🔁 Oscillator + Non-Oscillator Combination
Combines RSI-based logic with price & trend filters
Helps balance momentum and structure
Avoids over-dependency on a single indicator type
🧩 Optional Supertrend & RSI Filters
Supertrend and RSI filters can be toggled ON/OFF
Allows adaptation to different market environments
Suitable for both aggressive and conservative setups
⚖️Dynamic Stop Loss Trailing Through Trend Reversal
This strategy includes a dynamic stop-loss trailing mechanism based on trend reversal detection rather than fixed price movement.
When the trade is active, the system continuously monitors trend direction and structure
If a confirmed trend reversal is detected against the open position, the strategy exits the trade automatically
This exit acts as a dynamic trailing stop, adapting to changing market conditions instead of relying on static stop-loss levels
🔔 Alerts & Automation
BUY / SELL alerts on confirmed candles only
Webhook compatible
Suitable for Telegram, Tradetron, and automation
📢 Optional Telegram alerts can be used for personal signal notifications. This feature is informational and does not imply trade execution or profit guarantees.
🌟 Why This Strategy Is Unique
Most trading tools rely on a simple combination of indicators but Option Astra Strategy is made with different logics and 2 Strategies combo with oscillators and non oscillators.
Options Astra Strategy with Greeks is designed differently.
It combines multiple independent logics instead of a single signal source
Focuses on decision structure, not prediction
Integrates option Greeks behavior with price and trend logic
Includes trend protection, risk controls, and exit discipline in the same framework
This approach is intended to help traders stay systematic and consistent, especially during emotionally challenging market conditions.
The goal is not to increase trading frequency, but to improve trade quality and clarity.
👤 Suitable For
This script may be suitable for traders who:
Trade intraday options on premium charts
Prefer rule-based analysis over discretionary guessing
Want to understand option behavior (Greeks & IV) alongside price action
Use defined risk management and fixed trading plans
Want a clean, all-in-one system without stacking many indicators
Trader who want Advanced Setup which can help in Risk Management, Discipline and Psychology control etc,
Regular Option Buyers, Option Sellers or Both.
🔒 Why Invite-Only
Internal state tracking
Reset logic
Independent signal engines
Option-specific intelligence architecture
Source protected to preserve originality
⚠️ Disclaimer
For educational and analytical purposes only.
No financial advice or profit guarantees.
All signals are rule-based and non-predictive.
Option Greeks are formula-based analytical estimates.
Past or real-time signals do not imply future performance.
All trading decisions and risk management are the user’s responsibility.
אסטרטגיית Pine Script®
Uptrend Pullback (High Winrate-ish) - RSI + EMA + ATR TrailUptrend Pullback Strategy (EMA Filter + RSI Reversal + ATR Trailing Stop)
Description
This strategy is designed for rising markets and trades long only. It uses a simple trend filter and a pullback entry:
Trend filter: An uptrend is defined when EMA(50) > EMA(200) and price is above EMA(200). Trades are allowed only under these conditions.
Entry (buy the dip): A long position is opened when RSI crosses up above a user-defined pullback level (default 40), suggesting a pullback is ending and momentum is recovering.
Exits:
Take profit: Close the position when RSI reaches an overbought level (default 70).
Risk management: A dynamic ATR-based trailing stop follows price upward to lock in gains.
Hard stop: An additional ATR-based stop acts as a safety net to limit downside risk.
Notes
Parameters (EMA lengths, RSI levels, ATR multipliers) are fully configurable.
This is a demo/reference strategy for research and optimization; results depend strongly on the symbol and timeframe.
If you want, I can also write a shorter “one-liner” description and a set of tag keywords for the publish page.
אסטרטגיית Pine Script®
Multi TF Trend Strategy NIFTYI am Arpit Sharma with experience of derivate market for over 6 years . This strategy is designed for nifty only based on candlestick patterns which generate buy & sell signals .
אסטרטגיית Pine Script®
Pivot Breakout Strategy (Break of Structure + Risk Management)DESCRIPTION
This strategy is a pivot-based breakout system designed for $BINANCE:JUPUSDT. It identifies pivot highs and pivot lows using a configurable lookback period, then enters trades when price breaks through these pivot levels. The strategy includes flexible risk management with two exit methods: automatic SL/TP orders or manual position management with trailing stops and breakeven protection.
Core concept
Pivot detection : Identifies pivot highs (PH) and pivot lows (PL) using a configurable period (default: 18 bars).
Breakout entries : Enters long when price breaks above a pivot high; enters short when price breaks below a pivot low.
Signal flip : Automatically closes opposite positions when a new signal appears, allowing for quick reversals.
Visual markers : Draws neon-style lines and labels ("BoS PH" / "BoS PL") to mark pivot breakouts on the chart.
Entry signals
Long entry : Price breaks above a confirmed pivot high (PH).
Short entry : Price breaks below a confirmed pivot low (PL).
Exit methods (choose one)
Method 1: Automatic SL/TP (default): Uses strategy.exit() with fixed stop loss and take profit levels. Orders are placed automatically when entry occurs.
Method 2: Manual management : Uses strategy.close() with optional trailing stop and breakeven protection. Provides more control but requires manual exit logic.
Risk management
Long positions : Default SL 3.5%, TP 4.5% (configurable).
Short positions : Default SL 2.0%, TP 3.5% (configurable).
Trailing stop (optional, Method 2 only): Trails from the best price since entry.
Breakeven stop (optional, Method 2 only): Moves stop loss to breakeven after a profit trigger.
How to use
Apply to $BINANCE:JUPUSDT. The strategy works on any timeframe, but pivot period may need adjustment for different timeframes.
Choose your preferred exit method in the settings:
Use Automatic SL/TP for simpler, hands-off trading.
Use Manual management if you want trailing stops and breakeven protection.
Adjust pivot length based on market volatility: shorter periods catch more signals but may be noisier; longer periods are more selective.
Enable/disable long or short strategies independently based on market conditions.
Key inputs snapshot
Pivot Detection:
Length: 18 bars
Risk (Long):
SL: 3.5%, TP: 4.5%
Risk (Short):
SL: 2.0%, TP: 3.5%
Optional (Method 2 only):
Trailing Stop: 1.5%
Breakeven Trigger: 1.5%
Breakeven Offset: 0.1%
Visual features
Neon-style lines mark pivot breakouts with glow effects.
Labels show "BoS PH" (Break of Structure Pivot High) and "BoS PL" (Break of Structure Pivot Low).
Customizable colors for bull and bear signals.
Educational use only. This is not financial advice. Pivot-based strategies can generate frequent signals; always validate with forward testing and consider transaction costs. The strategy automatically flips positions on opposite signals, which may result in higher trade frequency.
אסטרטגיית Pine Script®
Crypto Coin Perpetual 45m MTF Trend StrategyStrategy Description
This strategy is designed to identify probability trend reversals and momentum shifts by utilizing multi-timeframe analysis. The primary objective is to capture sustained trend movements while effectively filtering out market noise and false signals during sideways or choppy price action. By integrating trend-following indicators with volatility and momentum filters, the system aims to maintain a high signal-to-quality ratio.
Signal Guide:
L: Long Entry
S: Short Entry
LC: Long Position Closed
SC: Short Position Closed
Backtest & Feedback:
The strategy is optimized for the 45-minute (45m) timeframe. It is recommended to conduct backtests on high-liquidity assets such as XRPUSDC.P, DOGEUSDC.P, and ETHUSDC.P. For a comprehensive performance evaluation, testing across multiple look-back periods—specifically the last 365 days, 90 days and 30 days — is advised. I am open to any feedback or optimization suggestions from the community.
Note:
Delete shapes for a cleaner look: Settings > Style > Shapes.
Also, adjust the equity, default order size, and commission according to your preference: Settings > Properties.
Disclaimer:
IMPORTANT: THIS IS NOT FINANCIAL ADVICE.
The script and information provided are for educational and informational purposes only. Trading cryptocurrencies, futures, and other financial instruments involves significant risk and can lead to the loss of your invested capital. Past performance is not indicative of future results. The author does not guarantee the accuracy or reliability of the strategy. Always perform your own due diligence and consult with a certified financial advisor before engaging in any trading activity. You acknowledge that you are trading at your own risk.
אסטרטגיית Pine Script®
SOFT Speed & Linearity Strategy (MTF) LIVE & BACKTESTSOFT Speed × Linearity Strategy (MTF – LIVE & BACKTEST)
This strategy detects clean impulsive moves by combining real-time price speed with directional quality (linearity).
It is designed for intraday markets such as Gold (XAUUSD), Nasdaq, and Crypto (ETH, BTC), where acceleration quality matters more than raw indicators.
🔹 Core Concepts
1️⃣ Speed ($ per second)
Measures how fast price is moving
Expressed in $/second, not points or ticks
Two execution modes:
LIVE → real-time intra-candle speed using elapsed seconds
BACKTEST → historical approximation using (Close − Open) / candle duration
2️⃣ Linearity Score (1 → 5)
Evaluates movement quality inside the candle:
Net progress vs adverse excursion
Identifies one-way impulses vs noisy back-and-forth moves
Interpretation
1–2 → choppy / rotational
3 → acceptable
4–5 → clean impulse (higher continuation probability)
🔹 Visual Panel
Histogram bars = Speed × Linearity
Color reflects directional quality
Optional info label displays:
Execution mode (LIVE / BACKTEST)
Analysis timeframe
Linearity score
Direction
Speed ($/s)
No drawings are placed on candles.
🔹 Entry Logic
Configurable conditions:
Minimum linearity score
Minimum speed
Direction aligned with candle movement
Long / Short / Both modes
Optional cooldown between signals
⚠️ Speed thresholds are separated for LIVE and BACKTEST to reflect their different nature.
🔹 Exit Modes (Selectable)
A — Symmetric
Exit when entry conditions are no longer valid.
B — Hysteresis (default)
Exit only after controlled degradation:
Linearity falls below a lower threshold
Or speed drops below a lower threshold
C — Momentum
Exit when speed no longer supports the trade direction (speed ≤ 0).
Optional add-ons:
Exit on opposite signal
Exit on speed channel re-entry
🔹 Multi-Timeframe (MTF)
Default analysis timeframe: 15 minutes
Optional lock to chart timeframe
Safety rule for public use:
If chart timeframe < 15m, analysis remains on 15m
Prevents misleading ultra-fast recalculations
🔹 LIVE vs BACKTEST (Important)
LIVE mode uses true intra-candle acceleration
BACKTEST mode uses an approximation to allow reproducible historical testing
Results between LIVE and BACKTEST are not identical by design
This is intentional and clearly separated.
🔹 Alerts
Available alerts:
BUY
SELL
EXIT
Speed channel breakout
ALL events
Compatible with TradingView webhooks.
🔹 Intended Use
This is not a trend indicator.
This is not a prediction tool.
It is a momentum quality detector, useful to:
Validate breakouts
Filter false accelerations
Trade continuation, not anticipation
⚠️ Disclaimer
This script is for educational and research purposes only.
It does not constitute financial advice.
Always test, adapt parameters to your market, and manage risk.
אסטרטגיית Pine Script®
_mr_beach Liquidity Sweep + VWAP V2 Trend Filter, Presets_mr_beach Liquidity Sweep + VWAP Reversal V2 (Trend Filter, Presets)
Overview
This strategy models a common institutional market behavior:
Liquidity is taken above the previous day’s high or below the previous day’s low, followed by a return toward fair value (VWAP) and a reversal in the direction of the dominant trend.
The script is designed as a TradingView Strategy for systematic backtesting and optimization.
________________________________________
Core Logic
• Liquidity Levels
o Previous Day High
o Previous Day Low
Used as typical stop-liquidity zones.
• Fair Value
o VWAP is used as confirmation that price has returned to a fair value area.
• Trend Filter
o EMA-based trend direction filter to avoid counter-trend trades.
________________________________________
Trading Rules
Trend Filter
• Long trades only when price closes above EMA.
• Short trades only when price closes below EMA.
Liquidity Sweep
• Bullish sweep: Price trades below Previous Day Low.
• Bearish sweep: Price trades above Previous Day High.
Entry Confirmation
• Long
o Sweep below Previous Day Low
o Close back above Previous Day Low
o Close above VWAP
• Short
o Sweep above Previous Day High
o Close back below Previous Day High
o Close below VWAP
________________________________________
Risk Management
• Stop Loss: ATR-based
• Take Profit: ATR-based
• Risk automatically adapts to market volatility.
• All multipliers are user-adjustable.
________________________________________
Preset Profiles
The script includes ready-to-use preset profiles:
• Index – conservative, session-based, one trade per day
• Forex – session-filtered, moderate volatility settings
• Crypto – higher volatility parameters, no session filter
• Custom – fully manual configuration
Presets control EMA length, ATR settings, SL/TP multipliers, session usage, and trade frequency.
________________________________________
Session & Trade Control
• Optional session filter (default: US regular session)
• Optional one trade per day limit to reduce overtrading and noise
________________________________________
Chart Elements
• EMA (trend direction)
• VWAP (fair value)
• Previous Day High / Low (liquidity zones)
________________________________________
Alerts
• Long setup: Liquidity sweep + VWAP reversal
• Short setup: Liquidity sweep + VWAP reversal
________________________________________
Recommended Usage
• Markets: Indices, liquid stocks, Forex majors, crypto
• Timeframes: 5m and 15m
• Parameters should be optimized per market and timeframe.
________________________________________
Disclaimer
This script is for educational and backtesting purposes only.
It does not constitute financial advice.
Performance depends on market conditions, timeframe, fees, and execution.
Tags: Liquidity, VWAP, EMA, Reversal, Sweep, Smart Money, ICT, ATR, Strategy
אסטרטגיית Pine Script®
OneTrade.Gold.SMC StrategyOneTrade.Gold.SMC Strategy
Overview
OneTrade.Gold.SMC v5.0 is an advanced Smart Money Concepts (SMC) trading strategy designed for institutional-grade market analysis. This strategy combines sophisticated price action detection, multi-timeframe trend analysis, and comprehensive risk management to identify high-probability trade setups.
⚠️ DISCLAIMER / RISK WARNING
THIS STRATEGY IS PROVIDED FOR EDUCATIONAL AND INFORMATIONAL PURPOSES ONLY.
Important Notices:
No Financial Advice: This trading strategy does not constitute financial, investment, or trading advice. It is a technical tool for analysis purposes only.
Past Performance: Historical backtest results do not guarantee future performance. Market conditions change, and strategies that performed well in the past may not perform well in the future.
Risk of Loss: Trading financial instruments involves substantial risk of loss. You may lose some or all of your invested capital. Never trade with money you cannot afford to lose.
No Guarantee: The strategy's ranking system, performance metrics, and signal confidence levels are analytical tools and do not guarantee profitable trades.
Market Risks: Financial markets are inherently unpredictable. No strategy can eliminate market risk, slippage, execution delays, or black swan events.
Individual Responsibility: Users are solely responsible for their trading decisions. Always conduct your own research, understand the risks, and consider consulting with a qualified financial advisor.
Testing Required: Before using this strategy with real capital, thoroughly test it in a demo environment and understand all its features, limitations, and risk parameters.
Customization: Default parameters may not be suitable for all instruments, timeframes, or market conditions. Proper optimization and adaptation are the user's responsibility.
Technical Limitations: While the strategy implements anti-repaint features, unforeseen technical issues, broker execution differences, or platform limitations may affect real-world performance.
Regulatory Compliance: Ensure your trading activities comply with local laws and regulations. This strategy does not provide legal or regulatory guidance.
BY USING THIS STRATEGY, YOU ACKNOWLEDGE THAT YOU UNDERSTAND AND ACCEPT ALL RISKS ASSOCIATED WITH TRADING.
אסטרטגיית Pine Script®
_mr_beach Liquidity Sweep + VWAP ReversalLiquidity Sweep + VWAP Reversal (Trend Filter, Session, 1 Trade per Day)
Overview
This strategy models a common institutional market behavior: liquidity is taken above the previous day’s high or below the previous day’s low, followed by a return toward fair value (VWAP) and a reversal in the direction of the prevailing trend.
Designed as a TradingView strategy for structured backtesting in the Strategy Tester.
Core Components
Liquidity Levels: Previous Day High / Previous Day Low
Fair Value Reference: VWAP
Trend Filter: EMA (default: 200)
Volatility-Based Risk: ATR
Trading Rules
Trend Filter
Long only when price closes above EMA
Short only when price closes below EMA
Liquidity Sweep
Bullish sweep: Low < Previous Day Low
Bearish sweep: High > Previous Day High
Entry Confirmation
Long: After a sweep below the Previous Day Low, price closes back above the level and above VWAP
Short: After a sweep above the Previous Day High, price closes back below the level and below VWAP
Risk Management
Stop Loss: ATR-based (slATR)
Take Profit: ATR-based (tpATR)
Automatically adapts to changing market volatility
Session & Trade Frequency
Optional session filter (default: 09:30–16:00 exchange time)
Optional one trade per day limit to reduce overtrading
Chart Elements
EMA (trend direction)
VWAP (fair value)
Previous Day High / Low (liquidity zones)
Alerts
Long setup: Liquidity sweep + VWAP reversal
Short setup: Liquidity sweep + VWAP reversal
Recommended Usage
Markets: Indices, liquid stocks, Forex majors, crypto
Timeframes: 5m, 15m
Note: Parameters such as ATR multipliers and session settings should be optimized per market
Disclaimer
This is a backtesting strategy, not financial advice.
Results depend on market conditions, timeframe, fees, and slippage.
Tags: Liquidity, VWAP, EMA, Reversal, Sweep, Smart Money, ICT, ATR, Strategy
אסטרטגיית Pine Script®
Positional Chakra Strategy by PoojaPositional Chakra Strategy by Pooja
Positional Chakra Strategy by Pooja is a rule-based positional trading strategy designed specifically for continuous markets that operate 24 hours, such as Crypto, Forex, and other global instruments.
The strategy focuses on trend alignment, structure validation, and risk-managed positional holding, rather than short-term intraday fluctuations.
This script is intended strictly as a technical analysis and decision-support tool, not as financial or investment advice.
🎯 Purpose of the Strategy
The primary objective of this strategy is to:
Identify sustained trend-based positional opportunities
Reduce overtrading in 24×7 markets
Filter noise and low-quality signals common in continuous sessions
Provide structured entry, stop-loss, and exit logic
Support disciplined positional trading instead of emotional decision-making
⚙️ Core Features Explained
1️⃣ In-built Multiple Strategy Entry Signals
The strategy combines multiple independent entry logics, allowing traders to see signals only when conditions align.
These include combinations of:
EMA, VWAP, Supertrend, RSI, Structure (BOS / CHoCH), etc
It combines oscillators, non-oscillators, and SMC concepts to create a more structured and logical trading framework.
Each signal is clearly labeled on the chart for better visual understanding.
2️⃣ Swing-Based Stop Loss Logic
Stop loss is automatically calculated using recent swing high / swing low
This helps align risk levels with market structure instead of fixed values
Avoids unrealistic or random stop placements
You can Modify your Swing High/Low pivots according your Choice
3️⃣ Risk-Reward Based Target Projection
Targets are calculated using a user-defined Risk : Reward ratio
Ensures every trade follows a pre-defined risk framework
Encourages disciplined trading instead of emotional exits
4️⃣ Clear SL Hit & Target Hit Indications
When Stop Loss or Target is reached, the strategy plots clear visual labels
This improves post-trade review and historical analysis
Helps users understand how and why a trade ended
5️⃣ Trend Change Exit (Dynamic Stop Management)
If the market structure reverses, the strategy can exit trades early
This acts as a dynamic trailing stop mechanism
Helps protect profits or limit losses during sudden reversals
6️⃣ Trend Reverse Entry (Optional Flip Logic)
On confirmed trend reversal, the strategy can optionally flip direction
Entry happens only after proper confirmation
Designed for experienced intraday traders who understand reversals
7️⃣ Dynamic Stop Loss Trailing Through Trend Reversal
This strategy includes a dynamic stop-loss trailing mechanism based on trend reversal detection rather than fixed price movement.
When the trade is active, the system continuously monitors trend direction and structure
If a confirmed trend reversal is detected against the open position, the strategy exits the trade automatically
This exit acts as a dynamic trailing stop, adapting to changing market conditions instead of relying on static stop-loss levels
8️⃣ Optional BOS & CHoCH Structure Plotting
Break of Structure (BOS) and Change of Character (CHoCH) can be enabled
Helps traders visually track market structure shifts
Completely optional to keep charts clean if not required
9️⃣ In-Build Indicator Framework
The strategy internally uses:
EMA
VWAP
Supertrend
RSI
SMC (Smart Money Concept)
No external indicators are required, keeping the system self-contained and lightweight.
🔟 Fake Breakout Protection Filters
To reduce low-quality signals, the strategy includes:
RSI strength filter
ADX volatility confirmation
RSI-MA distance & slope filter
These filters help avoid entries during weak or choppy market conditions.
Why This Strategy Is Unique
Built on market structure and trend logic, not single indicators
Uses multiple confirmation layers to reduce low-quality signals
Includes dynamic risk management instead of fixed exits
Provides clear visual clarity for entry, stop-loss, and target
Adapts to changing market conditions during intraday trading
Focuses on discipline and process, not prediction or guarantees
This is not just a combination of indicators; it integrates five distinct strategy logics designed to reduce psychological decision-making while maintaining structured risk management.
🔔 Alert & Webhook Ready
The strategy supports TradingView alerts
Alerts are designed for signal notification only
Webhook compatible for users who integrate alerts with external tools
📢 Optional Telegram alerts can be used for personal signal notifications. This feature is informational and does not imply trade execution or profit guarantees.
👤 Suitable For
This strategy is suitable for:
Positional traders
Crypto and Forex traders
Traders dealing with 24×7 markets
Traders who prefer rule-based systems
Users who want to avoid constant screen monitoring
It is not intended for scalping or high-frequency intraday trading.
It is not recommended for users expecting guaranteed results or fully automated decision-making.
Why Invite-Only
Controlled access to ensure responsible use
Helps maintain consistency as the system evolves
Prevents misuse or misinterpretation of strategy logic
Allows better management of updates and changes
Keeps the tool aligned with its analytical purpose
⚠️ Disclaimer (Important)
This script is for educational and analytical purposes only
It does not provide financial, investment, or trading advice
Past performance does not guarantee future results
Trading involves risk, and users are responsible for their own decisions
אסטרטגיית Pine Script®
Intraday Brahmastra Strategy by PoojaIntraday Brahmastra Strategy by Pooja
Intraday Brahmastra Strategy by Pooja is a rule-based intraday trading strategy designed to help traders identify structured entry and exit zones using price action, trend filters, and momentum confirmation.
The strategy focuses on clarity, discipline, and risk control, making it suitable for intraday decision-making across multiple timeframes.
This script is intended as a technical analysis tool, not as investment advice.
🎯 Purpose of the Strategy
The main objective of this strategy is to:
Reduce emotional trading
Provide clearly defined entry, stop-loss, and target levels
Offer multiple confirmation-based signals instead of random alerts
Help traders follow a systematic intraday trading approach
One Screen Setup to Reduce Confusion and help to take Right Decisions according Market Situtions
⚙️ Core Features Explained
1️⃣ In-built Multiple Strategy Entry Signals
The strategy combines multiple independent entry logics, allowing traders to see signals only when conditions align.
These include combinations of:
EMA, VWAP, Supertrend, RSI, Structure (BOS / CHoCH), etc
It combines oscillators, non-oscillators, and SMC concepts to create a more structured and logical trading framework.
Each signal is clearly labeled on the chart for better visual understanding.
2️⃣ Swing-Based Stop Loss Logic
Stop loss is automatically calculated using recent swing high / swing low
This helps align risk levels with market structure instead of fixed values
Avoids unrealistic or random stop placements
You can Modify your Swing High/Low pivots according your Choice
3️⃣ Risk-Reward Based Target Projection
Targets are calculated using a user-defined Risk : Reward ratio
Ensures every trade follows a pre-defined risk framework
Encourages disciplined trading instead of emotional exits
4️⃣ Clear SL Hit & Target Hit Indications
When Stop Loss or Target is reached, the strategy plots clear visual labels
This improves post-trade review and historical analysis
Helps users understand how and why a trade ended
5️⃣ Trend Change Exit (Dynamic Stop Management)
If the market structure reverses, the strategy can exit trades early
This acts as a dynamic trailing stop mechanism
Helps protect profits or limit losses during sudden reversals
6️⃣ Trend Reverse Entry (Optional Flip Logic)
On confirmed trend reversal, the strategy can optionally flip direction
Entry happens only after proper confirmation
Designed for experienced intraday traders who understand reversals
7️⃣ Force Exit (Intraday Safety Feature)
Optional time-based force exit
Useful for avoiding:
End-of-day volatility
Gap-up / gap-down risk
Ensures no unintended overnight exposure
8️⃣ Optional BOS & CHoCH Structure Plotting
Break of Structure (BOS) and Change of Character (CHoCH) can be enabled
Helps traders visually track market structure shifts
Completely optional to keep charts clean if not required
9️⃣ In-Build Indicator Framework
The strategy internally uses:
EMA
VWAP
Supertrend
RSI
SMC (Smart Money Concept)
No external indicators are required, keeping the system self-contained and lightweight.
🔟 Fake Breakout Protection Filters
To reduce low-quality signals, the strategy includes:
RSI strength filter
ADX volatility confirmation
RSI-MA distance & slope filter
These filters help avoid entries during weak or choppy market conditions.
1️⃣1️⃣Dynamic Stop Loss Trailing Through Trend Reversal
This strategy includes a dynamic stop-loss trailing mechanism based on trend reversal detection rather than fixed price movement.
When the trade is active, the system continuously monitors trend direction and structure
If a confirmed trend reversal is detected against the open position, the strategy exits the trade automatically
This exit acts as a dynamic trailing stop, adapting to changing market conditions instead of relying on static stop-loss levels
Why This Strategy Is Unique
Built on market structure and trend logic, not single indicators
Uses multiple confirmation layers to reduce low-quality signals
Includes dynamic risk management instead of fixed exits
Provides clear visual clarity for entry, stop-loss, and target
Adapts to changing market conditions during intraday trading
Focuses on discipline and process, not prediction or guarantees
This is not just a combination of indicators; it integrates five distinct strategy logics designed to reduce psychological decision-making while maintaining structured risk management.
🔔 Alert & Webhook Ready
The strategy supports TradingView alerts
Alerts are designed for signal notification only
Webhook compatible for users who integrate alerts with external tools
📢 Optional Telegram alerts can be used for personal signal notifications. This feature is informational and does not imply trade execution or profit guarantees.
👤 Suitable For
This strategy is suitable for:
Intraday traders
Structure-based traders
Traders who prefer rule-based systems
Users who want clear visual trade logic
For traders who want an advanced trading system with structured risk management and rule-based logic.
It is not recommended for users expecting guaranteed results or fully automated decision-making.
Why Invite-Only
Controlled access to ensure responsible use
Helps maintain consistency as the system evolves
Prevents misuse or misinterpretation of strategy logic
Allows better management of updates and changes
Keeps the tool aligned with its analytical purpose
⚠️ Disclaimer (Important)
This script is for educational and analytical purposes only
It does not provide financial, investment, or trading advice
Past performance does not guarantee future results
Trading involves risk, and users are responsible for their own decisions
אסטרטגיית Pine Script®
LANDRAID BTC 1d Strategylandraid BTC 1d chart strategy
base on 1day support and resistance
high win rate and high P&N
some imortant indicators are WR , MACD , EMA200 , EMA60 , MA20
אסטרטגיית Pine Script®
BTC EMA21/EMA9 + RSI Filters + VWAP Strategy (100% TP)BUY when:
• EMA21 crosses above EMA9
• RSI between 45 and 55
• Price above VWAP
• Invest exactly USDT 100
SELL when:
• Profit reaches 100% of investment (USDT 100 profit), OR
• EMA21 crosses below EMA9
• Price below VWAP
• RSI below 55
אסטרטגיית Pine Script®
Daily & Intraday Trend Alignment Strategy (KOSPI)This strategy is designed for the KOSPI market, focusing on the synergy between daily price action and intraday momentum. It is specifically backtested on KODEX 200 Leverage (122630) with a realistic capital of 10,000,000 KRW.
Key Logic:
Trend Alignment: The script identifies the daily trend by comparing the current price with the previous day's close.
Execution: It enters a position only when the intraday candle (15M or 60M) aligns with the daily trend.
LONG: Daily Bullish + Intraday Bullish Close.
SHORT: Daily Bearish + Intraday Bearish Close.
Risk Management: - Follows TradingView House Rules by limiting risk to 10% of equity per trade.
Includes realistic 0.04% commission and 2-tick slippage.
Features built-in Stop Loss and Take Profit levels.
Intraday Focus: Automatically closes all positions at 14:50 KST to avoid overnight market gaps.
אסטרטגיית Pine Script®
Kill Zone Intraday Momentum Strategy"Re-published in full compliance with TradingView House Rules, featuring realistic risk management and backtesting parameters."
This script is an intraday trend-following strategy optimized for the KOSPI market, specifically tested on KODEX 200 Leverage (122630). It utilizes the "Kill Zone" concept to determine the market's directional bias for the day.
### Strategy Logic
The strategy focuses on the first hour of the Korean market opening (09:00 - 10:00 KST).
Directional Identification: The script analyzes the 1-hour candle formed between 09:00 and 10:00.
If the candle is Bullish (Close > Open), it establishes a LONG bias.
If the candle is Bearish (Close < Open), it establishes a SHORT bias.
Entry Timing: At exactly 10:00 AM, the strategy executes an entry based on the identified bias. Users can toggle between the 1H Close or the 15M Close for the entry price.
Exit Strategy (EOD): To mitigate overnight gap risks, all positions are forcibly closed at a user-defined "End of Day" hour (Default: 15:00 KST).
### Realistic Backtesting Parameters
To provide transparent and non-misleading results, this strategy adheres to strict risk management:
Initial Capital: 10,000,000 KRW
Risk Per Trade: 10% of total equity (Sustainable risk management).
Cost Simulation: Includes a 0.04% commission and 2 ticks of slippage to reflect actual exchange conditions.
Tested Symbol: Optimized for 122630 (KODEX 200 Leverage) on a 15-minute timeframe.
### How to Use
Set your chart timezone to Asia/Seoul.
Apply the script to a lower timeframe (e.g., 15 minutes) to see the Kill Zone highlights and labels.
Use the Dashboard on the top right to monitor real-time statistics like Win Rate and Net Profit.
-------
본 스크립트는 KOSPI 시장의 개장 초기 변동성(Kill Zone)을 활용한 일중 추세 추종 전략입니다. KODEX 200 레버리지(122630) 종목에서 자본금 1,000만 원을 기준으로 최적화되었습니다.
9시부터 10시까지의 1시간봉 방향성을 바탕으로 당일의 매수/매도 우위를 판단하며, 장 마감 시점에 모든 포지션을 정리하여 오버나잇 리스크를 배제합니다. 하우스 룰 준수를 위해 자산의 10%만을 진입 수량으로 설정하고 수수료와 슬리피지를 반영하여 현실적인 백테스트 결과를 제공합니다.
אסטרטגיית Pine Script®
BTC Session Momentum (UAE Time Logic)BTC Session Momentum (UAE Time Logic): Crypto volatility peaks during forex session overlaps Research confirms that crypto volatility increases when forex sessions overlap because global traders are most active and macro news is released. This framework is designed for BTC, ETH, and high‑liquidity altcoins, and it uses the natural volatility cycles created by global forex sessions. Research confirms that crypto volatility increases when forex sessions overlap because global traders are most active and macro news is released.
אסטרטגיית Pine Script®
Bollinger + EMA StrategyBollinger Bands + EMA Crossover Strategy
This strategy combines:
Bollinger Bands (20-period, 2 standard deviations) to identify overbought/oversold conditions
Three EMAs (8, 21, 50 periods) to confirm trend direction
Entry Signals:
BUY (Green arrow): Price closes below lower Bollinger Band AND EMAs are bullishly aligned (8 > 21 > 50)
SELL (Red arrow): Price closes above upper Bollinger Band AND EMAs are bearishly aligned (8 < 21 < 50)
Exit Rules: Position closes when price crosses the middle Bollinger Band.
Concept: Wait for extreme price movements outside Bollinger Bands, but only trade in the direction of the EMA trend alignment for higher probability setups.
אסטרטגיית Pine Script®
אסטרטגיית Pine Script®
אסטרטגיית Pine Script®
D.Y Volume Push / Reversal Strategy🚀 D.Y Volume Push / Reversal Strategy
📊 This strategy is designed to analyze abnormal volume behavior at the start of the trading session and use it as a structural reference for intraday trade decisions.
🧠 Core Concept :
⏱️ During the first X minutes of the trading day (default: 5 minutes), the strategy records:
The maximum traded volume
The opening range high and low
📌 The opening volume peak is treated as a benchmark, not as a direct entry signal.
Trades are evaluated only after the sampling window has ended.
📈 Trade Logic
🔍 After the opening range is established, the strategy monitors price behavior relative to that range:
Price must break above or below the opening range
The breakout candle must show volume exceeding a user-defined percentage of the opening volume peak
Breakouts are classified as:
⚡ Initial breakout (first breakout of the day), favoring momentum continuation
🔄 Subsequent breakouts, where the strategy looks for potential reversal behavior
🎯 This breakout-state logic allows the system to dynamically adapt between continuation and reversal scenarios, based on both price structure and volume participation.
⏰ Time & Trade Filters
🕒 To maintain controlled intraday behavior:
Trades are allowed only during a limited number of hours after session open
A maximum number of trades per day is enforced
🔔 All open positions are automatically closed near the end of the session to avoid overnight exposure
🛡️ Risk Management
📉 Risk is handled dynamically:
Stop loss levels are calculated using recent price structure (recent highs/lows)
Take profit targets are derived from a configurable Risk/Reward ratio
⚙️ Risk parameters automatically adjust to current market structure and volatility
⚙️ Backtesting Assumptions
💰 The strategy uses the following default testing configuration:
Initial capital: $100,000
Position size: Fixed 100 shares per trade
Commission & slippage: Enabled to simulate realistic conditions
Timeframe: Designed and tested primarily on the 1-minute chart
📌 Best suited for liquid, high-priced equities (approximately $400–$700 per share)
🔧 Users are encouraged to adjust capital, position size, and parameters according to the traded instrument and personal risk tolerance.
📌 Notes
📚 This strategy is intended for educational and research purposes only.
📉 Backtest results may vary depending on market conditions, symbol selection, and parameter configuration.
אסטרטגיית Pine Script®






















