![]() |
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
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Aug 2007
Posts: 10
Thanks: 0
Thanked 0 times in 0 posts
|
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?
|
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
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!
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Aug 2007
Posts: 10
Thanks: 0
Thanked 0 times in 0 posts
|
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.
|
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
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.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Aug 2007
Posts: 10
Thanks: 0
Thanked 0 times in 0 posts
|
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?
|
|
|
|
|
|
#6 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
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.
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |