MedianRenko close/open - NinjaTrader Programming | futures io social day trading
futures io futures trading


MedianRenko close/open
Updated: Views / Replies:3,306 / 14
Created: by hawks67 Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

MedianRenko close/open

  #1 (permalink)
Elite Member
Chicago, IL
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: AGN/Rithmic
Favorite Futures: CL
 
Posts: 22 since Apr 2010
Thanks: 14 given, 1 received

MedianRenko close/open

Once again, I begin this plea for help by saying that if there already is an answer for this somewhere in these forums, I've been unable to find it.

Every strategy I've ever written has been applied to either a tick or a minute chart. These strategies calculate various things at the close of the current bar and enter trades at the open of the next bar (market order at the open). Bar 0 closes at 1080.00, the strategy calculates stuff and decides to execute a trade, the next bar opens at 1079.75, the strategy goes short at 1079.75.

Doesn't seem to work with MedianRenko4.

If the current MedianRenko4 bar closes at 1080.00 and the next one opens at, say, 1079.50, I'm getting filled at 1080.00. I want the fill to occur at the open of the next bar, not the close of the current one (this is not just normal slippage). This was never an issue until I started messing with MedianRenko bars.

When I apply the strategy forward and backward, 100% of the historical fills have been exactly where I've wanted them (at the open of the new bar), but 100% of the fills going forward (live) are at the close of the just-closed bar. Why would this be?

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,218 received


Moved to NinjaTrader Programming.

You cannot backtest any Renko chart, or any Line Break, PnF chart, etc, using NinjaTrader and have it be the only dataseries and have it be accurate. Even the built-in Renko in NT7 is not accurate in backtests.

You will need to use a second dataseries and place all orders via that second dataseries. It should be a 1 range or 1 tick dataseries for best results. That pretty much means NT 6.5 is out because it will crash due to the memory consumption.

Mike

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.

Reply With Quote
The following 2 users say Thank You to Big Mike for this post:
 
  #4 (permalink)
Elite Member
Chicago, IL
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: AGN/Rithmic
Favorite Futures: CL
 
Posts: 22 since Apr 2010
Thanks: 14 given, 1 received

Thank you sincerely, Mike.

I apologize for really sounding green here, but while I have previously added secondary dataseries to strategies in order to add further depth to my calculations, I have not even heard of submitting orders through them. Is there an example you can point me to that illustrates this?

And, since I do eventually want to know what I'm talking about, can you help me understand why this is happening like this? Why does a MedianRenko bar open at X price, but a market order submitted at that open is consistently getting filled at the close of the previous (just-closed) bar? (I know slippage will happen, but this is not slippage...) What aspect of MedianRenko bars am I not understanding here?

Reply With Quote
 
  #5 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,218 received

A market order is submitted at the Open price of a bar, which is 'false' or whatever word you want to use with MedianRenko bars. That is the why. Even if you try limit orders based on the Close, you still run into problems (new ones) because of all the problems with NT's handling of limit orders in a backtest, specifically NT doesn't know the OHLC order of a bar and it makes terrible assumptions (the opposite is true of MultiCharts, for example), so it requires some more work to use Limit orders, too.

You can read the Hurley thread, a lot of details, tons of backtesting, etc. Hundreds of posts about MedianRenko and backtesting.

As for as how to write your strategy, I am sorry but I don't do NT programming any longer. Adding a second DataSeries to a strategy and then properly submitting orders to it is not an entry-level task. You can ask for help here, it will help if you share your strategy so someone has something to "gain" from the time it will take to convert your strategy to a multi-dataseries one.

I don't want to burst your bubble, but what it really truly comes down to is this --- if you want my opinion: if your strategy can't make money on time based bars or tick, volume, or regular range bars, then it is not worth the time effort and/or money to try to make it work on medianrenko. The backtest results look stellar, it's about impossible to make a strategy look bad with medianrenko, but its all fake. Just run it live and you'll see (I think you've got this far already).

Mike

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.

Reply With Quote
The following 2 users say Thank You to Big Mike for this post:
 
  #6 (permalink)
Elite Member
Madison, WI
 
Futures Experience: Advanced
Platform: Sierra Charts, ALT
Favorite Futures: ES
 
aslan's Avatar
 
Posts: 614 since Jan 2010
Thanks: 342 given, 1,077 received

Renkos have a fundamental problem in that the "open" of the next bar is not known until the next bar closes.

The algorithm for building a renko bar typically starts accumulating ticks for a new bar, and then sets the open when the brick size is met. If the direction of the brick is the opposite of the previous brick, then the open is changed. The NT bar building algorithm makes this problematic at best, because they do not make it easy to actually change the open.

Renkos have another MAJOR issue, in that some implementations do not track the "wick" data (high and low data outside of the brick). I am not familiar with MedianRenko, but NT native Renko is horrible. I tried to fix this in "WickedRenko" bars which are in the download area, but they still suffer from the open price changing when the bar closes.

Backtesting with Renko is just a bad idea unless you really know what you are doing. Generally, I use renko bars for visual only cues, as I like the way they remove the noise, but would never set up a strategy on them.

Reply With Quote
The following 4 users say Thank You to aslan for this post:
 
  #7 (permalink)
Elite Member
Chicago, IL
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: AGN/Rithmic
Favorite Futures: CL
 
Posts: 22 since Apr 2010
Thanks: 14 given, 1 received

Excellent info, thanks to both of you. I shall now resume my regularly-scheduled MedianRenko-free programming.

Reply With Quote
 
  #8 (permalink)
Elite Member
Chicago, IL
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: AGN/Rithmic
Favorite Futures: CL
 
Posts: 22 since Apr 2010
Thanks: 14 given, 1 received

Also on Range bars?

Here I thought I was out of the woods...

My initial problem (see above) was that with a MedianRenko chart, my fills were out of whack due to some incorrect assumptions about closes and opens. That has since been explained (thanks again).

But I'm finding that I'm getting exactly the same problem with Range bars. On my Range6 chart, as I understand it, each bar grows until it is six ticks in size, at which point the next bar opens either one tick above the high of the just-closed bar or one tick below the low. My code calculates things, and if all is copacetic, it issues a market order, which, I assume (incorrectly?), is supposed to be executed at the open of the next bar, since these calculations only occur OnBarClose.

So I have been watching carefully, and when a Range6 bar closes at 1060.00 and the next one opens at 1060.25, I'm getting filled at 1060.00. Every time. Can someone tell me why this would be?

[my order-entry code is just this: SE_EntryOrder = EnterShort(0, pEntry_Qty, "SE"); ]

Reply With Quote
 
  #9 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,218 received

I always add 1 tick slippage for market orders in backtests to get around that issue.

Mike

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.

Reply With Quote
 
  #10 (permalink)
Elite Member
Madison, WI
 
Futures Experience: Advanced
Platform: Sierra Charts, ALT
Favorite Futures: ES
 
aslan's Avatar
 
Posts: 614 since Jan 2010
Thanks: 342 given, 1,077 received


OnBarClose may actually be OnBarOpen for certain bar types. For example, for a range bar you need the first tick of the next bar to know that you should close the current bar.

Another strangeness of range bars is the "phantom" bars that get inserted when there is a gap. In backtesting, you could be filled at non-existent prices (the phantom bars usually have volume of 1 or zero the way NT builds the bars).

Finally, a market order could get filled anywhere, but in backtest/sim, it will be filled at the current bid/ask (there may be ways to control this in NT, but don't recall). So on an uptick, your sell market will likely be at open minus a tick.

Reply With Quote
The following user says Thank You to aslan for this post:

Reply



futures io > > > > > MedianRenko close/open

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Daily open and close values rounder8 Beginners and Introductions 5 February 9th, 2016 12:46 PM
SMA with options for close, open, medium or typical Barrosco NinjaTrader 3 April 26th, 2011 05:21 PM
Is it possible to achieve BOX: HIGH + LOW + OPEN + CLOSE/actual price ? inmax NinjaTrader 6 December 30th, 2010 03:07 PM
Volitility indicator question - Open - Open / open - close / close to open andresimon NinjaTrader 2 September 27th, 2010 01:33 AM
Ninja Trader BUG Open[0] and Close[0] Warren B. NinjaTrader Programming 17 December 16th, 2009 06:12 PM


All times are GMT -4. The time now is 06:38 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-12 in 0.15 seconds with 19 queries on phoenix via your IP 54.145.51.250