NexusFi: Find Your Edge


Home Menu

 





Custom Bar Type


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one gregid with 1 posts (0 thanks)
    2. looks_two Quick Summary with 1 posts (0 thanks)
    3. looks_3 DavidHP with 1 posts (0 thanks)
    4. looks_4 mk77ch with 1 posts (0 thanks)
    1. trending_up 3,127 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: 423

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?
Five Days Until the Gap Dies -- CME Goes 24/7 on All Dig …
Traders Hideout
OneChronos Launches First Combinatorial Auction FX Venue …
Currencies
Kharg Island at 6%, Regime Fall at 1.5% -- The Black Swa …
Prediction Markets & Event Contracts
Hormuz Normalization Collapses to 19.5% -- Iran Regime F …
Prediction Markets & Event Contracts
Kalshi Sets $4.13B All-Time Weekly Record as Polymarket …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
8 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #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,802 since Aug 2009
Thanks Given: 11,742
Thanks Received: 3,018


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