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




 
 

UniRenko, Universal Renko Bar Type

 
 
MWinfrey's Avatar
 MWinfrey 
Lubbock TX
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Stage 5 Trading
Trading: CL
Posts: 1,878 since Jul 2009
Thanks Given: 1,450
Thanks Received: 3,335


profits View Post
Hi, MWinfrey, here is my Initialize() method

protected override void Initialize()
{
CalculateOnBarClose = false;
Add(PeriodType.Minute, 1); //(BarsArray[1]
Add(PeriodType.Minute, 5); //(BarsArray[2]
Add(PeriodType.Minute, 10); //(BarsArray[3]
// Add(PeriodType.Custom5, 004008002); // compiles OK but give run-time error
// AddRenko(PeriodType.Custom5, 004008002); // compile error: No overload for method 'AddRenko' takes '2' arguments
}

I copy and pasted your Add(PeriodType.Custom5, 004008002); into one of my strategies and it compiled without error. So, there must be something outside of the initialize method causing this error. So, without having your code I can't really go any further. I think your error said something about slope. do you calculate slope somewhere in your code?

Thanked by:

Can you help answer these questions
from other members on NexusFi?
Deepmoney LLM
Elite Quantitative GenAI/LLM
Futures True Range Report
The Elite Circle
Are there any eval firms that allow you to sink to your …
Traders Hideout
ZombieSqueeze
Platforms and Indicators
Exit Strategy
NinjaTrader
 
 
 
profits's Avatar
 profits 
Toronto
 
Experience: Intermediate
Platform: NinjaTrader
Trading: financial futures
Posts: 29 since Mar 2013
Thanks Given: 79
Thanks Received: 40

As I said the Add() statement COMPILES OK but gives run time error:

**NT** Failed to call method 'Initialize' for strategy 'RangeChartSlopes/6b7d4915312c43ab884f55c1706c5d1a': Please use the alternate method 'AddRenko()' instead of Add()

Thanked by:
 
 
MWinfrey's Avatar
 MWinfrey 
Lubbock TX
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Stage 5 Trading
Trading: CL
Posts: 1,878 since Jul 2009
Thanks Given: 1,450
Thanks Received: 3,335



profits View Post
As I said the Add() statement COMPILES OK but gives run time error:

**NT** Failed to call method 'Initialize' for strategy 'RangeChartSlopes/6b7d4915312c43ab884f55c1706c5d1a': Please use the alternate method 'AddRenko()' instead of Add()

DuH! It would help if I would remember and comprehend what I read...

I'll try to run it in a few minutes and let you know. Trying to get things in order before the market opens.

Thanked by:
 
 
MrYou's Avatar
 MrYou 
NC, USA
 
Experience: None
Platform: None Yet
Trading: Guitar
Posts: 403 since Jun 2011
Thanks Given: 618
Thanks Received: 196

As MWinfrey mentioned this is incorrect:

 
Code
AddRenko(PeriodType.Custom5, 004008002);
This is correct:

 
Code
Add(PeriodType.Custom5, 004008002);

 
 
profits's Avatar
 profits 
Toronto
 
Experience: Intermediate
Platform: NinjaTrader
Trading: financial futures
Posts: 29 since Mar 2013
Thanks Given: 79
Thanks Received: 40


MrYou View Post
As MWinfrey mentioned this is incorrect:

 
Code
AddRenko(PeriodType.Custom5, 004008002);
This is correct:

 
Code
Add(PeriodType.Custom5, 004008002);


this statement:

Add(PeriodType.Custom5, 004008002);

gives a run-time error:

**NT** Failed to call method 'Initialize' for strategy 'RangeChartSlopes/6b7d4915312c43ab884f55c1706c5d1a': Please use the alternate method 'AddRenko()' instead of Add()

“Everything is hard before it is easy”
~ Johann Wolfgang von Goethe
 
 
MrYou's Avatar
 MrYou 
NC, USA
 
Experience: None
Platform: None Yet
Trading: Guitar
Posts: 403 since Jun 2011
Thanks Given: 618
Thanks Received: 196


profits View Post
this statement:

Add(PeriodType.Custom5, 004008002);

gives a run-time error:

**NT** Failed to call method 'Initialize' for strategy 'RangeChartSlopes/6b7d4915312c43ab884f55c1706c5d1a': Please use the alternate method 'AddRenko()' instead of Add()

Are you sure that error isn't referencing a different strategy vs the one you are editing?

I also add, make sure you don't have other (imported) bar types that may be using Custom5. Check your imported bar types source code.

Thanked by:
 
 
profits's Avatar
 profits 
Toronto
 
Experience: Intermediate
Platform: NinjaTrader
Trading: financial futures
Posts: 29 since Mar 2013
Thanks Given: 79
Thanks Received: 40

I have now made a new, very stupid-simple strategy just to try the Add() statement. It does nothing more than paint a diamond when two MA's cross. Then, I inserted the Add(PeriodType.Custom5, 004008002); It compiled and it ran! So from this I can only deduce that the problem lies with my original strategy which is more complex using 4 time frames. It is important to note that the original strategy executed just fine before I added the 'Custom5'. Now I need to painfully strip away and comment out small layers of code until I find what broke it. If there is a faster way, I don't know about it since I am not that experienced. Thank you all who made suggestions.

The bottom line is that the Add(PeriodType.Custom5, 004008002); statement is the correct one.

“Everything is hard before it is easy”
~ Johann Wolfgang von Goethe
Thanked by:
 
 decs0057 
Munich, Germany
 
Experience: Intermediate
Platform: NinjaTrader, TWS
Broker: IB, NinjaTrader Brokerage
Trading: ES,NQ,6E
Posts: 71 since Feb 2010
Thanks Given: 15
Thanks Received: 25

I found following thread in NT support
Select/Add renko/custom time frame to strategy - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

 
 
Tasker_182's Avatar
 Tasker_182 
Cedar Rapids, iowa
Legendary Market Wizard
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Ninjatrader - Continuum
Posts: 716 since Aug 2009
Thanks Given: 476
Thanks Received: 1,401

Hi all,

@monpere has given us a great tool to use with the Unirenko bars. It has changed my view and sometimes that is what one needs in their trading.

That said, i am still very frustrated with the occasional problems as mentioned by @HighDesertTrader, @MWinfrey and confirmed by @perryg and @superpete.

The problem for me mostly shows up in market replay when the charts just won't load. Occasionally the same occurs when connecting to the live market. I can see the processors grinding away like mad for quite some time and eventually, if I'm lucky, the charts will show up, with literally 1000's of tic marks. I've also seen where the opening session bar has been one huge bar. So I suspect the problem to be with the way the bartype is handling the first bar of session. I've looked at the code but it is beyond my current skill level. Not sure if it makes a difference but I am using CQG data and looking at TF, 6E, 6J typically. My charts are all in the 2 - 5 days of data. The Unirenko settings I'm using are: T1R19010, T1R11O5 and T1R7O3.

So as you might suspect I am sitting here waiting for the charts to load, still not loaded and i am slow typist!

I've gone through deleting workspaces and rebuilding them. I've tried deleting the database itself. I've tried deleting replay data and redownloading but have yet to find a consistent way to work around the problem. So it would be nice if the problem could be fixed to begin with. I'd be willing to participate in a test if it would help.

Thanked by:
 
 
Raj1's Avatar
 Raj1 
Toronto
 
Experience: Beginner
Platform: Ninja Trader
Broker: AMP FUTURES/ZENFIRE
Trading: YM
Posts: 130 since Jul 2009
Thanks Given: 253
Thanks Received: 58


@monpre:

As I am not a elite member, can you upload this indicator in the Ninja forum please.
Thanks in advance.
Raj

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