Daily Close Comparison Strategy (by ChartArt via sirolf2009)
Feb 28, 2016

The Daily Close Comparison Strategy indicator automates trade entries by calculating the percentage difference between the current daily close and the previous daily close to identify directional market momentum.
Usage
The Usage section describes how the script can be used to identify trend shifts based on daily price action. The strategy operates on a simple logic of price comparison:
- Long Positions: The strategy enters a long position when the current day's close price is higher than the previous day's close price, exceeding the user-defined threshold.
- Short Positions: The strategy enters a short position when the current day's close price is lower than the previous day's close price, falling below the negative user-defined threshold.
The indicator features a visual interface where a "Prediction Line" and "Prediction Area" represent the percentage difference between the two daily periods. The background color shifts to green for bullish conditions and red for bearish conditions, providing immediate visual feedback on the current strategy bias.
Details
The Daily Close Comparison Strategy is a simplified version of the "ANN Strategy" originally developed by sirolf2009. While the original version utilizes an Artificial Neural Network to process data, this version focuses exclusively on the core price delta.
Key technical implementation details include:
- Price Source: This version utilizes standard
closeprices rather thanOHLC4averages, as the author found this provided more consistent results during historical analysis. - Multi-Timeframe Data: The script uses
request.securityto fetch daily data regardless of the chart's current timeframe. - Backtesting Note: Users should be aware that because the script references the current daily close, the performance reflected in backtests may include data that is only confirmed at the end of the trading day. This is a common characteristic of strategies utilizing higher-timeframe data for signal generation.
- Execution: The strategy does not include built-in stop loss or take profit logic, functioning purely as a directional reversal system.
Settings
- Price Difference Threshold: Sets the minimum percentage difference required between the current and previous daily close to trigger a signal. Increasing this value can filter out minor price fluctuations or "noise."
FAQ
Does this indicator include an Artificial Neural Network (ANN)? No, this version is a "bare-bones" refactor that removes the ANN component to focus strictly on the percentage difference between daily closing prices.
Does this strategy include money management features? This specific implementation does not include automated stop loss or take profit orders. It is designed to be a logic-based entry system where positions are reversed based on price delta.
How can I access the Daily Close Comparison Strategy? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Unlock Unlimited Access to the LuxAlgo Library
Upgrade your plan to get all indicators, strategies, charts, and full access to Quant, our AI agent.
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.

