Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Submit JForex API bug reports in this forum only.
    Submit Converter issues in Converter Issues.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

indicator InputParameterInfo.Type.BAR does not work with price based charts
 Post subject: indicator InputParameterInfo.Type.BAR does not work with price based charts Post rating: 1   New post Posted: Mon 16 Apr, 2018, 17:46 
User avatar

User rating: 21
Joined: Thu 19 May, 2011, 20:50
Posts: 413
Location: Germany, Munich
Please review your example
https://www.dukascopy.com/wiki/en/devel ... ple-inputs
It does not work with price based charts.

The problem is the offer side and the instrument selection.
              new InputParameterInfo("ASK", InputParameterInfo.Type.BAR){{
                 setOfferSide(OfferSide.ASK);
                 setInstrument(Instrument.GBPUSD);
              }},

Once your remove the red indicated part, it works.
setOfferSide(OfferSide.ASK);
setInstrument(Instrument.GBPUSD);

It seems the JForex indicator engine does not allow any settings inside InputParameterInfo object, if applied on price based charts.

Please fix this.


 
 Post subject: Re: indicator InputParameterInfo.Type.BAR does not work with price based charts Post rating: 1   New post Posted: Mon 16 Apr, 2018, 18:12 
User avatar

User rating: 21
Joined: Thu 19 May, 2011, 20:50
Posts: 413
Location: Germany, Munich
Here comes a very simple example.
If you apply the indicator "VOLUMEBS" (see below) to a 10 Ticks Bar Chart, then it shows you volumes on Ask charts only. There is nothing on a Bid chart.
It seems that the
 setOfferSide(OfferSide.ASK);

forced JForex to void the indicator.


Attachments:
VolumeIndicatorBS.java [2.69 KiB]
Downloaded 209 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 InputParameterInfo.Type.BAR does not work with price based charts Post rating: 0   New post Posted: Wed 23 May, 2018, 11:39 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Indicator calculation on custom input data is implemented only for time aggregated data or ticks.

On charts with price aggregated data types sample indicator from Wiki must receive chart's PA bars as main input and different number of TA candles as other inputs.
Period of this candles is equal to base period of PA data (7 days) if it wasn't explicitly set for each input.


 
 Post subject: Re: indicator InputParameterInfo.Type.BAR does not work with price based charts Post rating: 0   New post Posted: Wed 23 May, 2018, 20:07 
User avatar

User rating: 21
Joined: Thu 19 May, 2011, 20:50
Posts: 413
Location: Germany, Munich
Could you give an example how to solve this or could you implement the missing part?


 
 Post subject: Re: indicator InputParameterInfo.Type.BAR does not work with price based charts Post rating: 0   New post Posted: Mon 04 Jun, 2018, 13:20 
User avatar

User rating: 21
Joined: Thu 19 May, 2011, 20:50
Posts: 413
Location: Germany, Munich
Please help as I don't know how to handle your answer.


 
 Post subject: Re: indicator InputParameterInfo.Type.BAR does not work with price based charts Post rating: 0   New post Posted: Tue 05 Jun, 2018, 16:36 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hello,

Unfortunately, for PA charts isn't possible implement this logic. For specified time interval, depending on selected OfferSide, input data have different amount of elements and bars between themselves will not be logically related. In this case, the correct visualization of indicator isn't seen as possible.

Image


Attachments:
renko_screen.png [142.35 KiB]
Downloaded 290 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.
 

Jump to:  

cron
  © 1998-2024 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