NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 10-30-2008, 07:20 AM   #1
Mindset
Senior Member
 
Join Date: Mar 2008
Location: UK West Sussex
Posts: 665
Thanks: 9
Thanked 9 times in 7 posts
Default Back to basics

I get text but the chart scale goes into negative territory and becomes of no use.
Code:
        protected override void OnBarUpdate()
{
if (Historical)
 return;
			
 // Use this method for calculating your indicator values. Assign a value to each
 // plot below by replacing 'Close[0]' with your own formula.
string mystr = High[1].ToString("N2");
string lowstr = Low[1].ToString("N2");
			
DrawText("tag", false,  mystr, 0, High[0] ,Color.Blue,  new Font("Verdana Ref", 9), StringAlignment.Near, Color.Transparent, Color.Transparent, 50);
DrawText("lower", false,  lowstr, 0, Low[0],Color.Red,  new Font("Verdana Ref", 9), StringAlignment.Near, Color.Transparent, Color.Transparent, 50);

			
}
Mindset is offline  
Reply With Quote
 

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
Switching back & forth IB & Zen asalada Installation and Licensing 1 05-27-2008 11:12 PM
back testing mary reed Strategy Analyzer 1 01-13-2008 07:23 PM
P@l Not Going Back To Zero After Close chan123 Miscellaneous Support 1 08-22-2007 11:09 PM
back test latkinso Automated Trading 5 05-18-2007 11:58 AM
Re Back testing John_Aus Miscellaneous Support 6 03-15-2005 01:54 AM


All times are GMT -6. The time now is 06:32 AM.