Skip to content

Tutorial 74 | Introducing a strategy ‘pause’ after sequential losing trades

Tutorial 74 takes the program created in tutorial 71 and explains how, if two sequential losing trades occur, to introduces a pause for a specified number of minutes when the strategy does not take any new trades.

The original strategy, created in tutorial 71, is a simple breakout strategy together with a target, stop and trailing stop. The target and the stop are based on a multiple of the average true range (ATR).

The program works by incrementing a counter each time a losing trade occurs. If a winning or break even trade occurs the counter is reset to zero. Once two sequential losing trades occur the program takes the time of the current bar and adds 120 minutes. This time may be the next day, and the program employs an algorithm to detect this. After this time is elapsed the program is able to enter new trades, provided the other strategy conditions are satisfied.

In the video I show how to use drawing tools to help debug the program. I also show how to make the number of sequential losing trades allowed before the strategy pauses, and the number of minutes the strategy pauses for, into user inputs.

Tutorial 74 showing two sequential losing trades with a 'pause' in the strategy indicated by the red asterisks

You may wish to add a strategy ‘pause’ for a different reason than a number of sequential losing trades and hopefully this tutorial will give you some ideas about how this could be achieved.

Please note that this strategy does not have entry bar protection. This is a subject that I will probably cover in a future tutorial.

If you want to save yourself some typing, you may download the program for $44.95 by clicking the following button:

Gold Pass members are eligible for a 20% discount off this price. The program was written in TradeStation 9.0. If you need it for an earlier version of TradeStation, please let me know.

Tutorial 74 explanatory video

If you want to save yourself some typing, you may download the program for $44.95 by clicking the following button:

Please email me at martyn.whittaker@markplex.com if you spot any bugs or errors.

TO THE BEST OF MARKPLEX CORPORATION’S KNOWLEDGE, ALL OF THE INFORMATION ON THIS PAGE IS CORRECT, AND IT IS PROVIDED IN THE HOPE THAT IT WILL BE USEFUL. HOWEVER, MARKPLEX CORPORATION ASSUMES NO LIABILITY FOR ANY DAMAGES, DIRECT OR OTHERWISE, RESULTING FROM THE USE OF THIS INFORMATION AND/OR PROGRAM(S) DESCRIBED, AND NO WARRANTY IS MADE REGARDING ITS ACCURACY OR COMPLETENESS. USE OF THIS INFORMATION AND/OR PROGRAMS DESCRIBED IS AT YOUR OWN RISK.

ANY EASYLANGUAGE OR POWERLANGUAGE TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS (AND PARTS THEREOF) AND ASSOCIATED TECHNIQUES REFERRED TO, INCLUDED IN OR ATTACHED TO THIS TUTORIAL OR PROGRAM DESCRIPTION ARE EXAMPLES ONLY, AND HAVE BEEN INCLUDED SOLELY FOR EDUCATIONAL PURPOSES. MARKPLEX CORPORATION. DOES NOT RECOMMEND THAT YOU USE ANY SUCH TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS (OR ANY PARTS THEREOF) OR TECHNIQUES. THE USE OF ANY SUCH TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS AND TECHNIQUES DOES NOT GUARANTEE THAT YOU WILL MAKE PROFITS, INCREASE PROFITS, OR MINIMIZE LOSSES.