Garner, NC/USA
Posts: 39 since Dec 2009
Thanks Given: 16
Thanks Received: 42
|
Remember how sometimes you write a strategy, especially an always-in-market (i.e., stop and reverse) strategy, and then when you backtest or try to optimize it, you end up with a whole bunch of trades that entered and exited on the same bar, at the same price, at the same time, chewing up commission costs to no purpose, and messing up your results?
I just posted an example strategy that shows how to ensure that an entry in the market stays in for at least one bar before it can trigger a stoploss. I used the SampleMACrossOver as the basis for the strategy as I wanted to post a working strategy rather than just a shell.
I must state that I do not have much faith in the MovingAverageCrossOver as a trading strategy, so even though when optimized, (as in the picture that accompanies the strategy), it shows a profit, remember that backtesting is different from live trading. That means one needs to think very carefully before turning such a strategy live on a real account. I used it ONLY as a working example, not a strategy to actually trade with.
Here is the link:
|