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.

Cannot create indicator
 Post subject: Cannot create indicator Post rating: 0   New post Posted: Mon 23 Nov, 2015, 19:08 

User rating: 1
Joined: Sat 27 Apr, 2013, 16:18
Posts: 30
Location: Brazil,
Hi, Suport. Good afternoon.

I'm trying to customize an inner indicator just like shown on https://www.dukascopy.com/wiki/#Use_custom_indicator_in_strategies.

But when I try to run the strategy JForex returns the following msg:
"Strategy tester: com.dukascopy.api.JFException: Cannot create indicator [class operadores.ZigZagObvIndicatorStrategy$ZigZagOnObvIndicator] instance. @ operadores.ZigZagObvIndicatorStrategy.onStart(ZigZagObvIndicatorStrategy.java:62)"

Please see the attached file for more information about the strategy.

Thank you in advance.

Eduardo.


Attachments:
ZigZagObvIndicatorStrategy.java [11.66 KiB]
Downloaded 72 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.
 
 Post subject: Re: Cannot create indicator Post rating: 0   New post Posted: Wed 25 Nov, 2015, 22:32 

User rating: 1
Joined: Sat 27 Apr, 2013, 16:18
Posts: 30
Location: Brazil,
Could anybody help me to find what's wrong, please?


 
 Post subject: Re: Cannot create indicator Post rating: 0   New post Posted: Thu 26 Nov, 2015, 09:56 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
The included indicator should be declared static:
public static class ZigZagOnObvIndicator implements IIndicator

Rather than this
public class ZigZagOnObvIndicator implements IIndicator


 

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