PROTECTED SOURCE SCRIPT
CyberTrading-Inside Hunt Robot

This Pine Script strategy, titled "Cyber-Inside", is a fully automated entry and risk management system built around inside bar pierce patterns and ATR-based dynamic stops/targets. It identifies specific candle formations, calculates position sizing based on risk percentage, and visually displays risk/reward zones and trade labels on the chart.
Detailed Explanation
1. Core Logic
The script searches for inside bars — candles whose high and low are contained within the previous bar — that appear after a valid “normal” or “long” range candle.
Then it waits for a wick pierce (a candle that breaks the previous inside bar's range slightly but closes inside).
That wick pierce acts as a potential reversal or continuation signal:
wickDown → possible long entry
wickUp → possible short entry
2. ATR-based Classification
Each candle is compared to the ATR(24):
Spinning (small) → below 0.8 × ATR
Standard → between 0.8× and 1.2× ATR
Long → between 1.2× and 2.5× ATR
Huge → above 2.5× ATR
Only certain candle types (standard or long) in the previous bars qualify for pattern validation.
3. Entry Conditions
A trade signal occurs when:
The current bar forms a wick pierce of a prior inside bar pattern.
No active position exists (strategy.position_size == 0).
Then:
For longs, entry at close, stop at previous low minus ATR buffer.
For shorts, entry at close, stop at previous high plus ATR buffer.
4. Risk Management
The stop distance defines the risk per trade, and the position size is adjusted dynamically so that only the chosen riskPercent (e.g., 1%) of equity is at risk.
If useRR is enabled, a take-profit target is placed using the defined risk/reward multiple (rr, e.g. 1:3).
If disabled, the target defaults to the previous candle’s high or low.
5. Visualization
The strategy visually marks:
Entry points (triangles)
Red box = risk zone (entry → stop)
Green box = reward zone (entry → target)
Optional diagonal and horizontal lines for clarity
Labels updated after trade closes with PnL values (profit or loss)
6. Application
This system helps traders:
Automate inside-bar breakout or reversal entries
Maintain strict risk-based position sizing
Visually assess trade zones and risk/reward areas
Backtest and evaluate performance consistency on various timeframes and assets
Detailed Explanation
1. Core Logic
The script searches for inside bars — candles whose high and low are contained within the previous bar — that appear after a valid “normal” or “long” range candle.
Then it waits for a wick pierce (a candle that breaks the previous inside bar's range slightly but closes inside).
That wick pierce acts as a potential reversal or continuation signal:
wickDown → possible long entry
wickUp → possible short entry
2. ATR-based Classification
Each candle is compared to the ATR(24):
Spinning (small) → below 0.8 × ATR
Standard → between 0.8× and 1.2× ATR
Long → between 1.2× and 2.5× ATR
Huge → above 2.5× ATR
Only certain candle types (standard or long) in the previous bars qualify for pattern validation.
3. Entry Conditions
A trade signal occurs when:
The current bar forms a wick pierce of a prior inside bar pattern.
No active position exists (strategy.position_size == 0).
Then:
For longs, entry at close, stop at previous low minus ATR buffer.
For shorts, entry at close, stop at previous high plus ATR buffer.
4. Risk Management
The stop distance defines the risk per trade, and the position size is adjusted dynamically so that only the chosen riskPercent (e.g., 1%) of equity is at risk.
If useRR is enabled, a take-profit target is placed using the defined risk/reward multiple (rr, e.g. 1:3).
If disabled, the target defaults to the previous candle’s high or low.
5. Visualization
The strategy visually marks:
Entry points (triangles)
Red box = risk zone (entry → stop)
Green box = reward zone (entry → target)
Optional diagonal and horizontal lines for clarity
Labels updated after trade closes with PnL values (profit or loss)
6. Application
This system helps traders:
Automate inside-bar breakout or reversal entries
Maintain strict risk-based position sizing
Visually assess trade zones and risk/reward areas
Backtest and evaluate performance consistency on various timeframes and assets
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarlo liberamente e senza alcuna limitazione – per saperne di più clicca qui.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarlo liberamente e senza alcuna limitazione – per saperne di più clicca qui.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.