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.4 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 426,484 views
    2. thumb_up 1,698 thanks given
    3. group 227 followers
    1. forum 695 posts
    2. attach_file 122 attachments




 
Search this Thread

UniRenko, Universal Renko Bar Type

  #681 (permalink)
 jmont1 
New York, NY
 
Experience: Intermediate
Platform: NinjaTrader8
Broker: Data = Rithmic -- Gives 70 Level II Data
Trading: 6C (Low Margin,) 6E, CL, GC, ES and Maybe DX for smaller tick value
Posts: 1,394 since May 2011
Thanks Given: 1,719
Thanks Received: 1,019

Unirenko strategy target and stops cancel when the first bar closes. Is anyone else having this issue? I am running a Strategy Builder strategy but that should mean it knows how to handle these items.

Any assistance would be appreciated.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Futures True Range Report
The Elite Circle
Are there any eval firms that allow you to sink to your …
Traders Hideout
NexusFi Journal Challenge - April 2024
Feedback and Announcements
Deepmoney LLM
Elite Quantitative GenAI/LLM
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
38 thanks
NexusFi site changelog and issues/problem reporting
27 thanks
GFIs1 1 DAX trade per day journal
19 thanks
The Program
18 thanks
  #682 (permalink)
 crazybears 
Alesia E.U.
 
Experience: Intermediate
Platform: Sierra chart
Trading: Futures
Posts: 168 since Feb 2011
Thanks Given: 146
Thanks Received: 115


jmont1 View Post
Unirenko strategy target and stops cancel when the first bar closes. Is anyone else having this issue? I am running a Strategy Builder strategy but that should mean it knows how to handle these items.

Any assistance would be appreciated.

could you post the code ?

Reply With Quote
  #683 (permalink)
 jmont1 
New York, NY
 
Experience: Intermediate
Platform: NinjaTrader8
Broker: Data = Rithmic -- Gives 70 Level II Data
Trading: 6C (Low Margin,) 6E, CL, GC, ES and Maybe DX for smaller tick value
Posts: 1,394 since May 2011
Thanks Given: 1,719
Thanks Received: 1,019



crazybears View Post
could you post the code ?

@crazybears, NT support replied to my post over there. They are looking at the code. I do not think it is my code issue since I suspect it will do it with other strategies as well.

Thanks for reaching out.

Update: NT Support replied confirming there is an issue

Hello,
Just to update you, after further review we were able to recreate the issue with a simplified test script.
We will investigate further and will update you with our findings.
Thanks in advance for your patience while we dig into this further.

Reply With Quote
  #684 (permalink)
 laenxin 
Dallas
 
Experience: Intermediate
Platform: NinjaTrader
Trading: ES, NQ
Posts: 31 since Feb 2014
Thanks Given: 40
Thanks Received: 10

I have examined the UniRenko bars using both the the (earlier created) Sim22 Bar Type indicator from the futures.io NT8 download section, and the Bar Type indicator from the NinjaTrader EcoSystem downloads.

I don’t know if NT used the Sim22 coding to create their indicator, but both have the same problem of failing to print the wick extension on some of the reversal bars.

Using the settings of: Tick Trend = 1, Tick Reversal = 5, on the reversal bar, there should be a one tick extension beyond the prior trend bar. For example, many times, the high of the last up trend bar equals the high of the down reversal bar.

This is a problem if you have an indicator that keys off that print, like the PriceActionSwing indicator, which may also create a problem when creating a strategy using the UniRenko bars.

Is anyone aware of this issue, and a solution?

If the explanation isn’t clear, I would be willing to post a picture if I knew how to. Please direct me to instructions, if that is useful.

Thank you.

Reply With Quote
Thanked by:
  #685 (permalink)
 jmont1 
New York, NY
 
Experience: Intermediate
Platform: NinjaTrader8
Broker: Data = Rithmic -- Gives 70 Level II Data
Trading: 6C (Low Margin,) 6E, CL, GC, ES and Maybe DX for smaller tick value
Posts: 1,394 since May 2011
Thanks Given: 1,719
Thanks Received: 1,019


laenxin View Post
I have examined the UniRenko bars using both the the (earlier created) Sim22 Bar Type indicator from the futures.io NT8 download section, and the Bar Type indicator from the NinjaTrader EcoSystem downloads.

I don’t know if NT used the Sim22 coding to create their indicator, but both have the same problem of failing to print the wick extension on some of the reversal bars.

Using the settings of: Tick Trend = 1, Tick Reversal = 5, on the reversal bar, there should be a one tick extension beyond the prior trend bar. For example, many times, the high of the last up trend bar equals the high of the down reversal bar.

This is a problem if you have an indicator that keys off that print, like the PriceActionSwing indicator, which may also create a problem when creating a strategy using the UniRenko bars.

Is anyone aware of this issue, and a solution?

If the explanation isn’t clear, I would be willing to post a picture if I knew how to. Please direct me to instructions, if that is useful.

Thank you.

@laenxin, Not sure if an image is required for someone else to assist you but to do it:

Select edit on your last post since you may edit up to 24 hrs.

Go Advanced to get to the full edit capability.

Scroll down and select Manage Attachments. Browse to your image file and select upload. Once uploaded it will be listed in the attachments screen. Select Embed so it will show up in post rather than just be a file.

Submit and you should be good. Typically I do not list a reason for the edit but some people do.

Reply With Quote
  #686 (permalink)
Your demo account
Volgograd
 
Posts: 45 since May 2015
Thanks Given: 3
Thanks Received: 11


Attached Thumbnails
Click image for larger version

Name:	ТС.jpg
Views:	490
Size:	248.1 KB
ID:	266677  
Reply With Quote
  #687 (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,102


laenxin View Post
I have examined the UniRenko bars using both the the (earlier created) Sim22 Bar Type indicator from the nexusfi.com NT8 download section, and the Bar Type indicator from the NinjaTrader EcoSystem downloads.

I don’t know if NT used the Sim22 coding to create their indicator, but both have the same problem of failing to print the wick extension on some of the reversal bars.

Using the settings of: Tick Trend = 1, Tick Reversal = 5, on the reversal bar, there should be a one tick extension beyond the prior trend bar. For example, many times, the high of the last up trend bar equals the high of the down reversal bar.

This is a problem if you have an indicator that keys off that print, like the PriceActionSwing indicator, which may also create a problem when creating a strategy using the UniRenko bars.

Is anyone aware of this issue, and a solution?

If the explanation isn’t clear, I would be willing to post a picture if I knew how to. Please direct me to instructions, if that is useful.

Thank you.


UniRenko bars is a difficult story. In my opinion the concept is flawed, although there are a few good points.

(1) Renko bars follow a pretty simple rule. When price exceeds a set price level, one or several new boxes are drawn. Let me take your example with a brick size of 1 tick, and a reversal amount of 5 ticks. Let us further assume that the last bar closed up at 100 ticks. Then we would have a target of 101 for the next up bar (brick size added ) or 95 for the next down bar (reversal size deducted. Now let us assume that the next tick prints at 103. In this case a standard Renko algorithm should insert 3 new bars at once, the third closing at 103. The first and the second bar would be fake bars carrying zero volume, the third bar would carry the volume of the transaction associated with the last tick. At least this is what should happen.

NinjaTrader in-built bars: These bars are terrible. When the set price level is reached, the new tick is used
(a) to redraw the prior bar without changing its price stamp
(b) to open a new bar where the last tick is used as opening price
The problem here is that all NinjaTrader Renko bars have a time stamp one tick earlier than the time stamp that is carried by the tick that closes the bar. Otherwise put there is a mismatch between closing price and time stamp, as the time stamp is taken from the tick prior to the bar close. As a result NinjaTrader in-built Renko bars cannot be used for multi-timeframe scripts with historical data, nor can they used for multi-instrument strategies.
Moreover in our sample scenario NinjaTrader would insert two fake bars with zero volume. Therefore you should not use NinjaTrader in-built Renko bars to calculate any indicator values, as indicators are calculated from prices at which the instrument never traded.

UniRenko bars: These bars are also terrible. For no specific reason the bars are only closed when the set price level is exceeded by at least 1 tick. As a result a new brick may not plot at all when the target price is reached. I accept that this is a different design that deviates from the original idea of Renko bars, and consider it as a delayed renko. As a side note the delayed Renko bar carries the timestamp of the tick following the bar close of the renko bar. As a result UniRenko bars will only generate delayed signals for multi-timeframe or multi-instrument strategies. Synchronization will not work on historical data.

If you take in-built Renkos and UniRenko together it is like a Punch and Judy show. The in-built renko carries a timestamp of one tick prior to the closing tick (which requires a time warp) while the UniRenko bar carries a timestamp of one tick after the closing tick. Non of this is a good solution. Best use renko bars where bar close and timestamp match, i.e. where the closing tick carries the same timestamp as the bar.

Now this is not the whole story. Conventional renko bars such as the in-built renko bars use a while ... do loop to insert several Renko bars at once as needed in our little scenario described above. UniRenko bars cannot insert several bars at once, but at best a single renko bar. Due to this restriction the one tick delay may even increase to several ticks.

(2) Why UniRenko bars show false prices and false volume:

As described above the UniRenko up bar is only closed, when the target high has been exceeded by at least one tick. When this tick is detected, the prior bar is closed. But here comes the catch. When closing the prior renko bar

- the bar will close at the Renko target level regardless whether a transaction took place at this price or not
- the volume of the new tick is added to the prior bar renko bar and the new renko bar counting it twice
- the time stamp of the new tick is transferred to the prior bar which does not make sense, if the prior bar already had reached the renko target price

As a result

- some Renko bars will close at a fake price
- the volume of all ticks closing renko bars is counted twice for old an new bar
- you will not see any zero volume bar, even if no transaction took place within the renko range

Hence UniRenko bars carry false volume, and cumulated volume of a trading session is systematically exaggerated such that UniRenko bars should not be used with volume indicators.

While the volume of the closing tick is counted twice, the price of this tick is not considered at all. Everytime that the closing tick is not followed by another tick with the same price such that price reverses, the price of this tick drops out and is not shown on the chart. Therefore the wicks of UniRenko bars may not show the real highs and lows, but will miss all highs and lows for which only a single transaction took place.

(3) Another interesting feature of common Renko bars is the fake open. The code for the UniRenko bar even declares the variable as "fakeOpen". The fake open is a false price needed to please the trader when using the bars. Unfortunately, NinjaTrader uses the fake open for simulating backtests, such that all backtests carried out on UniRenko bars become totally unusable. The performance of trend following strategies is considerably overestimated, while the performance of counter trend strategies deteriorates significantly. There is a workaround used to get around this problem by using an honest bar and adding a chart style for entertainment of the trader. This approach results in backtestable bars that are disguised for looking better. The BetterRenko bar is an example (although it also has bugs).

I think it is a waste of time to go into details any further ....


Here is the short version of the story:

- UniRenko bars are dynamic renko bars that allow for selecting the ratio brick size : reversal size
- UniRenko bars carry false time stamps delayed by 1 tick and thus create delayed signals
- UniRenko bars should not be used with MTF or multi-instrument scripts
- UniRenko bars cannot detect single tick highs and lows
- UniRenko bars carry false volume as the volume of many ticks is double counted
- UniRenko bar insert fake bars with false volume (as opposed to fake bars with zero volume for standard renko bars)
- UniRenko bars use a fake open making it completely useless for backtests

Summary: Open of all reversal bars is false. Highs and lows may be false. Closes may be fake. Volume of all bars is definitely false. The time stamps are delayed by 1 tick. Cannot be used for backtests.

But you may even do worse. Just combine UniRenko with HeikinAshi. Both are fake bars, and combining two of them into a single graphical representation will definitely help to deplete your account much faster.

Nota: I am referring to the UniRenko bars as posted per this link after release of NT8b9: . I do understand that this contribution has been made free of charge and also has its merits. However, it is not easy to correct the issues, as false highs and lows and false volumes are necessary to comply with mutliple delays caused by the missing loop. It would be easier to rebuild a renko bar than to correct the UniRenko bars. As an alternative I would suggest BetterRenko as can be downloaded here: . I haven't tested it in detail, but it does come with an orderly timestamp and allows for running backtests.

Reply With Quote
  #688 (permalink)
 
TraderTS's Avatar
 TraderTS 
Texas, USA
 
Experience: Advanced
Platform: NinjaTrader 8
Broker: AMP Futures w/ CQG Data Feed
Trading: ES+MES+TechStocks as of 2022 Previous: ES GC CL [4MES2ES as of 2019MAY] and [4MGC2GC as of 2021JAN]
Posts: 454 since Jul 2014
Thanks Given: 281
Thanks Received: 389

@Fat Tails
Wow, WTG for answering!
Furthermore... no wonder your "Favorite Futures: Keyboard".

P.S.
Glad that I no longer use UniRenko chart... many years ago.


Find the missing piece of the puzzle... Let's be amazing, be awesome in trading today!
iTS
Visit my NexusFi Trade Journal Reply With Quote
  #689 (permalink)
 
Blash's Avatar
 Blash 
Chicago, IL
Legendary Market Chamois
 
Experience: None
Platform: NT8,NT7,TWS
Broker: InteractiveBrokers, S5T, IQFeed
Trading: The one I'm creating in the present....Index Futures mini/micro, ZF
Posts: 2,311 since Nov 2011
Thanks Given: 7,341
Thanks Received: 4,518

I have Shark Indicators BacktestRenko bars called SiBacktestRenko and I like them. They are a bit pricey but you get what you pay for.

I would recommend them to anyone that wants to use Renko type bars. They render the true trades.


These three charts are CL from friday June 14 2019 from RTH open to about 2 hrs and 50 min in.

Brick size 2, New Trending Bar 20, Reversal size 2 backtest on


Brick size 5, New Trending Bar 1, Reversal size 11 backtest off


Brick size 5, New Trending Bar 1, Reversal size 11 backtest on


Ron

...My calamity is My providence, outwardly it is fire and vengeance, but inwardly it is light and mercy...
The steed of this Valley is pain; and if there be no pain this journey will never end.
Buy Low And Sell High (read left to right or right to left....lol)
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #690 (permalink)
 NGtrader 
Burnaby, BC Canada
 
Experience: Advanced
Platform: Ninjatrader
Broker: Ironbeam, Kinetick
Trading: ES, CL, RTY
Posts: 233 since Apr 2014
Thanks Given: 758
Thanks Received: 201


My partner and I have been working on an automated trading strategy coming up to 2 years now. I will confirm what Fat Tails has said regarding Unirenko, Better Renko and the renko bars that come installed with NT. They are all horrible. They provide overly optimistic (fake) backtest results that don't hold up in walk forward testing, market replay or in the live market when we have run live SIM.

Have also tried RJay's live renko bars and while these were fine for market replay, did not do so well with strategy analyzer. I second what Blash said about SI Backtest Renko bars. The backtest results plus walkforward and live testing results have all been consistent and reliable. Yes they are a bit pricey but one licence can be used on two computers and these bars will pay for themselves in a short amount of time.

Follow me on Twitter Reply With Quote
Thanked by:




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