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.

Unexpected optional parameter with type [java.lang.Double]
 Post subject: Unexpected optional parameter with type [java.lang.Double] Post rating: 0   New post Posted: Sun 03 Jan, 2010, 17:49 
User avatar

User rating: 3
Joined: Wed 18 May, 2011, 16:25
Posts: 331
Location: SwitzerlandSwitzerland
Once in a while I get the following error message the messages tab:
"Unexpected optional parameter with type [java.lang.Double] for index [0]"
This error message comes without any additional information. The execution of the strategy continues and so far I didn't see wrong results subsequently.

I'm a bit lost as of where that error comes from.
Is this a general error message JForex is issuing or can you direct me to more specific areas where this message is used?

Thanks, RR.


 
 Post subject: Re: Unexpected optional parameter with type [java.lang.Double] Post rating: 0   New post Posted: Mon 04 Jan, 2010, 11:26 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
This error message is thrown when an indicator returns different object from that, that describes possible values of the optional input (OptInputParameterInfo.getDescription()).
In this case, it seems that, in some cases for this indicator as input parameter are given Double type values instead of Integer.

Are you using custom indicator?


 
 Post subject: Re: Unexpected optional parameter with type [java.lang.Double] Post rating: 0   New post Posted: Mon 04 Jan, 2010, 12:22 
User avatar

User rating: 3
Joined: Wed 18 May, 2011, 16:25
Posts: 331
Location: SwitzerlandSwitzerland
Support wrote:
...values of the optional input (OptInputParameterInfo.getDescription()).
In this case, it seems that, in some cases for this indicator as input parameter are given Double type values instead of Integer.
Are you using custom indicator?

No, there are no calls to custom indicators and use of optional input parameters in the strategies we are backtesting at this moment.
I've checked all indicator calls in the current code and all arguments are passed with fields of the appropriate datatype or are casted in the argument list.


 
 Post subject: Re: Unexpected optional parameter with type [java.lang.Double] Post rating: 0   New post Posted: Mon 04 Jan, 2010, 13:37 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Please send us full exception stack trace.
It would be nice, if you could trace that indicator call which throws this exception.
Do you get this exception on the same indicator?


 
 Post subject: Re: Unexpected optional parameter with type [java.lang.Double] Post rating: 0   New post Posted: Mon 04 Jan, 2010, 14:02 
User avatar

User rating: 3
Joined: Wed 18 May, 2011, 16:25
Posts: 331
Location: SwitzerlandSwitzerland
Support wrote:
Please send us full exception stack trace.
It would be nice, if you could trace that indicator call which throws this exception.


This is exactly my problem. The message doesn't come with an exception stack trace, so I don't know the stack trace and where to start looking at.
(There's no context menu item for the stack trace on that log line).
Hence, I also don't know what indicator call is producing this error.

Best, RR.


 
 Post subject: Re: Unexpected optional parameter with type [java.lang.Double] Post rating: 0   New post Posted: Mon 04 Jan, 2010, 14:50 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Exception comes from visual part when you attach indicator to the chart. Can you look at which indicators are attached and maybe remove them one by one... or just give us full list so that we could check it ourself if it's reproducible


 
 Post subject: Re: Unexpected optional parameter with type [java.lang.Double] Post rating: 0   New post Posted: Mon 04 Jan, 2010, 15:41 
User avatar

User rating: 3
Joined: Wed 18 May, 2011, 16:25
Posts: 331
Location: SwitzerlandSwitzerland
ok, that's great news! So it's not coming from the strategy code.

I guess the error then came when I added and used a T3 on the chart and it didn't apply/pass the parameters I was entering.
Please see my posting: https://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=16&t=2540

I can't 1:1 reproduce the steps to add a T3 with the outcome described in the posting (and I think it involved using the preview function), but something that's easy to reproduce is the following misbehaviour:
1) Add indicator, type "T3" in quick search, select T3
2) In field "Time Period" select the content "5" and type "16" to replace the value
3) Select the "0.7" in field "V Factor" and type "0" or "0.0"
4) Click OK button
==> this places a T3(5, 0.0) instead of a T3(16,0.0) on the chart.

if you change steps 2) and 3) this will result in a T3(16, 0.7) instead of a T3(16,0.0)

Best, RR.


 

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