Dukascopy
 
 
Wiki JStore Search Login

JFOREX-2391 : or time is not correct time for the period spec
 Post subject: JFOREX-2391 : or time is not correct time for the period spec Post rating: 0   New post Posted: Tue 26 Oct, 2010, 10:52 

User rating: -
Hi,

I'm trying to calculate:
timeFrame = Period.createCustomPeriod(Unit.Minute, 180); // 3 hours
indicators.sma(instrument, timeFrame, OfferSide.BID, IIndicators.AppliedPrice.CLOSE, period, filter,
               numberOfCandlesBefore, time, numberOfCandlesAfter);


The period is 3 hours. However I get:
com.dukascopy.api.JFException: Number of bars to load = 0 or time is not correct time for the period specified


Is it possible to get sma for any period other than predefined one in Period class? I bet I have other settings correct (when I change 3 hour to 1 hour everything works).

Thanks


 

Jump to:  

  © 1998-2025 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