QQQ Gapped Above its 252-Daily Bar High on 5/25/2023 in Rare and Dramatic Fashion. Possibly Bullish for Friday’s Open. [Article] (Point-and-Click TradeStation® Strategy)
Original Trading Strategy
Peer Reviews, Modifications & Responses
Thanks for Sharing!
Trading Strategy Article
Summary: QQQ’s daily bar on Thursday, May 25, 2023 gapped above its prior 252-daily bar high in rare and dramatic fashion. This has only happened one other time in the last 23 years, namely on October 27, 2017. Going long on the open of the daily bar after the October 27, 2017 bar and exiting on the open four bars later would have been a profitable trade.
This chart pattern can be seen at the right edge of QQQ’s daily bar chart ending on May 25, 2023:
![Screenshot for point-and-click trading strategy "QQQ Gapped Above its 252-Daily Bar High on 5/25/2023 in Rare and Dramatic Fashion. Possibly Bullish for Friday’s Open. [Article]" Screenshot for point-and-click trading strategy "QQQ Gapped Above its 252-Daily Bar High on 5/25/2023 in Rare and Dramatic Fashion. Possibly Bullish for Friday’s Open. [Article]"](https://eadn-wc02-5937971.nxedge.io/images/trading-idea-images/2023/05/25/quagensia/qqq-gapped-above-its-252-daily-bar-high-on-2023-05-25-t-1.png)
The aforementioned chart pattern has the following characteristics:
- The May 25, 2023 bar gapped above the prior 252-daily bar high and closed above its open.
- The open and close prices of the daily bar prior to the May 25, 2023 bar (the May 24, 2023 bar) were both below the open and close prices of the daily bar that preceded it (the May 23, 2023 bar), and the open and close prices of the May 23, 2023 bar were both below the open and close prices of the daily bar that preceded it (the May 22, 2023 bar).
- None of the previous 252 daily bars met the above criteria.
So the May 25, 2023 bar rejected the market direction of the prior two bars and opened above the prior 252-daily bar high.
To determine if this chart pattern had ever occurred on QQQ’s daily bars in the past, and if so, what would have happened if a long position had been taken on the open of the next trading day and exited on the open of the bar four bars later, we created a Quagensia T Edition strategy using point-and-click, generated its TradeStation® EasyLanguage® strategy code, and backtested the strategy in TradeStation® 10.
We were hoping that this chart pattern would have occurred many times in QQQ’s daily bar price history so that the results of the backtest would have been more statistically significant, but unfortunately our backtest showed that it only happened one other time in the last 23 years of QQQ’s price history, on October 27, 2017. Going long on the open of the daily bar after the October 27, 2017 bar and exiting on the open of the bar four bars later would have been a profitable trade, as can be seen in the chart below:
![Screenshot for point-and-click trading strategy "QQQ Gapped Above its 252-Daily Bar High on 5/25/2023 in Rare and Dramatic Fashion. Possibly Bullish for Friday’s Open. [Article]" Screenshot for point-and-click trading strategy "QQQ Gapped Above its 252-Daily Bar High on 5/25/2023 in Rare and Dramatic Fashion. Possibly Bullish for Friday’s Open. [Article]"](https://eadn-wc02-5937971.nxedge.io/images/trading-idea-images/2023/05/25/quagensia/qqq-gapped-above-its-252-daily-bar-high-on-2023-05-25-t-2.png)
While this is clearly not a statistically significant finding and we were hoping that there would have been more times in the last 23 years when this pattern occurred on QQQ’s daily bars, we decided to publish this Quagensia T Edition strategy and our findings anyway so that:
- Traders could see the other time in the last 23 years when this specific chart pattern occurred on QQQ’s daily bars in case it informed their trading decisions for Friday’s open.
- Traders would have another example of how to test their trading ideas before they trade them instead of assuming that a testable chart pattern is bullish or bearish.
- This specific Quagensia T Edition strategy will be useful to traders in the future on other instruments and not just on daily price charts. Traders can change the strategy’s input parameters from within the TradeStation® 10 user interface to change various aspects of the strategy such as:
- The number of previous bars whose maximum high price must be gapped above.
- The number of bars to stay in the trade. We chose four bars for our backtest since the last four bars of the chart formed the final part of the chart pattern that was 253 bars in the making.
Traders can then run backtests to determine if the similar pattern based on their customizations is bullish or bearish looking out a customizable number of bars.
We invite you to download the Quagensia T Edition strategy on this page, open it in Quagensia T Edition, generate its TradeStation® EasyLanguage® strategy code and test it in TradeStation® 10 where you should be able to verify our results. You can then explore the effects of changing the strategy’s aforementioned input parameters. Finally, if you have a valid paid license for Quagensia T Edition you can change the Quagensia T Edition strategy’s logic without code so you can modify the entry criteria to better match the chart pattern that you are interested in and you can add more interesting exit logic than a simple time stop such as adding a trailing stop or a profit target.
Special instructions: You must set the “Maximum number of bars study will reference” for this strategy to be large enough so that it doesn’t try to calculate the prior X-bar high before there are at least X bars before the first bar being checked for the entry criteria. If you backtest this strategy with the default of 252 for the X-bar high it would be safe to use 252 for this number. You can edit the “Maximum number of bars study will reference” field from the screen that appears when you click on the “Properties for All…” button from the dialog box where you add the strategy to the chart. If you do not do this, the backtest will fail with an error message.
This article is an example of algorithmic journalism. We invite content creators to use a Quagensia Desktop Application to create their own articles based on tested trading ideas. And we invite traders to use a Quagensia Desktop Application to test their ideas before they trade them.
This trading idea is subject to the disclaimers in our Terms of Service.
How to Get the Quagensia Strategies
The downloadable zip file linked to below contains Quagensia T Edition (for TradeStation®) files and/or auxiliary files that were created by us at Quagensia, Inc.:
Click the link above to download the zip file and unzip it. If this zip file contains point-and-click Quagensia Trading Strategy files for your edition of the Quagensia Desktop Application, put the point-and-click Quagensia Trading Strategy files into your “My Algos” folder as described in the video Downloading & Importing Third-Party Strategies into Quagensia N Edition (for NinjaTrader®) or Downloading & Importing Third-Party Strategies into Quagensia T Edition (for TradeStation®).
Customize Quagensia Strategies with Your Own Ideas
Tweaking Quagensia Trading Strategies using point-and-click with the Quagensia Desktop Application is easy for non-programmers. If you get stuck you can usually find the answer you need in our online help documentation or you can ask a question in our friendly Discord community.
If you don’t want to tweak a Quagensia Trading Strategy with point-and-click to add your own proprietary trading logic, you can still download a Quagensia Trading Strategy file, open it up in the Quagensia Desktop Application, and generate its code, then backtest and optimize the trading strategy on different instruments, different bar periods (weekly bars, daily bars, hourly bars, 15-minute bars, etc.), or different bar types (time-based bars, volume-based bars, tick-based bars, etc.), and use different start and end dates.
Some tweaks you can make to the Quagensia Trading Strategies you download include:
Modify the entry & exit logic.
- Add more conditions, remove conditions, or change them by choosing from among a very large number of components, including many exotic indicators.
- Add or modify stop losses, trailing stops, and profit targets. Make them tighter, less tight, or based on an entirely different calculation.
- Add or modify time stops. For example, exit after a certain number of bars either unconditionally or only if the post-entry price action did or did not exhibit certain characteristics.
Enhance the output of the strategy to go beyond simply placing orders.
- Draw lines, shapes, and text on the chart. For instance, you can mark times or prices where each entry or exit condition of a multi-condition entry or exit was true, even if all the necessary entry or exit conditions were not true at the same time so an entry or exit did not occur.
- Write information to NinjaTrader®’s NinjaScript® Output window or TradeStation®’s EasyLanguage® Print Log window.
- Write information to a file. You can even output a report that can be opened in Microsoft Excel or consumed by another application that reads comma-delimited, semicolon-delimited, or otherwise character-delimited tabular data files.
![QQQ Gapped Above its 252-Daily Bar High on 5/25/2023 in Rare and Dramatic Fashion. Possibly Bullish for Friday’s Open. [Article] (Point-and-Click TradeStation® Strategy) QQQ Gapped Above its 252-Daily Bar High on 5/25/2023 in Rare and Dramatic Fashion. Possibly Bullish for Friday’s Open. [Article] (Point-and-Click TradeStation® Strategy)](https://eadn-wc02-5937971.nxedge.io/images/trading-idea-images/2023/05/25/quagensia/qqq-gapped-above-its-252-daily-bar-high-on-2023-05-25-t.png)
