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 > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 01-15-2009, 08:49 PM   #1
bwarner
Junior Member
 
Join Date: Aug 2007
Posts: 10
Thanks: 0
Thanked 0 times in 0 posts
Default Please Help with OHLC values in indicators

Please Help!!! i am trying to use High, Low, etc in a simple calculation for an indicator in NT6.5. The problem is the software seems to only recognize the first two places after the decimal whereas i need all four. I am looking for 1.2345 to use in my calculation and i am only getting 1.23. How do i solve this problem?
bwarner is offline  
Reply With Quote
Old 01-16-2009, 04:57 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

Hi bwarner, which variable types do you use? Try using the type 'double'. You can also post your code here and we take a look...Thanks!
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 01-16-2009, 06:41 AM   #3
bwarner
Junior Member
 
Join Date: Aug 2007
Posts: 10
Thanks: 0
Thanked 0 times in 0 posts
Default

I added two lines to the modheikenashi indicator equal to the high and low of that bar. When i try to use the two lines i added in modheiken ashi i get the problem i previously described.
Attached Files
File Type: zip Mod HeikenAshi and other indicator.zip (4.5 KB, 5 views)
bwarner is offline  
Reply With Quote
Old 01-16-2009, 07:24 AM   #4
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
Default

bwarner,

How are you determining this is the case? If you are trying to visually justify this it will not work. You need to print the actual line values from your code and look at it from the Output Window.
NinjaTrader_Josh is offline  
Reply With Quote
Old 01-16-2009, 07:33 AM   #5
bwarner
Junior Member
 
Join Date: Aug 2007
Posts: 10
Thanks: 0
Thanked 0 times in 0 posts
Default

i am not quite sure what you just told me but it basically sounded like what i have will not work. Basically i just want to know if there is a way to use the line1 and line2 values from modheikenashi in another indicator or strategy the same way one would use HAOpen or HAClose?
bwarner is offline  
Reply With Quote
Old 01-16-2009, 07:36 AM   #6
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
Default

What I was trying to convey is that you cannot visually quantify what the line's actual value is from a chart. You need to print out the values from your code.

Print(Plot[0].ToString()); or something along those lines. Whatever your plot/line name is. Then you need to look in the Output Window and that will inform you as to what the value of the line.
NinjaTrader_Josh 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
OHLC Bars PabloC General Programming 3 12-31-2008 01:05 PM
Can indicators return values other than Plot values? higler General Programming 2 04-29-2008 05:17 AM
Access to values of some indicators lgarcia3 Miscellaneous Support 6 04-15-2008 09:45 AM
OHLC to HLC vtown Charting 1 11-17-2007 05:02 PM
Values from indicators CashCache Indicator Development 2 09-13-2007 12:43 PM


All times are GMT -6. The time now is 12:19 AM.