NexusFi: Find Your Edge


Home Menu

 





DrawText() Problem when converting NT6.5 to NT7


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one qzhang119 with 3 posts (0 thanks)
    2. looks_two Fat Tails with 2 posts (2 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 bukkan with 1 posts (1 thanks)
    1. trending_up 1,815 views
    2. thumb_up 3 thanks given
    3. group 3 followers
    1. forum 6 posts
    2. attach_file 1 attachments




 
Search this Thread

DrawText() Problem when converting NT6.5 to NT7

  #1 (permalink)
 qzhang119 
HC, NJ
 
Experience: Beginner
Platform: NinjaTrader
Trading: Forex
Posts: 9 since Aug 2012
Thanks Given: 5
Thanks Received: 0

Hi All,

I am currently converting an indicator from NT6.5 into NT7, after compile I changed DrawText() in the program, successfully compiled.( Add intypixeloffset as 0)

But there is nothing displayed in the panel.

So, I checked the Log, found that:

[COLOR="rgb(154, 205, 50)"]9/22/2012 5:57:08 PM Default Failed to call method 'Initialize' for indicator 'GbDivergence2': 'BarsInProgress' property can't be accessed from within 'Initialize' method[/COLOR]

Is that means there are other errors should be changed in the 'Initialize' and 'BarsInProgress'?

Thanks.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Quant vue
Trading Reviews and Vendors
Better Renko Gaps
The Elite Circle
REcommedations for programming help
Sierra Chart
ZombieSqueeze
Platforms and Indicators
MC PL editor upgrade
MultiCharts
 
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103



qzhang119 View Post
Hi All,

I am currently converting an indicator from NT6.5 into NT7, after compile I changed DrawText() in the program, successfully compiled.( Add intypixeloffset as 0)

But there is nothing displayed in the panel.

So, I checked the Log, found that:

[COLOR="rgb(154, 205, 50)"]9/22/2012 5:57:08 PM Default Failed to call method 'Initialize' for indicator 'GbDivergence2': 'BarsInProgress' property can't be accessed from within 'Initialize' method[/COLOR]

Is that means there are other errors should be changed in the 'Initialize' and 'BarsInProgress'?

Thanks.


There is a thread dedicated to converting indicators from NT 6.5 to NT 7.0



Best you post the indicator there, and somebody will make it fit for NT 7.0.

To solve your problem you would probably need to transfer some of the code from the Initalize() section to OnStartUp() or OnBarUpdate(). It should not take more than a few minutes.

Reply With Quote
Thanked by:
  #4 (permalink)
 qzhang119 
HC, NJ
 
Experience: Beginner
Platform: NinjaTrader
Trading: Forex
Posts: 9 since Aug 2012
Thanks Given: 5
Thanks Received: 0

Hi fat tail,

I follows your instructions, tried to put some codes from Initialize into OnBarUpdate(), but nothing changed.

Could you please take a look at the indicator?

Thank you for your help.

-Q

Attached Files
Elite Membership required to download: GbDivergence.zip
Started this thread Reply With Quote
  #5 (permalink)
 bukkan 
Calcutta, India
 
Experience: Intermediate
Platform: ArthaChitra
Posts: 278 since Jun 2009
Thanks Given: 161
Thanks Received: 271

The err is coming from this line of code in the initialize section of the code

 
Code
period = Bars.Period.Value.ToString();

Reply With Quote
Thanked by:
  #6 (permalink)
 qzhang119 
HC, NJ
 
Experience: Beginner
Platform: NinjaTrader
Trading: Forex
Posts: 9 since Aug 2012
Thanks Given: 5
Thanks Received: 0

Thank you, bukkan.

It works now. How do you find that part is the point? Did you use "Print" function? or Is there any knowledge I should obtained? I just want to learn more about troubleshooting.

Thanks again.

Regards,

-Q

Started this thread Reply With Quote
  #7 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103

I have responded in the other thread.

If you want to know where the problem lies you should consult the NinjaTrader log (see Control Center) or the log and trace files (Documents -> NinjaTrader 7 -> log and Documents -> NinjaTrader 7 -> trace)

Reply With Quote
Thanked by:




Last Updated on September 23, 2012


© 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