Dukascopy Support Board

Get Historical Candles Error
Page 1 of 1

Author:  bmvajta [ Mon 19 Oct, 2020, 19:54 ]
Post subject:  Get Historical Candles Error

Unfortunately the historical candle data is incorrect. As you can see in the picture, the data is only retrived for the candle with the shift value (in my attached example it is #4.)...
Is this a bug, or can I do something differently?

Beste regards,


Breakout_Reversal.vfs [65.38 KiB]
Downloaded 110 times
Screenshot 2020-10-19 at 20.48.56.png [872.63 KiB]
Downloaded 169 times

Author:  vadim_berezhnoj [ Tue 20 Oct, 2020, 16:25 ]
Post subject:  Re: Get Historical Candles Error


It works fine. You are looking at the 4th candle. (Shift=4)
Currently active candle is number 0. (Shift=0)


Author:  bmvajta [ Tue 20 Oct, 2020, 16:50 ]
Post subject:  Re: Get Historical Candles Error

Hi Vadim,

I might be mistaken, but I am looking for 16 historical candles (from the 4th candle backwards).. Those 16 historical candles, I want to use as 1 block and look at the and low of that block....
If this is not the way to do it, would you be so kind to tell me , what way I can achieve this?

thanks again


Author:  bmvajta [ Wed 21 Oct, 2020, 11:29 ]
Post subject:  Re: Get Historical Candles Error

Hi Vadim,

I am more than convinced now there is some sort of BUG with the Historical CandleS block.... Or with the loop vieuwer. So the array of data might be correct bbut perhaps the loop vieuwer handles it incorrectly (either one of the two).
I noticed that:
1.) When using Loop vieuwer, the data is only presented (or retrived) for the candle number of the shift, not the entire block of candles).
2. Sometimes (most of the times), the high and low of the retrieved data is switched around.

I would really appreciate your help!

best regards


Author:  vadim_berezhnoj [ Wed 21 Oct, 2020, 14:28 ]
Post subject:  Re: Get Historical Candles Error

To learn how blocks in Visual JF work please read the following points from the manual:
5.3. Components
7.3. How to work with shift values
https://www.dukascopy.com/vfhelper/down ... _locale=EN

After that, if you see discrepancy in block work, please, clearly explain the issue and add strategy file that replicates it.


Author:  bmvajta [ Wed 21 Oct, 2020, 14:41 ]
Post subject:  Re: Get Historical Candles Error

Dear Vadim,

Appologise up front for my harsher reaction because I know you always try to do your best at helping, but in this instance I feel you are not really reading my posts. So I Ask you once again, please do not send me to read a manual whoch I have obviously done, but I ask YOU this time to read carefully what I have posted here:

In my first post you can see a clear screenshot of what is happening and I also added the VFS file.
I will repeat unmistakenly what I experience and I emphesize, it is NOT about the Shift! The shoft works fine. The only reason I showed a shift 4 in my first post is to be very clear about what the historical candleS (PLURAL) is doing. Not because I have an issue with the shift funtion.

What I try to do is retrieve a block of 16 historical candles (the shift here is irrelevant, as it is about the 16 candles!). I want to look at the HIGH and the LOW of that block of 16 candles. I use the historic candles block, enter 16 in the candles amount section! After the array of data is retrieved, I use the LOOP VIEWER to use that array of data!
As you can see clearly in my attached file (and screenshot), I try to retrieve the high and the low of the array (which obviously is handled for simpicity sake as a single candle). However, what Visual Jforex does is not present me the HIGH and LOW of that array of data, but rather only present the high and the low of a single candle (specifically the one in the SHIFT section).

In other words, the historical candleS (Plural!) is acting as the historic candle (single) block!
In Addtition, the data presented once the array is retrieved is not correct factually as sometimes the high and the low are simply Switched around (now, this might be because of a mistake I make), but I do observe this bbehaviour on occasion.

I hope this explenation was clear Vadim and you are able to present me with a solution. Also please let me know if there is anything I am doing wrong or can do differently in case it is not a bug!

thanks again!


Author:  vadim_berezhnoj [ Fri 23 Oct, 2020, 10:35 ]
Post subject:  Re: Get Historical Candles Error

Period filter should be "IF Last Candle Period = defoultPreiod", not "IF defoultPreiod = 15M"
Also there should be Instrument filter.
Lowest and Highest variables have to be assigned before the Loop Viewer.
Calculation of Entry points should be after Loop Viewer, not within.
Conditions identifying Lowest and Highest are wrong.
Fixed strategy is in attachment.


Breakout_Reversal_fix.vfs [65.57 KiB]
Downloaded 112 times

Author:  bmvajta [ Mon 26 Oct, 2020, 08:25 ]
Post subject:  Re: Get Historical Candles Error

Thank you Vadim!

This was great help, I appreciate it!
Another question I have: as I developed the strategy further, I come accross another problem, whcih I will ask in a new thread to keep the threads clean.

Best regards,


  Page 1 of 1