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.

get outputs from indicator
 Post subject: get outputs from indicator Post rating: 0   Post Posted: Wed 05 Dec, 2012, 08:22 

User rating: 1
Joined: Sun 22 Jul, 2012, 13:35
Posts: 40
Hi support,

1,
I created an indicator with 14 inputs of bar. 7 inputs are declared as 7 instruments based on OfferSide.BID and other 7 on OfferSide.ASK.

I tried calculate indicator by the strategy by method IIndicator.calculateIndicator( instrument, period,...) but there is JFException "indicator with name does not exist".


Please help how to get outputs from this type indicator by strategy.

2,
Please check strategy parapeter type File because filechooser does not show files, only directories, so it is not possible choose file.

Thanks


 
 Post subject: Re: get outputs from indicator Post rating: 0   Post Posted: Wed 05 Dec, 2012, 09:42 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Ivan35 wrote:
1,
I created an indicator with 14 inputs of bar. 7 inputs are declared as 7 instruments based on OfferSide.BID and other 7 on OfferSide.ASK.

I tried calculate indicator by the strategy by method IIndicator.calculateIndicator( instrument, period,...) but there is JFException "indicator with name does not exist".
You need to register the custom indicator before using it, see:
https://www.dukascopy.com/wiki/#Use_custom_indicator_in_strategies
Ivan35 wrote:
2,
Please check strategy parapeter type File because filechooser does not show files, only directories, so it is not possible choose file.
This will be fixed with the next platform version.


 
 Post subject: Re: get outputs from indicator Post rating: 0   Post Posted: Wed 05 Dec, 2012, 09:54 

User rating: 1
Joined: Sun 22 Jul, 2012, 13:35
Posts: 40
Yes, indicator is registered. But exception persists in line Object[] outputs = indicators.calculateIndicator(instrument, period, offerSides, indName, inputTypes, optParams, shift);


 
 Post subject: Re: get outputs from indicator Post rating: 0   Post Posted: Wed 05 Dec, 2012, 09:58 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
please provide full example strategy which replicates the problem and also the indicator .jfx file.


 
 Post subject: Re: get outputs from indicator Post rating: 0   Post Posted: Wed 05 Dec, 2012, 13:24 

User rating: 1
Joined: Sun 22 Jul, 2012, 13:35
Posts: 40
Thank you for your willingness. I've already solved it. The problem was incorrect indicator name.

For calculate the exact values is necessary fill array as follows:
OfferSide[] offerSides = new OfferSide[inputCount];
Arrays.fill(offerSides, 0, 7, OfferSide.BID);
Arrays.fill(offerSides, 7, 14, OfferSide.ASK);

;)


 

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