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 john1 with 1 posts (1 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 5,074 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: 206
Thanks Received: 891

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:	427
Size:	41.7 KB
ID:	228614  
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Weekend Update: First Qatari LNG Transit Attempted -- IR …
Traders Hideout
Strike Pause Holds, Oil Erases Monday Spike -- May CPI W …
Traders Hideout
Fed Hike Odds at 57% After Warsh: England Surges 12.9%, …
Prediction Markets & Event Contracts
Four New E-mini Futures Launch June 29 -- Russell 3000, …
Emini and Emicro Index
The May 31 Binary: 60% Trump Declares Iran Ops Over, Onl …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
8 thanks
Darmok and Jalad at Tanagra
1 thanks
  #3 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,758 since Jun 2009
Thanks Given: 3,828
Thanks Received: 4,644


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)
Reply With Quote
  #4 (permalink)
 
WoodyFox's Avatar
 WoodyFox 
Columbus, Ohio
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Futures
Posts: 417 since May 2016
Thanks Given: 206
Thanks Received: 891

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


Attached Thumbnails
Click image for larger version

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


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

Line 36: BarsPeriodType => 20


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

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