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.

How to get the Enum values from Define-Parameters Popup?
 Post subject: How to get the Enum values from Define-Parameters Popup? Post rating: 0   New post Posted: Sun 30 Nov, 2014, 06:34 
User avatar

User rating: 7
Joined: Tue 28 Feb, 2012, 09:45
Posts: 45
Location: JapanJapan
Hi community,
About Plugin, I can't get a Enum value of configurable variable from Define-Parameters Popup.

Sample codes,
package markernotes;

import java.io.PrintStream;

import com.dukascopy.api.Configurable;
import com.dukascopy.api.Instrument;
import com.dukascopy.api.JFException;
import com.dukascopy.api.plugins.IPluginContext;
import com.dukascopy.api.plugins.Plugin;

public class PluginSample extends Plugin {
   
   @Configurable(value="String", description="default = test")
    public String text = "test";
   @Configurable(value="Enum1:Instrument", description="default = EURUSD")
    public Instrument instrument = Instrument.EURUSD;
    public enum MyEnum {MYENUM_A, MYENUM_B};
   @Configurable(value="Enum2:MyEnum", description="default = MYENUM_A")
    public MyEnum myenum = MyEnum.MYENUM_A;
      
    @Override
    public void onStart(final IPluginContext context) throws JFException {
       PrintStream p = context.getConsole().getOut();
       p.println(text);
       p.println(instrument);
       p.println(myenum);
       context.stop();
    }

}


Sample setting,
Image

Sample result,
Image

How should I do this?

Regards,


Attachments:
File comment: Sorry, I couldn't up load a .jar file...
pluginsample.jfx [4.33 KiB]
Downloaded 80 times
sampleResult.jpg [22.98 KiB]
Downloaded 327 times
sampleSetting.jpg [38.58 KiB]
Downloaded 270 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
The Best Answer  Post subject: Re: How to get the Enum values from Define-Parameters Popup? Post rating: 1   New post Posted: Mon 01 Dec, 2014, 10:56 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi!
This is a bug, we will fix that.


 
 Post subject: Re: How to get the Enum values from Define-Parameters Popup? Post rating: 0   New post Posted: Tue 02 Dec, 2014, 15:07 
User avatar

User rating: 7
Joined: Tue 28 Feb, 2012, 09:45
Posts: 45
Location: JapanJapan
thanks


 
 Post subject: Re: How to get the Enum values from Define-Parameters Popup? Post rating: 1   New post Posted: Wed 03 Dec, 2014, 17:21 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Should work fine in next platform release.


 
 Post subject: Re: How to get the Enum values from Define-Parameters Popup? Post rating: 0   New post Posted: Sun 14 Dec, 2014, 08:36 
User avatar

User rating: 7
Joined: Tue 28 Feb, 2012, 09:45
Posts: 45
Location: JapanJapan
Thanks, bug was gone in JForex-API 2.12.3.


 

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