Hello I would like ask you something..
I am taking look at JForex API last few days and it seems really great done work, I like this opportunity to write custom indicators/strategies in my favourite Java...
The only thing I am confused from is how could I implement indicator which is calculating values from two different instruments...?
I am programming indicator which will calculate the correlation index between GPBUSD 1Hour and EURUSD 1Hour
I already have this indicator but I am not sure if the source code is correct.
I think the calculated values are ok, but I am worried about exceptions of this indicator in future, because the way how my indicator is accessing data is this:
I have two InputParametrInfo instances. One for GBPUSD one for EURUSD.
In "calculate" method I am accessing needed array of IBars from both of the instruments.
But my question is.. could it throw exception when one instrument will have less IBars like anotherone?
Here is the source code...
https://files.lorencsoftware.cz/20000007 ... 1Hour.javaMaybe the best way how you can teach me or explain how to write multiinstrument indicators will be
when you will post some example indicator calculating Close price of GBPUSD 1Hour minus Close price of EURUSD 1 Hour..
Thank you very much for your assistance.