Wiki JStore Search Login

Get historical Datas without weekend flat candles
 Post subject: Get historical Datas without weekend flat candles Post rating: 0   New post Posted: Sun 17 Mar, 2019, 19:53 

User rating: 3
Joined: Thu 13 Dec, 2018, 22:09
Posts: 12
Location: GermanyGermany
I want to use the datas of the last 3 candles on the 4H chart. During the week it works fine, but on sunday and the first 2 candles on monday it seems, that my strategy does not work. The flat weekend candles should not be calculated. I tried to use the GetTimeUnit block, but I am not able to fix that problem. Anyone here, who can help me? Thanks a lot.

best regards


File comment: Strategy
last_3_candles.vfs [42.49 KiB]
Downloaded 59 times
File comment: 1st candle Monday 00:00 UTC
monday_0_00.png [15.33 KiB]
Downloaded 150 times
File comment: 2nd candle Monday 04:00 UTC
monday_4_00.png [15.44 KiB]
Downloaded 142 times
File comment: 1st candle Sunday 20:00 UTC
sunday_open.png [15.28 KiB]
Downloaded 127 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: Get historical Datas without weekend flat candles Post rating: 0   New post Posted: Wed 20 Mar, 2019, 14:40 
User avatar

User rating: 0
Joined: Tue 15 May, 2018, 01:17
Posts: 8
Location: ChinaChina
Here are my idea for your reference:
1. check what value you look for from last 3 candles
2. create 3 new varibles to prepare record the value you look for, variable 1, variable2, variable 3
3. use get time block and "if" logic to filter the candles among Monday and Friday
4. If above point3 is true, First, assign variable 1 to varibale2, then assign v2 to v3, finally assgin last candle's value to variable1. This logic is trigerred every 4H candle opening.
5. wait three 4H, you would get three different variables.

In the point 3, you need to check both time "day" and time "hour" to get the accurate candles. I didn't try but it should work.

Additionally, you can also try to use look back logic, for example:
1. create a variable, named 'Lookback'
2. If lookback <3, then lookback+1 in itself
3. put lookback to the "shift" place of get historical candle
4. time filter logic as above to assign candle's value to variables.

I am not familar with the get historical candleS, maybe someone could have better logic than mine, you can search in forum.


Jump to:  

  © 1998-2011 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