December 2013 Newsletter- Exiting a Trading Strategy on the Next Bar’s Open in NeuroShell Trader

December 12, 2013

 

Exiting a Trading Strategy on the Next Bar’s Open in NeuroShell Trader
by Dr. Andrei Deviatov, lead developer of ChaosHunter, and Marge Sherald, CEO

A customer asked us how to make a daily Trading Strategy in NeuroShell Trader that enters at the market close and exits on the next bar’s open in order to calculate the profit on overnight trading. Since we have had the same request several times before, we have created an example chart that uses a stop order to exit on the next bar’s open.  Click here to download this chart.  Once you have downloaded the .zip file, click on the file to extract the chart and save it in a folder on your computer.

The Trading Strategy enters a Long by simply using the close as the entry condition. A price stream such as close is always true because there is a close for every bar, and therefore a trade is entered. You could also use open, high, low, or any other true condition.

Note that the order type for the Long Entry is a marketclose (current bar) order, which uses the exact close price of the current bar to calculate profits in our example system that goes from market close to the next day’s open. You can use a marketclose (current bar) order for backtesting purposes ONLY, because you can’t send in any order that will be filled on the exact close. If you want to trade this system in real time you would have to use an entry condition such as a time condition that generates a trading signal 5 minutes before the close, for example. Be sure to include some slippage in your system.

The Long Exit in our example again used a condition that is always true. We used the relational indicator A = B, and and set A to 1 and B to 1. Feel free to substitute any true condition.

We used a stop order for the Long Exit.  For Long positions, a stop order exits if the next bar trades at or below the stop price. The exit price is the stop price (or open price if the bar opens below the stop price) minus slippage. If you set the stop price to a value that is unlikely to be reached, you will get a fill on the open price minus slippage. In this example, we set the stop price at the open plus 20. (You may need to adjust the amount you add to the open if you are trading a security in a more volatile market.)

 The Trader looks at the last known value of the open (which is from the previous day) and adds 20 to that value to create a stop price. When a new bar is formed, if the current open is less than the stop price, a Long Exit is triggered and fills at the open, minus slippage.

With these Long Entry and Long Exit rules, you will be able to calculate the profit on overnight trading.

The Effect of Google Searches on Stock Prices
by Philippe Lonjoux, Noxa Analytics

The following headline grabbed our attention lately and possibly yours:

“An uptick in Google searches on finance terms reliably predicted a fall in stock prices”

Here is our two cents towards explaining why…

Because of our aversion to loss, we spend more time researching a losing trade; there are more efforts being spent collecting information before seeing a market drop.

I want to put things into perspective; just how much juice can we really expect from mining Google and plugging that data into a trading strategy? Actually, the results are pretty impressive. See how the strategy has done on Finance stocks when searching the term “unemployment”:

We put that idea to the test with a strategy that mines Google for the term “unemployment“.  For a description of the strategy, see this article.

One issue…The Unemployment index is not designed with traders in mind. Among other things, the index is rescaled from day to day changing the data by a fraction of a percentage point. Fortunately there are ways around the limitations that we are currently investigating. But we hope that we’ve sparked some ideas for folks interested in exploring “proxying” further in their own trading.

Was this article helpful?

Related Articles