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.

How to convert GMT to EET for correct value from indicator?
 Post subject: How to convert GMT to EET for correct value from indicator? Post rating: 0   New post Posted: Thu 04 May, 2017, 08:29 

User rating: 0
Joined: Wed 10 Sep, 2014, 10:26
Posts: 7
Location: ThailandThailand
Hi everyone and support

I change both Platform time zone and Day start time for EET, but when I call caramila pivot (1 day) for 1 hour chart . the indicator can't get correct value, value from chart and value from indicator not same. What should I do for correct value both.


simple code call caramilla pivot .

long from = context.getHistory().getBar(instrument, Period.DAILY, OfferSide.BID, 1).getTime();
         long to = context.getHistory().getBar(instrument, Period.DAILY, OfferSide.BID, 0).getTime();
         double [][] pivot = indicators.camPivot2(instrument, Period.DAILY, OfferSide.BID, filter, from, to);

example: to day caramilla pivot calculate from last day bar.
today (3/5/2017) central point for AUD/CAD should be 1.03138 ( High+Low+Close/3 = 1.03444+1.02682+1.03288/3 ) this value correct same value from chart but when I call pivot for simple code indicator get a different value 1.02700 for central point?



Image
Image





apologize for my English.


 
 Post subject: Re: How to convert GMT to EET for correct value from indicator? Post rating: 0   New post Posted: Tue 09 May, 2017, 08:06 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
By default Campivot indicator is calculated on Daily bars. The result is then shown upon whatever timeframe is selected. Hence, the output lines that are more than one bar long. Each line represents only one indicator value.

To check indicator outputs please open EURUSD Daily chart and run the attached strategy. The strategy compares indicator outputs on chart with outputs in strategy.


Attachments:
IndChartVsApi.java [16.29 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.
 

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