Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
All renko incarnations (NT Renko, MedianRenko, SBSRenko, WickedRenko) are unreliable for backtesting due to few issues. One of these issues is redrawing the "open" of the bar after the bar has formed.
In order to avoid the complications of the redraw:
Tip
Refrain from using Market Orders for backtesting purposes and replace all MARKET orders with LIMIT orders with LimitPrice = Close[0]
(this will simulate standard behaviour of market orders for CalculateOnBarClose = true)
I have read other threads about why backtesting on renko is not a good idea, but I thought the code above should function as close to reality as possible, since it make decisions only when the bar closes.
Could you give me a little more detailed explanation about why it won't?
I can't vouch for it but I believe it makes a difference. Please see the attached image and guess which chart uses Market orders and which uses Limit orders (everything else is the same in the simple strategy).
I highlighted just one fragment where you could see it straight away
There is differences in the charts you show, that's sure, and does it make sense ?
Limit orders are limit orders, so:
- you can't be sure they will be filled, so some additional logic is needed in the strategy itself:
-> the limit order is sent, but is it filled ?
-> if it's filled, at which price, so what are the consequences for the target/stop ?
-> if it's not filled x minutes/ticks/bar, what do to ? Cancel the order, change the limit price, ... ?
So the backtests results may look more accurate, but that doesn't mean you can have accurate results (or results similar to the backtests) when the strategy runs live.
The good test, imvho, is to run such strategy with a live feed, and see how it looks after few days, and then compared the live resulsts with the backtests results. And before this, add the MM parts described below, needed by limit orders.
Sam, I agree with 100% of what you wrote, but I think you are arguing against something I never claimed… but maybe I didn’t make it clear initially.
My original point was (and still is) “for backtesting purposes”. I never said I recommend using limit orders in live strategies as like with every type of order there are some pros and cons of every one of them and the decision which one to use should be made taking into consideration all possible ramifications (and you pointed out very well what would have to be considered for using Limit Orders while trading live)
So to rephrase and specify my initial point:
The way that market orders work for historical trades (and backtesting) is the order is placed at the Open of new bar. But because the Open of a new bar for renko bars is redrawn – the final Open is drawn only after the Close of the new bar is known, my proposed solution is to use Close[0] instead of Open[NewBar] for entry (when historical or backtesting).
In order to achieve it I suggest simulating MarketOrders with LimitOrders as in the post #1.
Few notes:
* The original NT6.5 SbSRenko (with long bars on reversal) doesn’t need this solution as the Open[NewBar]=Close[0] (I haven’t checked this yet – just an assumption)
* The suggested solution doesn’t take into consideration the slippage. If you decide to include slippage in your strategy, you would probably need to amend the limitprice to something like:
And to recap: You don’t need to do simulate MarketOrders in live strategy – it is helpful only for historical trades and bactesting!!!
And: No backtest is comparable to live feed test!!!
You can't do the slippage like that, in my opinion. Instead, use the NT menu itself and input at least 1 tick of slippage for the limit order.
The problem is, NT doesn't handle limit orders very well (in my experience). Just be sure you do a lot of 'live' trading (on sim) with the strategy. Trade it 'live' for a day or two, then go back and run a backtest for identical period. Do the results match, or are there "unexplainable" differences. That will be your sign
It wasn't my intention to add slippage this way, but to show how one would have to amend LimitOrder to simulate MarketOrder once the slippage is added (from NT menu or in the code in Initialize section).
I will write it again:
It is only about simulating MarketOrder for backtesting purposes
[sigh].... I feel like I will spend the rest of the day explaining what I wrote