Hello I found bug in JForex
I have my custom indicator in JForex for calculating correlation between currency pairs.
The indicator is calculating the correlation index from last "n" bars.
For example from last 14 bars, so there is LookBack!! And here is problem with the lookback when there is weekend:
When you will add the indicator into chart, you can see that the chart does not contain weekends.
So imagine indicator has some values at monday morning and these values are calculated from previous fridays bars. That is OK.
BUT when you are using the indicator in some strategy, at the monday morning the strategy calculate different values. And why? Because strategy is calculating the indicator values from weekends bars.
So the thing is: When you have some indicator (
displayed in chart) which has some lookBack for his calculations, the indicator has some values at monday morning.
But the same indicator, with the same parameters will have DIFFERENT values at monday morning when it is
calculated from strategy.
I think the reason of this is that indicators displayed in chart are not taking the lookBack bars from weekend - but the same indicator calculated in strategy is taking the lookBack bars from weekend - so there are different values.
Do you understand what I mean?
Sorry for my english, If you dont understand what I tried to say just let me know I will try to describe it with other words or I can attach some screenshots what I mean..
Btw: here is code of the my correlation indicator
https://files.lorencsoftware.cz/20000007 ... BPUSD.java