Dukascopy
 
 
Wiki JStore Search Login

ppl
 Post subject: ppl Post rating: 0   New post Posted: Thu 04 Feb, 2016, 17:30 
User avatar

User rating: 0
Joined: Thu 04 Feb, 2016, 16:50
Posts: 2
Location: FinlandFinland
Hi,

I'm new to JForex and I just pasted (from https://www.dukascopy.com/wiki/#Indicator_Calculation) an example of the use of an indicator :

double[] minMax = indicators.minMax(Instrument.EURUSD, Period.ONE_MIN, OfferSide.ASK, AppliedPrice.CLOSE, 5, 1);

But I get this error message :

16:15:43 AppliedPrice cannot be resolved to a variable
16:15:43 ^^^^^^^^^^^^
16:15:43 double[] minMax = indicators.minMax(Instrument.EURUSD, Period.ONE_MIN, OfferSide.ASK, AppliedPrice.CLOSE, 5, shift);
16:15:43 1. ERROR in C:\Users\Karim\AppData\Local\JForex\Karim\jfxide\tmp\compile\ATR.java (at line 121)

I tried also (as AppliedPrice is static enum in IIndicators)

double[] minMax = indicators.minMax(Instrument.EURUSD, Period.ONE_MIN, OfferSide.ASK, IIndicators.AppliedPrice.CLOSE, 5, 1);

But then I get this error message :


16:13:47 Unhandled exception type JFException
16:13:47 double[] minMax = indicators.minMax(Instrument.EURUSD, Period.ONE_MIN, OfferSide.ASK, IIndicators.AppliedPrice.CLOSE, 5, 1);
16:13:47 1. ERROR in C:\Users\Karim\AppData\Local\JForex\Karim\jfxide\tmp\compile\ATR.java (at line 121)


Could someone please help me and tell me why I get this error in AppliedPrice parameter ?

Thanks


 

Jump to:  

  © 1998-2024 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com