Strange behaviour in Indicator
Strange behaviour in Indicator
10 Dec 2013, 19:53
Look at the screen dumps. At random times the last bars are not drawn. After moving back and forth to other timeframes, things change. Bug?
In the left image the last 3 bars are missing. In the right image (different timeframe) they are there.
Replies
jeex
11 Dec 2013, 10:16
RE:
Spotware said:
You need to translate the index from one series, the one of the chart, to the another. There is a method GetIndexByExactTime
var indexXyz = xyz.OpenTime.GetIndexByExactTime(MarketSeries.OpenTime.LastValue); Result[index] = xyz.Close[indexXyz];
Thanks. I'll give it a try.
@jeex
jeex
11 Dec 2013, 10:24
RE: No such method
Spotware said:
You need to translate the index from one series, the one of the chart, to the another. There is a method GetIndexByExactTime
var indexXyz = xyz.OpenTime.GetIndexByExactTime(MarketSeries.OpenTime.LastValue); Result[index] = xyz.Close[indexXyz];
It sais there is no method by the name of GetIndexByExactTime...
@jeex
jeex
11 Dec 2013, 11:36
RE:
Spotware said:
You can try this on Spotware cAlgo. The method will be available in the next release.
Fixed it by calculating the index-difference:
_XYZindexShift = MarketSeries.Close.Count - _xyz.Close.Count;
And later on use the same indexShift to get the right index.
Thanks for the tip.
@jeex
Spotware
11 Dec 2013, 11:44
RE: RE:
jeex said:
Spotware said:
You can try this on Spotware cAlgo. The method will be available in the next release.
Fixed it by calculating the index-difference:
_XYZindexShift = MarketSeries.Close.Count - _xyz.Close.Count;And later on use the same indexShift to get the right index.
Thanks for the tip.
The series count difference is not correct to index another series.
Note that when you use the method GetIndexByExactTime you need to check that the returned value is not equal to -1. The method returns -1 if there is no value at the exact time.
@Spotware
jeex
10 Dec 2013, 20:16
Multi Symbol
i forgot to mention: it is an indicator based on more than one symbol.
@jeex