Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

What is the equivalent to MQL "enum" and how can one use it?
 Post subject: What is the equivalent to MQL "enum" and how can one use it? Post rating: 0   New post Posted: Wed 05 Oct, 2016, 11:30 
User avatar

User rating: 0
Joined: Tue 06 Sep, 2016, 11:04
Posts: 20
Location: United Kingdom,
I.E. how do I program this:

enum TF
{
One=1,
Five=5,
Fifteen=15,
HalfHour=30,
HOUR=60,
};

extern TF timeFrame = HOUR;


Thanks


 
 Post subject: Re: What is the equivalent to MQL "enum" and how can one use it? Post rating: 0   New post Posted: Wed 05 Oct, 2016, 13:07 
User avatar

User rating: 2
Joined: Sun 15 Apr, 2012, 22:19
Posts: 25
Location: GermanyGermany
Use a java.util.Map or java.util.EnumMap.

See here:

Map: https://docs.oracle.com/javase/7/docs/a ... l/Map.html

Enum: https://docs.oracle.com/javase/tutorial ... /enum.html

EnumMap: https://docs.oracle.com/javase/7/docs/a ... umMap.html


 

Jump to:  

cron
  © 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