Skip to content

jcornierfra/TradingView_Strategy_JCO_OPR_Breakout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TradingView Strategy OPR Breakout

Pine Script v6 strategy for NQ (Nasdaq Futures) NY Session breakout trading with configurable filters and risk management.

Screenshots

Chart Display

Chart Display

Strategy Results

Strategy Results

Overview

This strategy identifies the Opening Price Range (OPR) during a configurable time window and trades breakouts above/below that range during the NY trading session.

Features

  • Configurable Range Window: Define the start time and duration for calculating the high/low range
  • Session-Based Trading: Trade entries only during a specified time window
  • RSI Filter (optional): Filter entries based on RSI overbought/oversold conditions
  • EMA Filter (optional): Require price to be above/below EMA for entries
  • Swing-Based Stop Loss: Uses recent swing highs/lows for dynamic stop placement
  • Flexible Risk:Reward: Common R:R or separate values for long/short positions
  • Automatic Position Close: Force-close all positions at a specified time
  • Visual Indicators: Range boxes, breakout lines, SL/TP levels on chart
  • One Trade Per Day: Prevents overtrading

Parameters

Time Settings

Parameter Description
Range Start HH:MM Start time for range calculation
Range Duration Duration in minutes for range accumulation
Trade Open HH:MM Start of entry window
Trade Stop HH:MM End of entry window
Trade Close HH:MM Force close all positions
Timezone Timezone for all time parameters

Filters

Parameter Description
RSI Filter Enable/disable RSI-based entry filtering
RSI Overbought Threshold for long entries
RSI Oversold Threshold for short entries
EMA Filter Enable/disable EMA trend filter
EMA Period EMA length for trend determination

Trade Settings

Parameter Description
R:R Common Risk:Reward ratio (when using common value)
R:R Long Risk:Reward for long positions (when separate)
R:R Short Risk:Reward for short positions (when separate)

Entry Logic

Long Entry:

  • Price closes above range high
  • Within trading session window
  • RSI conditions met (if enabled)
  • Price above EMA (if enabled)
  • No trade taken today

Short Entry:

  • Price closes below range low
  • Within trading session window
  • RSI conditions met (if enabled)
  • Price below EMA (if enabled)
  • No trade taken today

Installation

  1. Open TradingView and go to Pine Editor
  2. Create a new script
  3. Copy and paste the content of Strategy_OPR_Breakout.pine
  4. Save and add to chart

License

This code is subject to the terms of the Mozilla Public License 2.0.

About

Pine Script v6 strategy for NQ NY Session OPR breakout trading with RSI/EMA filters and swing-based stop loss

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors