Dukascopy
 
 
Wiki JStore Search Login

how to calculate bar shift
 Post subject: how to calculate bar shift Post rating: 0   New post Posted: Tue 23 Aug, 2016, 11:02 
User avatar

User rating: 0
Joined: Tue 23 Aug, 2016, 10:43
Posts: 5
Location: Singapore, Singapore
Hello, i would like to know how to calculate the bar shift from the lastBarStart to a given time..

Eg. Given a time in the past, how do i calculate the offset shift ?

Many thanks!


 
 Post subject: Re: how to calculate bar shift Post rating: 0   New post Posted: Mon 29 Aug, 2016, 19:40 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi

Here is an example:
Set the "past time" to the variable "Given Time" then define your trading period in minutes using "Period_in_minutes" and run your strategy,
you should get the number of candles, thus shifts, resulted since that given date and time.

Cheers


Attachments:
Determine_shifts.vfs [13.62 KiB]
Downloaded 166 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:  

  © 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