NexusFi: Find Your Edge


Home Menu

 





UniRenko, Universal Renko Bar Type


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one MWinfrey with 27 posts (120 thanks)
    2. looks_two Tasker_182 with 27 posts (83 thanks)
    3. looks_3 jmcg618 with 21 posts (2 thanks)
    4. looks_4 Big Mike with 20 posts (54 thanks)
      Best Posters
    1. looks_one monpere with 33.5 thanks per post
    2. looks_two dstrader with 8 thanks per post
    3. looks_3 MWinfrey with 4.4 thanks per post
    4. looks_4 Tasker_182 with 3.1 thanks per post
    1. trending_up 431,284 views
    2. thumb_up 1,699 thanks given
    3. group 227 followers
    1. forum 695 posts
    2. attach_file 122 attachments




 
Search this Thread

UniRenko, Universal Renko Bar Type

  #571 (permalink)
bottakemoney
Pflugerville, texas
 
Posts: 7 since Jun 2013
Thanks Given: 0
Thanks Received: 6

for the life of me, I dont see how to download these unirenko charts? can someone send a link?

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
MC PL editor upgrade
MultiCharts
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
How to apply profiles
Traders Hideout
REcommedations for programming help
Sierra Chart
 
  #572 (permalink)
 
xplorer's Avatar
 xplorer 
London UK
Site Moderator
 
Experience: Beginner
Platform: CQG
Broker: S5
Trading: Futures
Posts: 5,976 since Sep 2015
Thanks Given: 15,501
Thanks Received: 15,402


bottakemoney View Post
for the life of me, I dont see how to download these unirenko charts? can someone send a link?

https://nexusfi.com/local_links_search.php?action=show&sort=&search=unirenko&literal=1&desc=1&keys=1&pp=5&page=2

There's 2 pages in this link where you'll find a few Unirenko downloads.

Reply With Quote
Thanked by:
  #573 (permalink)
 
DavidHP's Avatar
 DavidHP 
Isla Mujeres, MX
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Ninjatrader / Optimus Futures / AmpFutures
Trading: ES / 6E / 6B / CL
Frequency: Every few days
Duration: Minutes
Posts: 1,612 since Aug 2009
Thanks Given: 11,341
Thanks Received: 2,746



cunparis View Post
I was playing around with this bar type and i noticed that when I put a strategy on a chart and look at the historical performance, the orders are not filled at the same prices as when running realtime (or market replay). In my strategy I have calculate on bar close true. In realtime, the market order is sent on the bar close price. In historical, it's sent on the bar open price. If the open setting is, for example, 3, then it can send the market order at a price that is 3 ticks better. This gives a 3 tick edge in the strategy performance but realtime it's 0.

I didn't see this mentioned in the thread, so I'm curious if others have seen this, and if there is a way to work around this? Like using a secondary bar period of 1 tick or something?

Good to see you again.

Don't take my word for it but I believe Renko bars do not always contain 'real' trades.
The bars could be called Faux Bars.

If I use Renko I use Better Renko but my preferred bar type is Point-O by Richard

Here is a link and the post from Fat Tails about Renko bars. I think this verifies what I said:



Fat Tails View Post
@Nowshad: Consider Renko bars as an indicator. Renko bars do not show real prices.


Some properties of Renko bars:

-> when price continues to move in the prior direction the open of a Renko bar is close to where the first tick actually plotted
-> when price reverses direction compared to the prior bar, the open of a Renko bar is far away from the first tick that plotted because the reversal is not shown on the chart
-> in most cases a Renko bar will not show the correct high
-> in most cases a Renko bar will not show the correct low
-> only the close of a Renko bar will always be near the last tick of the time period covered by that Renko bar

Implications:

-> you cannot apply any indicators to Renko bars that use open, high or low as input
-> for example an indicator that shows daily high and low values will always show false values
-> a Fibonacci indicator will always use false swing highs and swing lows
-> you cannot do a proper backtest with Renko bars, because the strategy typically enters a position at the open, and the open shown by the Renko bar is false


Displaying real open, high, low and close of a Renko bar:

If you wish to display the real open, high and low of each Renko bar, this is pretty easy. @aslan has done the work for you and coded a bar type, which is called BetterRenko. Make sure that you install the BetterBrick chart style along with the bar type. With Better Renko you will be able

-> to show the real open, high, low and close that was made during the bar period
-> to apply indicators that use open, high or low as input
-> to apply an indicator that shows correct daily high and low values
-> to apply a Fibonacci indicator which will use correct swing highs and low
-> do proper backtesting


.


Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Follow me on Twitter Reply With Quote
Thanked by:
  #574 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


cunparis View Post
I was playing around with this bar type and i noticed that when I put a strategy on a chart and look at the historical performance, the orders are not filled at the same prices as when running realtime (or market replay). In my strategy I have calculate on bar close true. In realtime, the market order is sent on the bar close price. In historical, it's sent on the bar open price. If the open setting is, for example, 3, then it can send the market order at a price that is 3 ticks better. This gives a 3 tick edge in the strategy performance but realtime it's 0.

I didn't see this mentioned in the thread, so I'm curious if others have seen this, and if there is a way to work around this? Like using a secondary bar period of 1 tick or something?


This is true for most of the Renko bars. Standard Renko bars do not show the real open, and typically they do not show the real high or low.

The problem with Renko bars is that esthetics seems to me more important than truth. The same applies to Heikin-Ashi bars. The opening price of a Renko bar is a synthetic construct that has nothing to do with the first tick that printed when that bar started. Even worse the opening price of a classic Renko bar may jump up and down depending on whether the new Renko bar prints above or below the prior bar.

In order to get a useful bartype you need to print the real first tick, which is the price of the first transaction after the close of the prior Renko bar. Then you would also need to add the upper and lower shadows to include price changes that were too small to be printed as a new Renko bar.

The result of this exercise is the Better Renko bar. The bar size is no longer uniform, but all prices shown are real and can be used for backtesting. The Better Renko bars are shown in the chart attached.


Simple conclusion

UniRenko bars and most other Renko bars are just imaginative fabric, consider them as pretty liars.

BetterRenko bars show the genuine open, high, low and close of the time period that they cover.

All the pretty liars cannot be backtested, any backtest is just garbage in, garbage out.

BetterRenko bars are backtestable and you will get proper results.



Reply With Quote
  #575 (permalink)
 
cunparis's Avatar
 cunparis 
Paris, France
 
Experience: Advanced
Platform: Market Delta & Ninjatrader
Trading: ES
Posts: 2,565 since Jun 2009
Thanks Given: 1,162
Thanks Received: 2,093

I updated my strategy to submit all market orders on a second bar series with a period of 1 tick. I'm on NT7. This fixed most of the discrepancy between historical & market replay. I compared 1 day's executions, which I admit isn't much, and I got deltas:

entry delta exit delta
0.01 0
0 0
0 0
0.01 -0.01
0.01 0
0.02 -0.01
0 0.03
0 0
0 0.04


0.05 0.05

total delta 0.1
avg delta 0.011111111


so now I can plug 1 tick into the strategy slippage parameter and get results similar to market replay.

I tried better renko and got similar results, so it seems executing market orders on the 1 tick bar series did fix the issue.

Thanks for the feedback everyone.

Follow me on Twitter Reply With Quote
Thanked by:
  #576 (permalink)
 
Mabi's Avatar
 Mabi 
sweden
 
Experience: Advanced
Platform: NinjaTrader,MetaTrader
Trading: futures, FX
Posts: 141 since Oct 2010
Thanks Given: 121
Thanks Received: 136


cunparis View Post
I updated my strategy to submit all market orders on a second bar series with a period of 1 tick. I'm on NT7. This fixed most of the discrepancy between historical & market replay. I compared 1 day's executions, which I admit isn't much, and I got deltas:

entry delta exit delta
0.01 0
0 0
0 0
0.01 -0.01
0.01 0
0.02 -0.01
0 0.03
0 0
0 0.04


0.05 0.05

total delta 0.1
avg delta 0.011111111


so now I can plug 1 tick into the strategy slippage parameter and get results similar to market replay.

I tried better renko and got similar results, so it seems executing market orders on the 1 tick bar series did fix the issue.

Thanks for the feedback everyone.

I had this old code as well for NT7. This post made me dig it up !

This is how i add code to use 1 peroid range bars for back testing.

1. Add this code to Initialize
protected override void Initialize()
{
Add(PeriodType.Range,1);
}

2. Add this code to OnBarUpdate
protected override void OnBarUpdate()
{
if (BarsInProgress !=0)
return;
}



3. Add code for BarsSinceEntry(0,"",0)





You will now get back test quality on 1 period range bars, faster than 1 period tick ! , as long as you have tick data in the Ninja database.

Reply With Quote
  #577 (permalink)
 
cunparis's Avatar
 cunparis 
Paris, France
 
Experience: Advanced
Platform: Market Delta & Ninjatrader
Trading: ES
Posts: 2,565 since Jun 2009
Thanks Given: 1,162
Thanks Received: 2,093


Mabi View Post
You will now get back test quality on 1 period range bars, faster than 1 period tick ! , as long as you have tick data in the Ninja database.

The problem I see with range bar is that you won't get that bar until it closes which will be 1 tick away from the prior close.

With the tick bar, you get the close of the 1 tick bar immediately (the next tick) and there is a chance that the next tick could be at the same price.

Maybe with renko bars the next tick is gauranteed to be at a different price or else the renko bar wouldn't have closed?

Follow me on Twitter Reply With Quote
Thanked by:
  #578 (permalink)
trader15
Vadodara/Gujarat
 
Posts: 6 since Nov 2017
Thanks Given: 3
Thanks Received: 4


monpere View Post
In this thread, I am posting my Universal Renko bar type implementation. I have been using it exclusively in my trading for a while now, and have had many requests for it. I wanted a more flexible Renko bar that could be customized in a particular way to fit my trading style, so I decided to make a bar type that allows the user to configure it more liberally to better suit their particular needs.

Basically the UniRenko bar, allows the user to choose when the bar closes in the direction of the previous bar (Trend), and when it closes in the direction against the previous bar (Reversal). So, you may choose for a new bar to form when the price has moved 5 ticks up from the previous close, or 10 ticks down from the previous close.
This allows you to tailor the bar in ways that hopefully may enhance your particular trading style. For instance, I am a reversal trader, entering on reversal bars, and putting my stop behind the entry bar. So, I have tested and chosen trend and reversal settings that minimize the size of reversal bars, and therefore minimize my stop loss sizes, while still producing clean sharp indicator patterns my trading method is based on.

Like most of the other advanced Renko bar types, the UniRenko bar open is artificial, so I consider it aesthetic only, and I do not use it in the bar size calculation. The bar calculations are based on the previous bar close. I personally like to place the open half way up the previous bar as I like the way the bars look with that setting. The tails on the bar show real prices. The bar should be backtestable if stops/targets are placed outside of the bar.

Because all the parameters are user selectable, and no aspect of the bar is derived from an arithmetic calculation, there should be no restriction on any bar parameter having to be odd or even, etc. Internally uses NT PeriodType.Custom5

I have hesitated to post this bar type before, as it can be configured to mimic some commercially available Renko bar types. I purchased some of those commercial bars myself, but they did not fully meet my needs. The purpose of this implementation is to provide traders with more flexibility, that hopefully with some experimentation may ultimately enhance their trading like it did mine.

futures.io (formerly BMT) Download link:

Hi, does this work with NT8 and 1min data (OHLCV) ?

Reply With Quote
  #579 (permalink)
 bob314159 
boulder, colorado
 
Experience: Advanced
Platform: TradeStation
Trading: emini's
Posts: 56 since Jun 2010
Thanks Given: 3
Thanks Received: 63

Where is the link?

Reply With Quote
  #580 (permalink)
 
DavidHP's Avatar
 DavidHP 
Isla Mujeres, MX
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Ninjatrader / Optimus Futures / AmpFutures
Trading: ES / 6E / 6B / CL
Frequency: Every few days
Duration: Minutes
Posts: 1,612 since Aug 2009
Thanks Given: 11,341
Thanks Received: 2,746



bob314159 View Post
Where is the link?


See post #1 in this thread

Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Follow me on Twitter Reply With Quote




Last Updated on April 3, 2023


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts