Open Close Cross Strategy R5 revised by JustUncleL
Dec 24, 2016

The Open Close Cross Strategy R5 indicator provides a versatile trading framework based on moving average crossovers of open and close price series, often utilizing higher timeframes to filter noise. It is designed to capture trend momentum while offering extensive customization through various moving average types and risk management settings.
Usage
The Usage section focuses on identifying trend shifts through the interaction of open and close price ribbons. When the calculated close series crosses above the open series, a bullish signal is generated; conversely, a cross under indicates a bearish shift.
- Higher Timeframe Analysis: Users can apply an "Alternate Resolution" multiplier (typically 3x to 5x the base chart) to smooth out price action. This allows the strategy to enter trades based on broader trend confirmation while remaining on a lower timeframe for execution.
- Trend Filtering: Selecting smoothed moving averages like SMMA or SSMA can help reduce false positives in choppy markets.
- Trade Execution: The script allows for Long-only, Short-only, or Bi-directional trading. It includes built-in Stop Loss and Target Profit inputs to automate exit logic.
- Visual Aids: Optional bar coloring provides immediate visual feedback on the current trend status relative to the crossover logic.
Details
The strategy calculates two distinct series based on a selected moving average type: one for the "Open" and one for the "Close." The core logic relies on the relationship between these two smoothed lines.
- Multi-Resolution Handling: The script uses a multiplier approach to determine the alternate resolution (e.g., if on a 15m chart with a 3x multiplier, the logic calculates based on a 45m timeframe). This ensures compatibility across daily, weekly, and monthly intervals.
- Moving Average Library: The tool integrates 12 different MA types, including SMA, EMA, DEMA, TEMA, WMA, VWMA, SMMA, HullMA, LSMA, ALMA, SSMA, and TMA.
- Non-Repainting Design: By utilizing
calc_on_every_tick=falseand optional delay offsets, the strategy aims to provide consistency between backtesting results and real-time execution. - Backtesting Constraints: Users can limit the historical scope of the strategy using the "Number of Bars" setting to prevent "too many trades" errors on deep historical data.
Settings
General Settings
- Use Alternate Resolution?: Toggles the use of a higher timeframe for the crossover logic.
- Multiplier for Alternate Resolution: Sets the scale for the higher timeframe relative to the current chart.
- MA Type: Determines the mathematical smoothing method used for the open and close series.
- MA Period: The lookback length for the selected moving averages.
- Offset for LSMA / Sigma for ALMA: Specific parameters used only when LSMA or ALMA is selected.
- Offset for ALMA: Adjusts the ALMA distribution curve.
- Show coloured Bars: Enables or disables trend-based bar coloring on the chart.
- Delay Open/Close MA: Shifts the calculation to help ensure signals do not repaint.
- What trades should be taken: Filters entries to Long, Short, Both, or None.
Risk Management
- Initial Stop Loss Points: Sets a fixed point-based stop loss; set to zero to disable.
- Initial Target Profit Points: Sets a fixed point-based take profit; set to zero to disable.
Backtesting
- Number of Bars for Back Testing: Limits the strategy execution to a specific number of historical bars.
FAQ
How do I reduce false signals in a sideways market?
Using a higher resolution multiplier (e.g., 4 or 5) and selecting a smoothed moving average type like SMMA or SSMA can help filter out minor price fluctuations.
Why are no trades appearing on my chart?
Ensure the "What trades should be taken" setting is not set to "NONE" and check that your "Number of Bars for Back Testing" is high enough to cover the visible chart area.
How can I access the Open Close Cross Strategy R5?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.
Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.
Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.
As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.
Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.
Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.
This does not represent our full Disclaimer. Please read our full disclaimer.
© 2026 LuxAlgo Global, LLC.

