Help with null pointer exception when changing input types
JHogg11
Post subject: Help with null pointer exception when changing input types
Post rating: 0
Posted: Mon 13 Jun, 2011, 03:17
User rating: 0
Joined: Fri 10 Jun, 2011, 14:54 Posts: 11 Location: United States,
I'm new to Java, so I'm starting slow, working piece by piece. I tried to change the simple indicator using the pre-made code to use the PRICE input type and I got this error.
00:39:11 Error in indicator: java.lang.NullPointerException @ jforex.Indicator2.calculate(Indicator2.java:33)
These are the only changes I made to the simple indicator.
Line 10: Changed from "new double[1][]" to "new double[5][]" Line 17: Changed to PRICE type Line 33: Changed "inputs[0][i - k];" to "inputs[1][i - k];" Line 74: Changed to "double[][] inputs = (double[][]) array;" which I got from another thread
What do I need to do to get this to work the same way as the default simple indicator works but using the PRICE type?
API Support
Post subject: Re: Help with null pointer exception when changing input typ