Reality Check: Buy and Hold (Point-and-Click TradeStation® Strategy)
Original Trading Strategy
Links to the section of the video titled “Using & Customizing the Built-In Strategies in Quagensia T Edition” in which the built-in “Reality Check” strategies are covered.
Peer Reviews, Modifications & Responses
Thanks for Sharing!
Trading Strategy Summary
This trading strategy acts as a quick reality check to ensure that a profitable backtest of a long-only trading strategy isn’t profitable merely because the instrument’s price chart was going up during the backtest period.
The main value of this strategy is not that it calculates a single profit metric for buying a single instrument and holding the long position between two dates, because a single profit metric for a single instrument can be quickly calculated manually using a calculator and a TradeStation® chart. Instead, the main value of this strategy is two-fold:
1. When you run a backtest of this strategy between two dates and view the results in TradeStation®’s “Strategy Performance Report” window, you get the entire performance profile of buying and holding an instrument, not just a single performance metric. You can then compare the entire performance profile of your strategy with that of buying an instrument and holding the long position between two dates by clicking through the tabs in the “Strategy Performance Report” window for each strategy. You can compare metrics and graphs including risk metrics, equity curves, underwater equity curves, reports that break performance metrics down by year, month, week, and day, average profit by month of the year, and more.
2. While it is easy to calculate a single profit metric for buying a single instrument and holding the long position between two dates, it becomes time-prohibitive to do this manually for each of a large basket of instruments, like all the stocks in the S&P 500 index. A quick backtest of this strategy on a basket of instruments removes the need to do any manual calculations on each of the instruments in the basket of instruments, plus you get all the benefits of the “Strategy Perfomance Report” window for each of the instruments in your basket as previously described.
This trading strategy enters a long position on the bar directly after the bar whose date and time is greater than or equal to the “Start Date” and “Start Time” input parameters and holds the position until the backtest comes across a price bar whose date and time is greater than or equal to the “End Date” and “End Time” input parameters if such a bar is encountered, or if no such bar is encountered because the “End Date” and “End Time” is further in the future than the end date and time of the backtest, then it will hold the position through the end date of the backtest.
Set the start and end date input parameters to be outside the range of your backtest start and end dates if you don’t want to limit the long position to be between two dates and times.
Set the start and end date and time input parameters to match the dates and times of the signal bar of the entry and the signal bar of the exit if you want to limit the long position to be between the two dates and times that your long-only strategy had simulated trades between in the favorable backtest that you want to compare against buying and holding the same instrument, to eliminate the possibility that your long-only strategy only performed better than this reality check strategy because the instrument’s price chart was going down either before your first simulated trade or after your last simulated trade and so your long-only strategy simply avoided trading during some down periods during which this reality check strategy held a long position.
If you want to enter the long position on the earliest bar possible, change the value of the “Maximum number of bars study will reference” field in TradeStation®’s “Strategy Properties for All Strategies on this Chart” window to 0. To open the “Strategy Properties for All Strategies on this Chart” window from the TradeStation® user interface, click on the “Properties for All…” button in the “Customize Studies & Strategies” window, which is the window that shows the list of strategies being applied to the chart or about to be applied to the chart which opens whenever you add or edit a TradeStation® strategy.
When choosing start and end dates and times, remember that the signal bar is the bar before the bar that shows a trade on the chart. For instance, to exit the long position on the last bar of the chart, the end date and time input parameters should be for the second to last bar.
IMPORTANT: If you don’t exit the trade on a bar and instead hold the position through the end date of the backtest, some of the metrics in the “Strategy Perfomance Report” window will not have useful values. Therefore, to get the most out of using this strategy, set the “End Date” and “End Time” input parameters to be no later than the end date and time of the second to last bar on the chart.
This strategy prints out open, high, low, and close price info for the entry signal bar and the bar after it as well as the exit signal bar and the bar after it, so long as each of the four bars are complete, i.e. not partially built. Therefore if the exit signal bar is the second to last bar on the chart and the last bar on the chart is partially built, open, high, low, and close price info will not be printed for the bar after the exit signal bar since it is not yet complete.
Note that the smallest allowable EasyLanguage® date is 1900-01-01 and the largest allowable EasyLanguage® date is 2150-02-28, which are written like “ELDate(01, 01, 1900)” and “ELDate(02, 28, 2150)” in the input parameters properties grid in TradeStation®’s user interface.
Times are written like HHMM in the input parameters properties grid in TradeStation®’s user interface, where midnight is 0000, noon is 1200, and 11:59 PM is 2359.
Note that a bar’s date and time is its end date and time.
Copyright © 2023 Quagensia, Inc. All rights reserved.
How to Get the Quagensia Strategies
This point-and-click trading strategy is built 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.


