NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > Application Technical Support > Market Analyzer

Market Analyzer Support for the NinjaTrader Market Analyzer.

Reply
 
Thread Tools Display Modes
Old 12-21-2010, 10:58 PM   #1
billitin
Senior Member
 
Join Date: Jun 2008
Posts: 146
Thanks: 0
Thanked 0 times in 0 posts
Default MA rounding numbers

I've noticed that if an indicator outputs a large integer number it gets rounded up in MA (say, 12345678 would be displayed as "12M"). While it's nice for most users, in my case all decimal places are meaningful and I'd like to see a complete number like it was in NT 6.5. Can I adjust this setting somewhere? Thanks!
billitin is offline  
Reply With Quote
Old 12-22-2010, 06:25 AM   #2
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
Default

Hello,

I will check into this with development.

Thanks for your patience.
NinjaTrader_Brett is offline  
Reply With Quote
Old 12-22-2010, 08:48 AM   #3
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
Default

Hello,

Please add this to your code above or below OnBarUpdate()

public override string FormatPriceMarker(double price)
{
return price.ToString();
}

http://www.ninjatrader.com/support/h...ricemarker.htm

Let me know if I can be of further assistance.

NinjaTrader_Brett is offline  
Reply With Quote
Old 12-22-2010, 10:59 AM   #4
murthymsr
Member
 
Join Date: May 2010
Location: India
Posts: 92
Thanks: 1
Thanked 0 times in 0 posts
Default

Hello Brett,
Thanks for the link provided by you, which facilitates selection of number of decimals. I was looking out for this facility for Market Analyser window and got it now.

Now I am able to set Bliinger Band Position (0 to 100% Range) to zero decimals.

I have a two questions on this.

1) I have an indicator using the 'public enum Selector'. I prefer to select a different value for the number of decimals for each enum selectior option. If I put the same code in each of the option with a different value for each enum selector option, I am getting error.

// Original code
// Please add this to your code above or below OnBarUpdate()

// FormatPriceMarker method of a custom indicator
public override string FormatPriceMarker(double price)
{

// Formats price values to 4 decimal places
return price.ToString("N4");
}

Can I write something like:

// Formats price values to 'int variable' decimal places
int decimals;
decimals = 0; // choose the number of decimals for that enum selector option.
return price.ToString("N"+str(decimals);

2) This method can be used for third party Indicators only. Editing of Indicators supplied with NT7 is not possible and making another with each of the supplied / used indicators cannot be done by ordinary users and very difficult for others with coding skills.

Is it not possible to supply each system indicator, where the number of decimals can be chosen by user with the properties?

Thanks for your time & prompt responses as always.

murthymsr
murthymsr is offline  
Reply With Quote
Old 12-22-2010, 12:11 PM   #5
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
Default

Hello,

Yes this should be possible.

Also, I will send this recomendation to development.

Let me know if I can be of further assistance.
NinjaTrader_Brett is offline  
Reply With Quote
Old 12-23-2010, 11:40 PM   #6
billitin
Senior Member
 
Join Date: Jun 2008
Posts: 146
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks Brett, this does show all the digits. As a remark, it's not backwards compatible and breaks the code in NT6.5, but that's small potatoes.
billitin is offline  
Reply With Quote
Old 12-26-2010, 09:20 AM   #7
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
Default

Hello,

Yes this is correct as this is new to NinjaTrader 7 from 6.5 and would be a code breaking change. Glad you got your Ninja7 up and running however.

Let me know if I can be of further assistance.
NinjaTrader_Brett is offline  
Reply With Quote
Old 01-04-2011, 11:14 AM   #8
murthymsr
Member
 
Join Date: May 2010
Location: India
Posts: 92
Thanks: 1
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by NinjaTrader_Brett View Post
Hello,

Yes this should be possible.

Also, I will send this recomendation to development.

Let me know if I can be of further assistance.
hello Brett,

Thanks, it was possible. i have defined a int variable which decides the number of decimals. In each enum selection option, I could have a different number of decimals in MA display.

murthymsr
murthymsr is offline  
Reply With Quote
Old 01-04-2011, 12:01 PM   #9
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
Default

Excellent! Thanks for posting back for others to benefit!
NinjaTrader_Brett 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
Rounding pgabriel General Programming 1 08-05-2010 02:09 PM
Rounding to tick... Sleeping Troll General Programming 7 05-05-2010 09:13 AM
Rounding Up suprsnipes General Programming 2 03-09-2010 08:00 AM
rounding of values anniebee Suggestions And Feedback 4 06-21-2009 12:09 AM
Quick MA an alternative to Juirk MA Ninja B Indicator Development 5 01-09-2009 07:14 AM


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