NexusFi: Find Your Edge


Home Menu

 





Custom Bar Type


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one DavidHP with 1 posts (0 thanks)
    2. looks_two mk77ch with 1 posts (0 thanks)
    3. looks_3 gregid with 1 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 3,496 views
    2. thumb_up 0 thanks given
    3. group 3 followers
    1. forum 3 posts
    2. attach_file 1 attachments




 
Search this Thread
  #1 (permalink)
 
mk77ch's Avatar
 mk77ch 
Switzerland
 
Experience: Advanced
Platform: NinjaTrader
Broker: Dorman
Trading: Currency Futures, ES
Posts: 162 since Oct 2010
Thanks Given: 30
Thanks Received: 428

hello,

i am trying to create a new custom renko bar type and need some help.
i know that there are a few available renko bar types but i would like to create a new one to learn how those bar types are created.

to start with the new bar type i extracted the existing ninjatrader renko bar type from @BarsTypes.cs, gave it the PeriodType.Custom9 and made a few smal changes to the code for better readability.

could somebody please explain to me how the AddBar() method works?

the first task would be to add wicks to the renko bars, showing the real high and low. does anybody know how to accomplish this? I tried to replace this:

 
Code
o = renkoHigh - conOffset;
h = Math.Max(renkoHigh - conOffset, renkoHigh);
l = Math.Min(renkoHigh - conOffset, renkoHigh);
c = renkoHigh;
t = time;
v = bar.Volume + volume;

AddBar(bars, o, h, l, c, t, v, isRealtime);
with this:

 
Code
o = renkoHigh - conOffset;
h = high; //Math.Max(renkoHigh - conOffset, renkoHigh);
l = low; //Math.Min(renkoHigh - conOffset, renkoHigh);
c = renkoHigh;
t = time;
v = bar.Volume + volume;

AddBar(bars, o, h, l, c, t, v, isRealtime);
but this changed nothing.

cheers,
mike


Attached Files
Elite Membership required to download: InfinityRenkoBarsType.cs
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
AI for Traders — Agents, Memory, Tools & Real-Worl …
Elite Quantitative GenAI/LLM
My Rant with AMP Futures
Trading Reviews and Vendors
No book, only a stair: journaling fills where price move …
Cryptocurrency
Building a free browser DOM/SMC simulator - need some ad …
Platforms and Indicators
Bitcoin’s 2022 low, 2025 high and 2026 low so far arou …
Cryptocurrency
 
  #3 (permalink)
 
DavidHP's Avatar
 DavidHP 
Isla Mujeres, MX
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Ninjatrader / Optimus Futures / AmpFutures
Trading: NQ / ES / 6E / 6B / CL
Frequency: Every few days
Duration: Minutes
Posts: 1,830 since Aug 2009
Thanks Given: 11,805
Thanks Received: 3,057


Check this:


Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Follow me on X Reply With Quote
  #4 (permalink)
 
gregid's Avatar
 gregid 
Wrocław, Poland
 
Experience: Intermediate
Platform: NinjaTrader, Racket
Trading: Ockham's razor
Posts: 649 since Aug 2009
Thanks Given: 320
Thanks Received: 623

Why don't you look into other renko implementations already available - you can easily find code for UniRenko, BetterRenko, SveRenko and possibly few more that have already implemented wicks. Do a bit of reverse engineering - this will be more efficient than trial and error.


Reply With Quote




Last Updated on April 12, 2015


© 2026 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 - Downloads - Top
no new posts