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 2,363 views
    2. thumb_up 3 thanks given
    3. group 3 followers
    1. forum 6 posts
    2. attach_file 1 attachments




 
Search this Thread
  #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?
Wood Mackenzie Drops $200 Oil Forecast -- Airspace Expir …
Prediction Markets & Event Contracts
Peace Deal Forward Curve: May 22%, June 51%, December 81 …
Prediction Markets & Event Contracts
Iran Airspace Contract Surges to 33.5% as Project Freedo …
Prediction Markets & Event Contracts
$500M Riding on World Cup 2026: France/Spain Co-Favored …
Prediction Markets & Event Contracts
S&P 500 Holds the Line: No Fast Track for SpaceX, Op …
Stocks and ETFs
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
10 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 thanks
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,117



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
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,117

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


© 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