You have to add a second dataseries, like 1 range, and execute orders on it.
A quick way to see how much this impacts you is to sort the trade performance results by # of bars. All exits on bar #1 should be assumed to be stops, not winners.
Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.
Need help? 1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first. 2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses. 3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make. 4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance. 5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers. 6) Help using the forum? Watch this video to learn general tips on using the site.
If you want to support our community, become an Elite Member.
In addition, the way you can overcome OHLC disparities is to drop to smaller bars altogether or to increase the P/L amounts to the point where the OHLC becomes less significant.
If your P/L is much larger than your ATR for a 180 bar, then the odds of it entering and exiting on the same bar are much less.
It would be interesting for someone to do a study to determine the rate of outliers for OHLC on different bar lengths. Particularly with respect to candle length, wick length, overall range, etc, etc.
I find it's much more rare for a bar inversion on a 60 minute bar than say a 5 minute bar during high traffic.
Generally speaking, a "red" bar (close < open) tends to OHLC, whereas a "green" bar (close > open) tends to OLHC, but as Mike pointed out, not always.
I'm wondering if the exceptions are MORE for lesser bars, it's just that you don't notice it as much because the P/L is larger than the typical range for the bars. I see a lot more "flip flops" with 5 minute bars than I do with a 60 minute bar (assuming the bars have relatively "average" range.). Obviously for smaller range bars, much more is possible during the given time period.
From this site, I was under the impression that Ninja was able to execute tick/tick backtesting which would eliminate the OHLC issue.
Don't know what kind of entry (market/limit) do you use in this strategy but the most common issue is that ppl set the stop according the entry they get (based on pips, ticks or dollars at risk) and you never know it on realtime. You must use a stop/target based on the previous close bar  if you're using a market order entry or ask/bid limit order. At least, this way you'll get the same exact exit on each trade (stop/target hit) but you'll never know the exact entry in market orders or you can lose opportunities on limit orders (you'll only notice this comparing real vs backtesting). The same is true if you trail based on dollar amount or ticks/pips.
Forget this advise if you set both with technical info (past day low, sma, etc). Just own experience.
* Not native english, any correction is well appreciated.
Technically, a backtest has a degree of inaccuracy regardless of your entry/exit criteria.
If you're trading market orders, the backtest cannot account for adverse market effects, which become increasingly more for larger orders.
If you're trading limit orders, the backtest must assume a total fill. You can set the backtest to only fill the order when price has moved beyond the limit price, however, again, this is an assumption and does not account for adverse effects (the amount of resistance/support your order created).
Regardless of how you enter or exit the trades, a backtest cannot anticipate adverse market effects. Depending on your entry side and the type of strategy, these effects can have varying degrees.
For example, if you have a "top side" entry strategy and use limit orders, the backtest might assume a sellshort fill, once the price exceeded your limit price by 1 tick, negating the concept that your limit may not have been filled totally if it had actually been in the marketplace.
Using the same example with a market order creates dififculties, as the engine won't consider the market order executed until it observes an equal number of contracts in the proper direction (which does not account for the adverse effects those shares/contracts would have had in providing momentum in that direction.)
The following 2 users say Thank You to RM99 for this post:
I totally agree with you but I'm talking about another issue. If you use market orders "on last bar close" strategies and you want it to have the same stop/entry in backtesting (and the same trail if you say "if goes X pips move to break even") you must use the information you have on the chart and not ticks/pips/dollars because your entry. This way, at least when comparing real trades and backtest trades (the same trades) you'll see that you had had the same stops and targets -real vs backtest- (don't matter if you had a fill on your target. You used exactly what your strategy is supposed to use), btw it depends a lot of each strategy and I assume that scalping strategies don't use market orders but limit orders. Aaand It can kill you a lot of profits or put you on a large stop situation if the market is moving a lot.
I totally agree... If you use limit orders, you'll lose entries even if the price went beyond your order, even more if you trade multiple contracts.
I agree too that the number of contracts you're trading can move the market against you.
And I totally totally agree with ThatManFromTexas:
At least, if you believe in your strategy and want to trade it you must understand it and play according to it, that's why I never use automated trades but I trade manually what my strategies say, using the exact same price to say OK, this is not doing what I was expecting for, and the same price to say OK, this is where I expected it to go. This way, I know where these points are at the present time (while on a trade) and I know that these points will be the same in backtesting (backtesting the same trade in the future).
Can be very frustrating to refresh your chart, or backtest the day you traded for real and see that for just 2 pips (don't matter which way +2 or -2, think about it) you had your stop or your target in a different place. Again, if you believe on it and use market orders, you must use chart info for your stop, target and trails (if any), by the other hand if you use limit orders expect to loose some entries. This is only valid for good risk/reward ratio trades where you backtested with market orders.
* I use limit orders for my real trades.
Don't get me wrong, my backtesting is highly correlated with my actual results BUT not my entries, sometimes slippage, sometimes I even have a better entry.
I think that you will never get the same results but you can play with it if you understand the strategy in your mind (you can explain it in simple words or even your grandmother can get it ).
Expect the worst case scenario per trade, if your backtesting don't even work when you include slippage and commissions on it, don't expect it to work.
In plain words, expect:
- Real market is moving and sometimes is really fast.
- Price can go beyond your stop.
- Use commissions. - In order for you to buy a contract, somebody has to sell a contract to you.
* I think I wrote far beyond my english skills allow to me, sorry if any mistakes. Any correction will be highly appreciated.
The following user says Thank You to BCNTrader for this post: