NexusFi: Find Your Edge


Home Menu

 





How to AddDataSeries for Unirenko Bars for NT 8


Discussion in Platforms and Indicators

Updated
      Top Posters
    1. looks_one WoodyFox with 3 posts (1 thanks)
    2. looks_two sam028 with 2 posts (0 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 KennyK with 1 posts (0 thanks)
    1. trending_up 4,892 views
    2. thumb_up 2 thanks given
    3. group 4 followers
    1. forum 7 posts
    2. attach_file 2 attachments




 
Search this Thread
  #1 (permalink)
 
WoodyFox's Avatar
 WoodyFox 
Columbus, Ohio
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Futures
Posts: 417 since May 2016
Thanks Given: 205
Thanks Received: 890

Anybody know how to code UniRenko bars as DataSeries for an indicator in NinjaTrader 8.

else if (State == State.Configure)
{
AddDataSeries(Data.BarsPeriodType.??????);
}


Attached Thumbnails
Click image for larger version

Name:	UniRenko_as_DataSeries.png
Views:	415
Size:	41.7 KB
ID:	228614  
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Friday Update: Markets Now Pricing Fed Rate HIKES as Sta …
Traders Hideout
Prediction Markets Expiry Day: Trump Eyes War Exit, $230 …
Prediction Markets & Event Contracts
Irans Answer Due Today: Peace Surges to 33.5%, Invasion …
Prediction Markets & Event Contracts
Kalshi Rockets to $22B, Passes Polymarket in Volume -- B …
Prediction Markets & Event Contracts
Q1 2026 Shatters All Derivatives Volume Records -- CME H …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
22 thanks
2026 Jlab journal
10 thanks
Trying to learn Volume and price action correlation
8 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
5 thanks
  #3 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,756 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,632


Maybe in checking the content of the .cs file defining your unirenko bar type, which should be in "My Documents\NinjaTrader 8\bin\Custom\BarsTypes"?


Success requires no deodorant! (Sun Tzu)
Follow me on X Reply With Quote
  #4 (permalink)
 
WoodyFox's Avatar
 WoodyFox 
Columbus, Ohio
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Futures
Posts: 417 since May 2016
Thanks Given: 205
Thanks Received: 890

Thank You, But not sure what I'm looking For?


Attached Thumbnails
Click image for larger version

Name:	UniRenkoBarsType.png
Views:	407
Size:	122.9 KB
ID:	228748  
Started this thread Reply With Quote
  #5 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,756 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,632


WoodyFox View Post
Thank You, But not sure what I'm looking For?

Line 36: BarsPeriodType => 20


Success requires no deodorant! (Sun Tzu)
Follow me on X Reply With Quote
  #6 (permalink)
 
WoodyFox's Avatar
 WoodyFox 
Columbus, Ohio
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Futures
Posts: 417 since May 2016
Thanks Given: 205
Thanks Received: 890

Cool, Thank You!

For those looking to AddDataSeries for UniRenko
Here it is;

else if (State == State.Configure)
{
AddDataSeries(new BarsPeriod() { BarsPeriodType = (BarsPeriodType)20, Value = 5, Value2 = 15 });
}

5 = Tick Trend
15 = Tick Reversal

Trend and Reversal can be set to whatever you need.


Started this thread Reply With Quote
Thanked by:
  #7 (permalink)
 
KennyK's Avatar
 KennyK 
Sunshine Coast Queensland Australia
 
Experience: Intermediate
Platform: Ninja Trader, DT7.
Broker: Ninjatrader
Trading: AUD Futures
Posts: 95 since Apr 2013
Thanks Given: 29
Thanks Received: 24


WoodyFox View Post
Cool, Thank You!

For those looking to AddDataSeries for UniRenko
Here it is;

else if (State == State.Configure)
{
AddDataSeries(new BarsPeriod() { BarsPeriodType = (BarsPeriodType)20, Value = 5, Value2 = 15 });
}

5 = Tick Trend
15 = Tick Reversal

Trend and Reversal can be set to whatever you need.

How would I set the "Offset" Parameter in this code?


Reply With Quote
  #8 (permalink)
 john1 
houston Texas
 
Experience: None
Platform: ninja trader
Trading: forex
Posts: 1 since May 2012
Thanks Given: 0
Thanks Received: 1

else if (State == State.Configure)
{
barsTypeName=BarsPeriod.BarsPeriodTypeName;
wBticksize=BarsPeriod.Value;
wBreverse=BarsPeriod.Value2;
offset=BarsPeriod.BaseBarsPeriodValue;

if(barsTypeName=="BetterRenko(17)")
{
int wBticksize2=wBticksize/2;
int wBticksize3=wBticksize2*2;
int number2=wBticksize2;
int number3=wBticksize3;
AddDataSeries( (BarsPeriodType) 17,number2);
AddDataSeries( (BarsPeriodType) 17,number3);

}

if(barsTypeName=="UniRenkoBarsType(501)")//"UniRenko")//
{
// next levels
// next levels
int wBticksize2=wBticksize*2;
int wBreverse2=wBticksize2*3;
int wBticksize3=wBticksize*4;
int wBreverse3=wBticksize3*3;
AddDataSeries(new BarsPeriod() { BarsPeriodType =(BarsPeriodType) 501, Value =wBticksize2, Value2 =wBreverse2 , BaseBarsPeriodValue=1});
AddDataSeries(new BarsPeriod() { BarsPeriodType =(BarsPeriodType) 501, Value = wBticksize3, Value2 = wBreverse3, BaseBarsPeriodValue=1});



}


Reply With Quote
Thanked by:




Last Updated on May 18, 2017


© 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