Dukascopy
 
 
Wiki JStore Search Login

JFOREX-2516 Period.name() for non-basic returns unit name
 Post subject: JFOREX-2516 Period.name() for non-basic returns unit name Post rating: 0   New post Posted: Sun 05 Dec, 2010, 13:21 
User avatar

User rating: 3
Joined: Wed 18 May, 2011, 16:25
Posts: 331
Location: SwitzerlandSwitzerland
Quote:
API dcoumentation:
Period.name() Name of predefined constant exactly how it was defined or null if it's custom period

if getting a list of all compliant periods by calling Period.generateAllCompliantPeriods(), for all non-basic periods period.name() returns the name of the UNIT.
Example:
period "2 Hours" period.name() = "HOURS"
period "6 Hours" period.name() = "HOURS"
..
Period "2 Days" period.name()= "DAYS"
...

It's not critical as the names shouldn't be used in the processing logic, but it would be good for consistency if you could return the name in a style equivalent to the basic periods ("TWO_HOURS", "SIX_HOURS", "TWO_DAYS", ...) or return null for all non-basic periods as described in the API documentation.

Best, RR.


 

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