OPEN-SOURCE SCRIPT
ORB + Fib Breakout Signals (Strategy)

ORB + Fib Breakout Signals (Strategy)
An opening-range breakout (ORB) strategy combined with Fibonacci levels and a
defined risk model. It marks the session's opening range, goes long on a break
above the range high and short below the range low, then manages the trade with
an ATR-based stop, an R-multiple target, and an optional breakeven move.
How it works
- Opening range — builds the high/low of the first 15/30/60 minutes of your
chosen session (timezone configurable).
- Entry — long on a close (or wick) above the ORB high, short below the ORB low;
one signal per direction per day by default.
- Fib levels — plots the standard retracements (.236–.786) inside the range plus
the 1.272 / 1.618 extensions as reference targets.
- Risk model — stop by ATR (default), Fib 0.5, opposite side of the range, or
fixed ticks; target as a multiple of risk (default 2R); optional move to
breakeven after 1R.
- Optional filters — a higher-timeframe EMA trend filter and a scale-out that
books half at 1R and lets the remainder run.
- Daily guards — max entries per day, daily loss limit, optional daily profit
lock, and flat-at-session-close, for prop-style risk rules.
Inputs are grouped (Opening Range, Signals, Fibonacci, Trend Filter, Risk Model,
Daily Guards) so you can adapt it to any index future or timeframe.
Notes
- Commission and slippage are included in the defaults — set them in Properties
to match your broker before drawing conclusions.
- Performance varies with symbol, timeframe, and settings. Test on your own data
and forward-test on a simulator before trading it live.
- This is an educational tool, not financial advice. Past backtest results do
not guarantee future performance.
An opening-range breakout (ORB) strategy combined with Fibonacci levels and a
defined risk model. It marks the session's opening range, goes long on a break
above the range high and short below the range low, then manages the trade with
an ATR-based stop, an R-multiple target, and an optional breakeven move.
How it works
- Opening range — builds the high/low of the first 15/30/60 minutes of your
chosen session (timezone configurable).
- Entry — long on a close (or wick) above the ORB high, short below the ORB low;
one signal per direction per day by default.
- Fib levels — plots the standard retracements (.236–.786) inside the range plus
the 1.272 / 1.618 extensions as reference targets.
- Risk model — stop by ATR (default), Fib 0.5, opposite side of the range, or
fixed ticks; target as a multiple of risk (default 2R); optional move to
breakeven after 1R.
- Optional filters — a higher-timeframe EMA trend filter and a scale-out that
books half at 1R and lets the remainder run.
- Daily guards — max entries per day, daily loss limit, optional daily profit
lock, and flat-at-session-close, for prop-style risk rules.
Inputs are grouped (Opening Range, Signals, Fibonacci, Trend Filter, Risk Model,
Daily Guards) so you can adapt it to any index future or timeframe.
Notes
- Commission and slippage are included in the defaults — set them in Properties
to match your broker before drawing conclusions.
- Performance varies with symbol, timeframe, and settings. Test on your own data
and forward-test on a simulator before trading it live.
- This is an educational tool, not financial advice. Past backtest results do
not guarantee future performance.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.