NinjaTrader Support Forum  

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

Market Analyzer Support for the NinjaTrader Market Analyzer.

Reply
 
Thread Tools Display Modes
Old 01-28-2012, 04:49 AM   #1
Stopped
Senior Member
 
Join Date: Jun 2010
Location: London, U.K.
Posts: 174
Thanks: 29
Thanked 1 time in 1 post
Default Column Format

Hello,

Please see attached snapshot.

How can I change the format of the highlighted column from doubles to integers?

Thank you,

Stopped
Attached Images
File Type: jpg Days Ago Column.JPG (68.8 KB, 15 views)
Stopped is offline  
Reply With Quote
Old 01-28-2012, 12:16 PM   #2
NinjaTrader_AdamP
NinjaTrader Customer Service
 
NinjaTrader_AdamP's Avatar
 
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 376 times in 366 posts
Default

Stopped,

I am happy to assist you.

How are you defining "Days Ago"? Is this a custom indicator?

Please let me know if I may assist further.
NinjaTrader_AdamP is offline  
Reply With Quote
Old 01-28-2012, 06:15 PM   #3
Stopped
Senior Member
 
Join Date: Jun 2010
Location: London, U.K.
Posts: 174
Thanks: 29
Thanked 1 time in 1 post
Default

Hi AdamP,

Thanks for your help.

Yes, it is a DataSeries from one of my custom indicators. It looks as if Market Analyzer uses the same number format as the one that is applied to the price of the instrument. Ideally, I would like to transform those numbers to integers, as they are easier to read.

Let me know if you need more details.

Stopped
Stopped is offline  
Reply With Quote
Old 01-29-2012, 12:55 AM   #4
sledge
Senior Member
 
Join Date: Aug 2010
Location: Washington, D.C.
Posts: 1,668
Thanks: 314
Thanked 448 times in 386 posts
Default

Quote:
Originally Posted by Stopped View Post
Hi AdamP,

Thanks for your help.

Yes, it is a DataSeries from one of my custom indicators. It looks as if Market Analyzer uses the same number format as the one that is applied to the price of the instrument. Ideally, I would like to transform those numbers to integers, as they are easier to read.

Let me know if you need more details.

Stopped
Math.Round??
sledge is offline  
Reply With Quote
The following user says thank you to sledge for this post:
Old 01-29-2012, 04:04 AM   #5
Stopped
Senior Member
 
Join Date: Jun 2010
Location: London, U.K.
Posts: 174
Thanks: 29
Thanked 1 time in 1 post
Default

Hi sledge,

Thank you for your contribution.

I have changed the code in my custom indicator, using the Math.Round method that you suggested, but still do not get the results in Market Analyzer:

// Momentum

bool downArrow = false;
bool upArrow = false;

if (ndConfirmed || (momentum[1] >= 0 && (pdReversed || lPrice[0] < sLine[1])))
{
momentum.Set(-
1);
momSince.Set(Math.Round((
double) 1, 0));
downArrow =
true;
}
elseif (pdConfirmed || (momentum[1] <= 0 && (ndReversed || hPrice[0] > rLine[1])))
{
momentum.Set(
1);
momSince.Set(Math.Round((
double) 1, 0));
upArrow =
true;
}
else
{
momentum.Set(momentum[
1]);
momSince.Set(Math.Round(momSince[
1] + 1, 0));
}

Any more ideas from you, AdamP or anyone else? Perhaps I am using the Math.Round method in the wrong place of the code?

Thanks in advance,

Stopped
Stopped is offline  
Reply With Quote
Old 01-29-2012, 04:41 AM   #6
Stopped
Senior Member
 
Join Date: Jun 2010
Location: London, U.K.
Posts: 174
Thanks: 29
Thanked 1 time in 1 post
Default

Hello again,

I just found a way around to solve this problem by creating a new custom indicator (myDaysAgo) which basically calls my original custom indicator containing the momSince dataseries and then transforms its 'price' format using the FormatPriceMarker() method.

Is there, however, a simple, more elegant way to achieve this same results??

I felt I had to resort to creating a new indicator because the original one had several plots, whose number formats I did not want to modify.

Thanks in advance,

Stopped
Attached Images
File Type: jpg Days Ago.JPG (22.0 KB, 12 views)
Last edited by Stopped; 01-29-2012 at 04:54 AM.
Stopped 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
Transfering data from Multicharts data format to Ninja Trader data format alex_inditraders General Programming 7 03-01-2012 04:20 AM
need help creating new column mikesmen40 Market Analyzer 1 03-01-2011 09:40 PM
% change column badasan Market Analyzer 4 11-14-2009 08:47 PM
Converting eSignal OnDemand output file format to NT historical data input format AnotherTrader Connecting 0 09-15-2009 07:21 AM
Comments Column cipher4d Market Analyzer 1 08-02-2008 11:43 AM


All times are GMT -6. The time now is 08:28 PM.