Short Strategy Template (Complete – Many Params, Flexible Money Mgmnt, Order Qty, and Plot Transparency) (TradeStation® 9.5 Only) (Point-and-Click TradeStation® Strategy)
Original Trading Strategy
Peer Reviews, Modifications & Responses
Thanks for Sharing!
Trading Strategy Summary
This is the short strategy template for users with a valid paid license that you can make a copy of and make changes to in order to create your own strategy without having to start from scratch with an entirely new, empty Quagensia T Edition Strategy.
You can easily customize its short entry criteria and short exit criteria without code, and use the following pre-built strategy logic as-is:
1. The strategy’s custom exit criteria can be turned on or off by setting the “Use Exit Criteria? (1=Yes, 0=No)” input parameter to 1 to indicate True or 0 (or any number other than 1) to indicate False by entering the number 1 or 0 in its textbox in the TradeStation® user interface. Since TradeStation® allows you to optimize a strategy over a range of numeric values for each of its numeric input parameters, including every combination of 0 and 1 for all of your strategy’s Whole Number input parameters that represent a Boolean (True or False) value, this allows you to optimize your strategy based on the inclusion or exclusion of an exit based on custom exit criteria.
2. The strategy has a profit target and your choice of protective stop (stop loss or trailing stop) built-in, and the profit target and protective stop can be turned on and off independently of each other by setting the “Use Stop Loss? (1=Yes, 0=No)” and “Use Profit Target? (1=Yes, 0=No)” input parameters to 1 to indicate True or 0 (or any number other than 1) to indicate False by entering the number 1 or 0 in their respective textboxes in the TradeStation® user interface. For the reason described in point 1 above, this allows you to optimize your strategy based on the inclusion or exclusion of a stop loss and/or profit target.
3. Unlike the free versions of this strategy (denoted by the suffix “Free”), this strategy allows you to use either a stop loss or a trailing stop, and you can choose which type of protective stop to use by setting the value of the “Stop Type (0=StopLoss, 1=TrailStop)” input parameter to 0 or 1 in the TradeStation® user interface. Since TradeStation® allows you to optimize a strategy over numeric input parameters, this allows you to optimize this strategy based on the type of protective stop used. This strategy also allows you to turn off the protective stop altogether, which allows you to optimize it over the inclusion or exclusion of either a stop loss or trailing stop.
4. Unlike the free versions of this strategy, the optimizable input parameters of this strategy’s profit target, stop loss, and trailing stop, named “Profit Target Amount”, “Stop Loss Amount”, and “Trailing Stop Amount”, have corresponding input parameters (“Stop Amt (0.08 is 8% if Units is Pct)” and “Profit Target Amt (0.08 is 8% if Units is Pct)”) defined in its “Input Parameters” section that can be changed and optimized over from the TradeStation® user interface.
5. Unlike the free versions of this strategy, this strategy allows you to specify the units to use in the calculations of the stop price of the stop loss and trailing stop and the profit target’s price using the “Stop Units (0=Ticks,1=Pct, 2=Dollars/Share)” and “Profit Target Units (0=Ticks,1=Pct, 2=Dollars/Share)” input parameters. For the reason described in point 1 above, this allows you to optimize your strategy based on the units used to calculate the stop price of the stop loss and trailing stop and the profit target’s price.
6. Unlike the free versions of this strategy, all the indicator plot styling fields of both the Fast Moving Average and the Slow Moving Average of this strategy have corresponding input parameters defined in its “Input Parameters” section that can be changed from the TradeStation® user interface. This includes input parameters that allow you to set the plot’s color, the “Transparency Value” (0=100% opaque, 254=100% transparent) of the plot’s color, the plot’s “Plot Style” (solid or dots), and the plot’s line width.
7. Unlike the free versions of this strategy, the plots of both the Fast Moving Average and the Slow Moving Average of this strategy can be hidden or shown independently of each other by entering the word “True” or “False” in textboxes in the TradeStation® user interface.
8. Unlike the free versions of this strategy, the “Length” input parameter of the Fast Moving Average and the Slow Moving Average of this strategy can be changed and optimized over in the TradeStation® user interface.
9. Unlike the free versions of this strategy, the order quantity of the entry orders submitted by this strategy can be changed in the TradeStation® user interface.
10. The strategy prints information to the EasyLanguage® Print Log and draws a pink or light blue vertical line on the chart when custom entry or exit criteria are True.
After you use the built-in short strategy templates as starting points for your own short strategies for a bit, we recommend that you create your own short strategy templates to be more ideal for your specific needs than this strategy template is. You can start with a copy of this strategy template and add in your proprietary logic that is common to many of your short strategies to create the perfect short strategy templates for you, save them to your “My Algos” folder, and make copies of your own proprietary strategy templates as highly customized starting points for your short strategies. You may also wish to remove all the “Comment in Code” textboxes that contain commentary meant mainly for new users once you’ve learned the information so you won’t have to keep scrolling past them.
IMPORTANT: This strategy is meant to be used in TradeStation® 9.5, not TradeStation® 10.0 and above, because it creates semi-transparent indicator plots using the Quagensia T Edition Function named “Create a Partially or Fully Transparent Color (TradeStation® 9.5 Only)” instead of the Quagensia T Edition Function named “Create a Partially or Fully Transparent Color (TradeStation® 10.0 Only)”. These two Quagensia T Edition Functions use the “Reserved Word” built into TradeStation® called ARGB() to create a color with transparency. The meaning of the first parameter of ARGB was changed between TradeStation® 9.5 and TradeStation® 10.0. In TradeStation® 9.5, the first parameter of ARGB represents the “Transparency”, where a higher number means more transparent and less opaque. In TradeStation® 10.0, the first parameter of ARGB represents the “Alpha”, where a higher number means more opaque and less transparent. Note that to use this strategy, you will need to select one of the versions of TradeStation® 9.5 from the drop-down list titled “Version of TradeStation® In Which This Code Will Be Used”. This drop-down list is located in the Code Generation Tab near the bottom of Quagensia T Edition’s main window.
Copyright © 2024 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.

