NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 02-11-2010, 11:18 AM   #1
kaywai
Senior Member
 
Join Date: Sep 2009
Posts: 562
Thanks: 40
Thanked 5 times in 4 posts
Default DrawText

Hi,

I'm trying to have text drawn when certain conditions are fulfilled. I've managed to get "1" printed (as shown in the attached chart but can't get "2" printed. There were also no errors in the log. Would you mind helping? I've enclosed the code as well.

Thanks!

Kay Wai
Attached Images
File Type: jpg NIA 02-10 11_27_2009 (3 Min).jpg (44.4 KB, 17 views)
Attached Files
File Type: zip mytds1.zip (1.9 KB, 6 views)
kaywai is offline  
Reply With Quote
Old 02-11-2010, 11:40 AM   #2
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Hello Kaywai,

One thing it might be is the DrawText field for the objects "tag" is not unique for drawing 1 and 2.

Try changing this line to:
Code:
 
DrawText("BS2" + CurrentBar, "2", 0, (Low[0]-TickSize), Color.Green);
NinjaTrader_RyanM is offline  
Reply With Quote
Old 02-11-2010, 11:42 AM   #3
kaywai
Senior Member
 
Join Date: Sep 2009
Posts: 562
Thanks: 40
Thanked 5 times in 4 posts
Default

Hi Ryan,

Tried it. the '2' still won't appear...
kaywai is offline  
Reply With Quote
Old 02-11-2010, 11:55 AM   #4
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Hi kaywai,

You probably need to look at your logic to see if it's working as expected. Try adding print statements to check the value of _boolThereIsNoBullishFlip

Code:
Print(_boolThereIsNoBullishFlip);
NinjaTrader_RyanM is offline  
Reply With Quote
Old 02-11-2010, 12:13 PM   #5
kaywai
Senior Member
 
Join Date: Sep 2009
Posts: 562
Thanks: 40
Thanked 5 times in 4 posts
Default

Thanks for the guidance Ryan
kaywai is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DrawText tradinginzen General Programming 8 04-22-2009 01:32 PM
DrawText rcotrade Indicator Development 6 03-24-2009 03:51 PM
DrawText etc Lost Trader Indicator Development 4 01-18-2009 10:09 AM
Drawtext spenbm01 Miscellaneous Support 3 06-06-2008 11:23 PM
DrawText Mike Winfrey General Programming 1 12-21-2007 04:57 PM


All times are GMT -6. The time now is 04:43 AM.