Inside Candle Positional Strategy by subrajitmishra

By subrajitmishra

Performance Metrics

Description

IntroductionThis strategy implements a structured Inside Candle breakout model designed to capture expansion moves following short-term price compression.An inside candle represents a temporary contraction in volatility, where the entire range of the current bar is contained within the previous bar. The preceding bar becomes the Mother Candle, and its range defines the potential breakout boundaries.The model focuses purely on price structure and predefined risk parameters rather than trend-following overlays or momentum filters.Core Logic and StructureInside Candle DetectionAn inside candle is defined as:Current High Previous LowWhen this condition occurs, the previous bar is marked as the Mother Candle. Only one breakout attempt is allowed per identified structure to prevent repeated entries within the same consolidation phase.Trade Entry RulesEntries are executed at market on confirmed bar close.Long PositionClose > Mother Candle HighNo active positionShort PositionClose < Mother Candle LowNo active positionThis ensures breakout confirmation rather than anticipatory positioning.Risk Management FrameworkRisk control is fully rule-based and determined at the moment of entry.For each trade:Initial Stop Loss = Opposite boundary of the Mother CandleRisk = Distance between entry price and initial stopTarget = Entry ± (Risk × Risk-Reward Ratio)The Risk-Reward Ratio is user configurable.Only one position is active at any time (pyramiding disabled).Optional ATR-Based Trailing StopAn optional trailing mechanism may be enabled:Trailing Stop updates on every confirmed bar.Calculated using ATR × Multiplier.Moves only in the direction of profit.Never worsens beyond the initial stop level.If disabled, exits rely solely on the fixed stop and target.Execution ModelAll signals are calculated on confirmed bar closes.Entries are market orders.Stop and target levels are evaluated using bar OHLC values.No repainting logic is used.No intrabar order sequencing assumptions are applied.Backtest performance may differ from live execution due to slippage, spread, liquidity, and market conditions.Visual ComponentsInside candles are highlighted (default: yellow).Entry, Initial Stop, Trailing Stop (if enabled), and Target levels are displayed using line-break formatting for clarity.Designed to maintain structural visibility without excessive chart clutter.Strategy DefaultsInitial Capital: $1000Commission: 0.05%Position Size: 1 (fixed quantity)Pyramiding: DisabledThese defaults can be adjusted in the Strategy Properties panel.Intended ApplicationThis strategy is suited for studying breakout behavior after short-term consolidation phases.Performance characteristics will vary depending on instrument volatility, timeframe, and market regime.It is presented as a structural breakout framework and should be tested and adapted according to individual risk tolerance and trading objectives.DisclaimerTrading involves significant risk. This script is provided for educational and research purposes only and does not constitute financial advice. Users are responsible for evaluating its suitability for their own trading decisions.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView