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.

indicator return error on strategy
 Post subject: indicator return error on strategy Post rating: 0   New post Posted: Wed 19 Dec, 2012, 16:56 

User rating: 1
Joined: Wed 07 Mar, 2012, 05:56
Posts: 101
Location: New CaledoniaNew Caledonia
hello support,

i try to use the SF_MA_ANGLE in my strategy.

the compilation make without error but i don't known why when i run the strategy this message appear :

15:50:42 Strategy tester: java.lang.ClassCastException: com.dukascopy.api.IIndicators$MaType cannot be cast to java.lang.Integer @ scalp4hv2.Scalp4hsmaangle.calculateIndicatorDouble(Scalp4hsmaangle.java:1041)

this is my statement of the indicator :

double[] maAngle = calculateIndicatorDouble("SF_MA_Angle",
            feedDescr,
            maAnglePrice,
            new Object[]{maAngleType,maAnglePeriod,maShift1,maShift2,maAngleAtr},
            1);


can you help me please?

eric


Attachments:
SF_MA_Angle_V1_0_0.java [16.55 KiB]
Downloaded 335 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: indicator return error on strategy Post rating: 0   New post Posted: Thu 20 Dec, 2012, 08:32 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
The code that you attached does not contain the snippet you posted. However, presumably one of the optional inputs you pass is of type MaType. In this case you need to pass MaType.ordinal().


 
 Post subject: Re: indicator return error on strategy Post rating: 0   New post Posted: Thu 20 Dec, 2012, 13:12 

User rating: 1
Joined: Wed 07 Mar, 2012, 05:56
Posts: 101
Location: New CaledoniaNew Caledonia
ok thanks for that.all is good


 

Jump to:  

  © 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