Hello
in this thread
viewtopic.php?f=6&t=23915I asked you how to access values from my custom indicator inside strategy code.
Your replay was this:
Object[] val = indicators.calculateIndicator(
instrument,
period,
new OfferSide[] {OfferSide.BID, OfferSide.BID},
"LS_I_DirectionalCorrelation_vs_GBPUSD",
new IIndicators.AppliedPrice[] {IIndicators.AppliedPrice.CLOSE},
new Object[] {14},
1);
console.getOut().println('indicator value: ' + val[0]);
I then I told that its working fine.
But now I found out that sometimes is NOT.
I run the code in historical tester and its printing the values of the indicator.
But for example another time, I run THE SAME CODE on THE SAME DATA in historical tester but all the calculated values are NaN.
How is this possible???