Avoiding Immediate Re-entry After a Stop

The following question from a user has been asked before, and so we decided to answer it as a tip. This particular user was using a neural net (NN), but others have had the same question about stochastics and other indicators, and the situation is the same. Just substitute “Stochastic” for “NN” in the question and answer below:

Q. I made a NN, then I inserted it in a trading strategy where I go long if NN > threshold. For an exit condition I don’t use NN < threshold, I have stops and other exit conditions that get me out, and they aren't related to the NN. The problem is that usually when the stop or exit condition gets me out, NN is still > threshold so I get right back in again immediately. How can I set things up so I don’t get back in again until first NN falls < threshold and then later NN rises > threshold?

A. Use the indicator called “Crossover Above” in the category called “Crossover & Breakout Identification”. Instead of the entry condition:

A>B(NN,threshold)

use:

CrossoverAbove(NN,threshold)

Then the entry won’t occur until the NN has risen from below to above the threshold. You may have a delay entering the very first trade unless you begin trading when NN is < threshold. However, that may not matter much, especially if you are starting trading as a continuation of a backtest, because the initial trade will have occurred during the backtest.

Was this article helpful?

Related Articles