VO
Topics
29 Aug 2020, 17:21
1812
7
Replies
voldemort
30 Aug 2020, 14:36
RE: Example code for quick tip:
firemyst said:
Example code for quick tip:
public override void Calculate(int index) { int altIndex = index; altIndex = _marketSeries.OpenTimes.GetIndexByTime(Bars.OpenTimes[index]); //Reference any values from a different timeframe with the altIndex double median = (Bars.HighPrices[altIndex] + Bars.LowPrices[altIndex]) / 2; Result[index] = median; }
Hope this helps :-)
Only difference is I used Bars instead of MarketSeries. Will give this a go. Thanks :)
@voldemort
voldemort
30 Aug 2020, 15:23
RE: RE: RE: Example code for quick tip:
firemyst said:
Hey, Thanks very much. I had used index instead of customindex at some locations which was the issue I believe. That solved problem for recent data. But, still it does not match completely. I have uploaded indicator in the scripts:
Btw, are you the same fireMyst from whirlpool?
@voldemort