Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
MA rounding numbers
Collapse
X
-
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!Tags: None
-
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.
Comment
-
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
Comment
-
Originally posted by NinjaTrader_Brett View PostHello,
Yes this should be possible.
Also, I will send this recomendation to development.
Let me know if I can be of further assistance.
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
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by johnMoss, 03-04-2024, 01:53 PM
|
3 responses
46 views
0 likes
|
Last Post
by AndyM
Today, 06:13 PM
|
||
Started by algospoke, Today, 06:01 PM
|
0 responses
6 views
0 likes
|
Last Post
by algospoke
Today, 06:01 PM
|
||
Started by cre8able, Today, 05:53 PM
|
0 responses
8 views
0 likes
|
Last Post
by cre8able
Today, 05:53 PM
|
||
Started by Wessel, 03-23-2024, 02:37 PM
|
3 responses
23 views
0 likes
|
Last Post Today, 04:58 PM | ||
Started by martini, Yesterday, 04:45 PM
|
4 responses
32 views
0 likes
|
Last Post
by martini
Today, 04:48 PM
|
Comment