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 03-31-2009, 12:24 AM   #1
duck_CA
Senior Member
 
Join Date: Jan 2008
Location: sacramento CA
Posts: 181
Thanks: 0
Thanked 0 times in 0 posts
Send a message via Yahoo to duck_CA Send a message via Skype™ to duck_CA
Default Sample Label Trim

can I put these 2 forward slashs here to bypass this code and have it work correctly? It seems to work ok but not sure if there may be some problems that I'm not aware of....Thank You

//DrawTextFixed Period", "Period: " + Period + "\nInterval:" + Interval + "\nSmooth:" + Smooth + "\nStdDev: " + NumStdDev, TextPosition.BottomRight);



Code:
protectedoverridevoid OnBarUpdate()
{
/* Print a string at the bottom right showing all the values of our user-definable parameters.
The use of "\n" creates a new line in our output. */
DrawTextFixed("Period", "Period: " + Period + "\nInterval: " + Interval + "\nSmooth: " + Smooth + "\nStdDev: " + NumStdDev, TextPosition.BottomRight);
}
// In order to trim the indicator's label we need to override the ToString() method.
publicoverridestring ToString()
{
/* We return a label consisting of only the parameters we want to include. If we did not
override this method we would have a label with all four parameters. In this example we will
be left with only the parameters "Period" and "Interval". */
return Name + "(" + Period + "," + Interval + ")";
}
duck_CA 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
Indicator label rename tamas Strategy Development 10 03-27-2009 07:59 AM
How Do I remove this label? hanzahar Charting 1 01-02-2009 03:29 AM
Modifying Indicator Label Mike Winfrey Indicator Development 1 09-03-2008 08:07 AM
Removing Label dwalls Charting 4 05-10-2008 02:03 PM
Indicator Label Mike Winfrey Indicator Development 3 01-16-2008 11:13 AM


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