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.

Preset problem with using custom enum
 Post subject: Preset problem with using custom enum Post rating: 0   New post Posted: Thu 08 May, 2014, 11:13 

User rating: 3
Joined: Thu 28 Jul, 2011, 19:40
Posts: 72
Location: PolandPoland
Hello,

I have problem with preset if I use custom enum in strategy.
Generally it works, but I had problem if I used one version of strategy (in my situation it will be ZigZagLinePlot07) all was OK with using presets.
Next I create new version of this strategy ZigZagLinePlot08 where I use the same enum.
And now if I want to save preset (in 08 version) it do not work.
I receive such exception in java console:

Quote:
java.lang.ClassNotFoundException: jforex.ZigZagLinePlot07$CustomPeriodEnum
at java.lang.ClassLoader.findClass(Unknown Source)
at com.dukascopy.dds2.greed.agent.a.c.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.dukascopy.dds2.greed.agent.a.c.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.dukascopy.dds2.greed.gui.component.strategy.tab.preset.b.a(Unknown Source)
at com.dukascopy.dds2.greed.gui.component.strategy.tab.preset.b.b(Unknown Source)
at com.dukascopy.dds2.greed.gui.component.strategy.tab.toolbar.StrategiesToolbar.w(Unknown Source)
at com.dukascopy.dds2.greed.gui.component.strategy.tab.toolbar.StrategiesToolbar.a(Unknown Source)
at com.dukascopy.dds2.greed.gui.component.strategy.tab.toolbar.StrategiesToolbar.a(Unknown Source)
at com.dukascopy.dds2.greed.gui.component.strategy.tab.toolbar.StrategiesToolbar.b(Unknown Source)
at com.dukascopy.dds2.greed.gui.component.dialog.disclaimers.StrategyDisclaimerDialog.a(Unknown Source)
at com.dukascopy.dds2.greed.gui.component.dialog.disclaimers.StrategyDisclaimerDialog.a(Unknown Source)
at com.dukascopy.dds2.greed.gui.component.strategy.tab.toolbar.StrategiesToolbar.a(Unknown Source)
at com.dukascopy.dds2.greed.gui.component.strategy.tab.StrategiesContentPane.a(Unknown Source)
at com.dukascopy.dds2.greed.gui.component.tree.actions.ap.S(Unknown Source)
at com.dukascopy.dds2.greed.gui.component.tree.actions.ax.execute(Unknown Source)
at com.dukascopy.dds2.greed.gui.component.tree.f.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)



So if I understand it correct, When I use ZigZagLinePlot08 it looking for enum class CustomPeriodEnum from ZigZagLinePlot07, but the same enum class is also in ZigZagLinePlot08.

If I change emun class name in 08 version, the problem still appear.

If I opened new Demo account and on this new account I opened only 08 version it works OK.

Please help.


 
 Post subject: Re: Preset problem with using custom enum Post rating: 0   New post Posted: Thu 08 May, 2014, 15:17 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Custom enums should work, unless you are running the strategy remotely. If it is local run please provide a full example strategy which replicates the case.


 

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