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.

WaddahAT value on chart different than in strategy
 Post subject: WaddahAT value on chart different than in strategy Post rating: 0   New post Posted: Wed 31 Aug, 2016, 21:53 
User avatar

User rating: 164
Joined: Mon 08 Oct, 2012, 10:35
Posts: 676
Location: NetherlandsNetherlands
Dear Support,

I see differences between the value of the WaddahAT indicator on the chart and in a strategy.
Could you explain, what is going on?

I attach a strategy to show my indicator calling/calculation.

Screenshot showing the difference:
Image


Attachments:
File comment: screenshot showing the difference
Capture.PNG [59.59 KiB]
Downloaded 216 times
File comment: sample strategy to calculate the indicator
IndicatorValueRenko4.java [1.9 KiB]
Downloaded 105 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: WaddahAT value on chart different than in strategy Post rating: 0   New post Posted: Thu 01 Sep, 2016, 14:36 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
This indicator requires more values if it needs to match the chart. This happens because it is inductive (next values are calculated based on previous values).
To test the indicator please open the required chart, add the indicator and run the attached strategy. It is visible that chart values match "API + extra inputs".


Attachments:
IndChartVsApi.java [16.31 KiB]
Downloaded 87 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: WaddahAT value on chart different than in strategy Post rating: 0   New post Posted: Wed 07 Sep, 2016, 18:30 
User avatar

User rating: 164
Joined: Mon 08 Oct, 2012, 10:35
Posts: 676
Location: NetherlandsNetherlands
Dear Support,

Could you assist me to modified the strategy that I attached in the first post?
I know it is about the following line, where the indicator is being called:
Object[] WaddahATFeed = indicators.calculateIndicator(feedDescriptor, new OfferSide[] { feedDescriptor.getOfferSide() }, "WaddahAT", null, null, 1);


But I am not able to figure it out, how to change it to the variant you have used:
Object[] extraOutputsFull = indicators.calculateIndicator(feedDescriptor, id.offerSides, id.indicatorName, id.appliedPrices, inputParams,
                    extraSize + dataCount, id.feedData.getTime(), 0);


I need to know the value of the WaddahAT indicator of the just finished bar, whenver a new Renko bar is created.


Thanks in advance.


 
 Post subject: Re: WaddahAT value on chart different than in strategy Post rating: 0   New post Posted: Thu 08 Sep, 2016, 10:11 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
In this forum we try to focus on JForex API issues. There are a number of external programmers who can program the strategy for you:
https://www.dukascopy.com/fxcomm/member ... am_service


 
 Post subject: Re: WaddahAT value on chart different than in strategy Post rating: 0   New post Posted: Sun 11 Sep, 2016, 13:21 
User avatar

User rating: 164
Joined: Mon 08 Oct, 2012, 10:35
Posts: 676
Location: NetherlandsNetherlands
Hmm, not really the answer I've expected on a support forum...

But anyway, I've managed to figure it out. In case someone needs it, here is the code:
            Object[] WaddahATFeed = indicators.calculateIndicator(feedDescriptor, new OfferSide[] { feedDescriptor.getOfferSide() }, "WaddahAT",
                                    new AppliedPrice[]{AppliedPrice.CLOSE}, new Object[] {}, 1000, feedData.getTime(), 0);
            double[] WaddahATvalue = (double[])WaddahATFeed[0];
            double WaddahAT        = WaddahATvalue[999];


 

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