PROTECTED SOURCE SCRIPT
Aggiornato Outside Bar Strategy with Multiple Entry Models

Outside Bar Strategy with Multiple Entry Models
This Pine Script strategy implements a versatile trading system based on the Outside Bar pattern, offering three distinct entry models: Close Entry, High/Low Entry, and Midpoint Entry. Designed for traders seeking flexibility, the strategy includes customizable risk/reward ratios, an optional EMA trend filter, and enhanced visualization with line fills.
Key Features:
Entry Models:
Close Entry: Enters a long position when the current candle closes above the high of the previous outside bullish bar . For short, it enters when the candle closes below the low of the previous outside bearish bar.
High/Low Entry: Enters a long position when the price crosses above the high of the previous outside bullish bar . For short, it enters when the price crosses below the low of the previous outside bearish bar .
Midpoint Entry: Places a limit order at the midpoint of the previous outside bar, entering when the price reaches this level.
EMA Trend Filter: Optionally filters signals based on the alignment of EMAs (7 > 25 > 99 > 200 for long, 7 < 25 < 99 < 200 for short). Can be toggled via the Use EMA Filter input.
Risk/Reward Management: Configurable risk/reward ratio (default 2.0) with stop-loss set at the low/high of the outside bar and take-profit calculated based on the bar's range multiplied by the ratio.
Visualization:
Lines for entry, stop-loss, and take-profit levels (dashed for active trades, solid for pending Midpoint Entry orders).
Line fills: Red between entry and stop-loss, green between entry and take-profit.
Previous lines and fills persist on the chart for historical reference (line deletion disabled).
Pending limit orders for Midpoint Entry extend dynamically to the right until triggered or canceled.
Information Table: Displays real-time trade details (entry model, RR ratio, open trade status, entry/stop/take-profit levels, profit/loss percentage) and strategy statistics (success rate, total trades). For Midpoint Entry, pending order details are shown.
Inputs:
Entry Model: Choose between Close Entry, High/Low Entry, or Midpoint Entry (default: Close Entry).
Risk/Reward Ratio: Set the RR ratio (default: 2.0, step: 0.5).
Use EMA Filter: Enable/disable the EMA trend filter (default: true).
Line Colors and Style: Customize colors for entry, stop-loss, and take-profit lines, and select line style (solid or dashed).
Table Settings: Adjust table text color, size (small/normal/large), and position (right top/middle/bottom).
Disclaimer: This strategy is for educational purposes only. Backtest thoroughly and use at your own risk. Past performance is not indicative of future results.
This Pine Script strategy implements a versatile trading system based on the Outside Bar pattern, offering three distinct entry models: Close Entry, High/Low Entry, and Midpoint Entry. Designed for traders seeking flexibility, the strategy includes customizable risk/reward ratios, an optional EMA trend filter, and enhanced visualization with line fills.
Key Features:
Entry Models:
Close Entry: Enters a long position when the current candle closes above the high of the previous outside bullish bar . For short, it enters when the candle closes below the low of the previous outside bearish bar.
High/Low Entry: Enters a long position when the price crosses above the high of the previous outside bullish bar . For short, it enters when the price crosses below the low of the previous outside bearish bar .
Midpoint Entry: Places a limit order at the midpoint of the previous outside bar, entering when the price reaches this level.
EMA Trend Filter: Optionally filters signals based on the alignment of EMAs (7 > 25 > 99 > 200 for long, 7 < 25 < 99 < 200 for short). Can be toggled via the Use EMA Filter input.
Risk/Reward Management: Configurable risk/reward ratio (default 2.0) with stop-loss set at the low/high of the outside bar and take-profit calculated based on the bar's range multiplied by the ratio.
Visualization:
Lines for entry, stop-loss, and take-profit levels (dashed for active trades, solid for pending Midpoint Entry orders).
Line fills: Red between entry and stop-loss, green between entry and take-profit.
Previous lines and fills persist on the chart for historical reference (line deletion disabled).
Pending limit orders for Midpoint Entry extend dynamically to the right until triggered or canceled.
Information Table: Displays real-time trade details (entry model, RR ratio, open trade status, entry/stop/take-profit levels, profit/loss percentage) and strategy statistics (success rate, total trades). For Midpoint Entry, pending order details are shown.
Inputs:
Entry Model: Choose between Close Entry, High/Low Entry, or Midpoint Entry (default: Close Entry).
Risk/Reward Ratio: Set the RR ratio (default: 2.0, step: 0.5).
Use EMA Filter: Enable/disable the EMA trend filter (default: true).
Line Colors and Style: Customize colors for entry, stop-loss, and take-profit lines, and select line style (solid or dashed).
Table Settings: Adjust table text color, size (small/normal/large), and position (right top/middle/bottom).
Disclaimer: This strategy is for educational purposes only. Backtest thoroughly and use at your own risk. Past performance is not indicative of future results.
Note di rilascio
RR Table UpdateNote di rilascio
R updateScript protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarlo liberamente e senza alcuna limitazione – per saperne di più clicca qui.
Telegram Kanalım için Bağlantı Linki
t.me/+jzPIy7zWo
okx.com/join/FXTDPR
t.me/+jzPIy7zWo
okx.com/join/FXTDPR
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.
Telegram Kanalım için Bağlantı Linki
t.me/+jzPIy7zWo
okx.com/join/FXTDPR
t.me/+jzPIy7zWo
okx.com/join/FXTDPR
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.