Many of our daytrading users have expressed a need to allow only one trade per day – they want to enter in the morning and exit in the evening. We think this is a good idea because it reduces the amount of trading you’ll have to do during the day. All you have to do is come up with condition(s) that make a decision in the morning (go long or go short) and if your conditions(s) make the right decision more than 50% of the time you should be able to make money.
We should point out that none of what follows is necessary if you are willing to restrict times for entering and exiting trades, and you are not doing reversals (going long to short and vice versa – this can happen if there are no exit rules.)
For example, suppose your entry conditions (both long and short) include a rule like Time<=10am (where all rules must be true). Suppose further that your exit rules include a rule like Time>10am (again all rules must be true). Then it is not possible for a second entry to occur in the same day. Furthermore, a system like this that restricts based on time will optimize MUCH faster than the more general one we are about to describe.
We’ll tell how how to build such a strategy, but if you become a little confused, don’t worry because you can download an example chart below.
The key to accomplishing this is to add rules to your long entry conditions that specify that a trade can only be entered if the current number of entries that have day are less than 1 (i.e. there haven’t been any so far).
We will be using special data streams that you will find in “Existing Data/Calculations”. They are called “Trading Strategy Long Entry Order” and “Trading Strategy Short Entry order”. In the remainder of this tip they will be abbreviated TSLong and TSShort.
TSLong and TSShort are data streams that are set to 1 when an entry occurs and zero otherwise. Therefore, if we can count all the bars in TSLong for today, we will know how many long entries have occurred so far. Same with TSShort. The Cumulative Sum indicator in the Basic category will do this count for us.
So to create an indicator which shows the number of entries on a given day, insert a Cumulative Sum indicator with the “Don’t calculate across day boundaries” option checked. (MAKE SURE TO CHECK THE “Don’t calculate across day boundaries” option when creating the Cumulative Sum or else this tip will not work. The count has to be restarted every day).
For TOTAL number of trades per day:
CumulativeSum(Add2(TSLong,TSShort),0)
Note that we set the Initial Value of the Cumulative Sum indicator to zero.
Next, if you want to restrict the number of trades per day for a trading strategy, then put an A<B condition in the long entry and short entry conditions as follows:
If you only want to trade once use A<B(CumSum(…),1)
If you only want to trade twice use A<B(CumSum(…),2)
If you only want to trade three times use A<B(CumSum(…),3)
etc…
As an example, to allow only one trade per day (either long or short), you would use the following rule as a condition in both your long entry and short entry conditions IN ADDITION to some rule you’ve already developed to decide whether you should enter or not:
A<B(CumulativeSum(Add2(TSLong,TSShort),0),1)
If you really want to get fancy, you can control longs and shorts independently with these indicator deviations:
For Total Long Trades per day:
CumulativeSum(TSLong),0)
For Total Short Trades per day:
CumulativeSum(TSShort),0)
So if you are a power user who wants to allow only one long entry per day and only two short entries per day, you would simply use the appropriate conditions as shown below:
Long Entry:
A<B(CumulativeSum(TSLong,0),1)
Short Entry:
A<B(CumulativeSum(TSShort,0),2)
Now for the example chart we’ve built. This chart has a trading strategy that decides to go long or short based upon whether the RSI indicator is above or below 50. Also, we’ve added long and short entry rules that specify that no trades can take place before 10:00 am, in order to avoid any artificial early morning manipulation of stock prices (they wouldn’t really do that, would they?).
Hopefully, you will by now have developed better rules or indicators than the RSI. You could replace our RSI rule with your own, even a neural net rule (e.g. net predicting > 2).
The long and short exit rules are simple – get out after 3:30 PM.
Finally, we added the cumulative sum indicators as described above to make sure that no more than one entry occurs per day.
Click here to download our chart, which requires the NeuroShell DayTrader Professional to load.
We’ve also made a custom indicator for you called Onetrade that computes:
A<B(CumulativeSum(Add2(TSLong,TSShort),0),1)
Click here to download Onetrade.zip, which contains Onetrade.tpl, and then store the tpl file in your NeuroShell Template folder. The Onetrade indicator will then be available in the Custom Indicators category the next time you load the Trader.
Note that if you optimize your chart, you have to make sure that you restrict the range of the 0 and 1 parameters of:
A<B(CumulativeSum(Add2(TSLong,TSShort),0),1)
so that the 0 and 1 above do not optimize to something else. I.e., set the 0 to range from 0 to 0, and set the 1 to range from 1 to 1. If you use onetrade.tpl you won’t have to worry about those parameters optimizing since we’ve hidden them.