I've entered the Example #3 Three Bar Breakout Trading System and when tested, each trade is being immediately taken out by the stops on the same entry bar. The code is:
Strategy.doLong("",Strategy.CLOSE,Strategy.THISBAR ,Strategy.DEFAULT,0)
Strategy.setStop(low())
The idea is to go long at the Closing Price of the current bar and to set the stop to the low of the current bar -- to execute only if the stop is hit in future bars.
For this and other strategies, the choice to doLong depends on other indicators (other than price) which vary within a bar. The idea is to test those values AT THE CLOSE ONLY. Is this the issue, and if so, how can that be specified??
What's going on?? Thanks.
Strategy.doLong("",Strategy.CLOSE,Strategy.THISBAR ,Strategy.DEFAULT,0)
Strategy.setStop(low())
The idea is to go long at the Closing Price of the current bar and to set the stop to the low of the current bar -- to execute only if the stop is hit in future bars.
For this and other strategies, the choice to doLong depends on other indicators (other than price) which vary within a bar. The idea is to test those values AT THE CLOSE ONLY. Is this the issue, and if so, how can that be specified??
What's going on?? Thanks.
Comment