Go Back   NinjaTrader Support Forum > NinjaTrader 7 > Platform Technical Support

Platform Technical Support General platform technical support for NinjaTrader 7.

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: 176
Thanks: 30
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, 16 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 387 times in 375 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: 176
Thanks: 30
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: 3,889
Thanks: 1,429
Thanked 956 times in 823 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: 176
Thanks: 30
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: 176
Thanks: 30
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, 14 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 Development 7 03-01-2012 04:20 AM
need help creating new column mikesmen40 Platform Technical Support 1 03-01-2011 09:40 PM
% change column badasan Platform Technical Support 4 11-14-2009 08:47 PM
Converting eSignal OnDemand output file format to NT historical data input format AnotherTrader Platform Technical Support 0 09-15-2009 07:21 AM
Comments Column cipher4d Platform Technical Support 1 08-02-2008 11:43 AM


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

Futures, foreign currency and options trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones financial security or lifestyle. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results. View Full Risk Disclosure.

CFTC Rules 4.41 - Hypothetical or Simulated performance results have certain limitations, unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

This website is hosted and operated by NinjaTrader, LLC (“NT”), a software development company which owns and supports all proprietary technology relating to and including the NinjaTrader trading platform. NT is an affiliated company to NinjaTrader Brokerage (“NTB”), which is a NFA registered introducing broker (NFA #0339976) providing brokerage services to traders of futures and foreign exchange products. This website is intended for educational and informational purposes only and should not be viewed as a solicitation or recommendation of any product, service or trading strategy. No offer or solicitation to buy or sell securities, securities derivative or futures products of any kind, or any type of trading or investment advice, recommendation or strategy, is made, given, or in any manner endorsed by any NT affiliate and the information made available on this Web site is not an offer or solicitation of any kind. Specific questions related to a brokerage account should be sent to your broker directly. The content and opinions expressed on this website are those of the authors and do not necessarily reflect the official policy or position of NT or any of its affiliates. 

Vendors along with their websites, products and services, collectively referred to as (“Vendor Content”), are independent persons or companies that are in no manner affiliated with NT or any if its affiliates. NT or any of its affiliates are not responsible for, do not approve, recommend or endorse any Vendor Content referenced on this website and it’s your sole responsibility to evaluate Vendor Content. Please be aware that any performance information provided by a vendor should be considered hypothetical and must contain the disclosures required by NFA Rule 2-29(c). If you are interested in learning more about, or investigating the quality of, any such Vendor Content you must contact the vendor, provider or seller of such Vendor Content. No person employed by, or associated with, NT or any of its affiliates is authorized to provide any information about any such Vendor Content. Visit the CFTC resources for education regarding the industry and signs of fraud.