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.