Wrong Prices when using MarketSeries.OpenTime.GetIndexByExactTime()
Wrong Prices when using MarketSeries.OpenTime.GetIndexByExactTime()
12 Feb 2014, 13:18
Hi
The values I am getting from using the index obtained from MarketSeries.OpenTime.GetIndexByExactTime() and looping through and inspecting OpenTime[index] is VERY different from what I can see on the chart.
It all seems incorrect and needs urgent rectification! Please let me know when this will be fixed.
Here are the results:
Using OpenTime.GetIndexByExactTime():
15minute
EURUSD
09-Jan-14 1:30PM Open Price 1.36717
09-Jan-14 1:45PM Close Price 1.36718
Actual Chart:
09-Jan-14 1:30PM Open Price 1.36331
09-Jan-14 1:45PM Close Price 1.35527
Replies
jobenb
12 Feb 2014, 15:06
( Updated at: 21 Dec 2023, 09:20 )
RE:
Spotware said:
We can not reproduce the described problem. Please send us the code code which can show the issue.
Sorry, but I can't share the whole robot for confidentiality purposes, however I can share the piece of code producing the incorrect values:
int i; double minimumQualifyingResearchPipValue = MinimumQualifyingResearchPips * Symbol.PipSize; cAlgo.API.Internals.MarketSeries barSeries = MarketData.GetSeries(TimeFrame.Minute15); i = barSeries.OpenTime.GetIndexByExactTime(DateTime.Parse("09-Jan-14 1:30PM")); double eventOpenPrice = MarketSeries.Open[i]; i = barSeries.OpenTime.GetIndexByTime(DateTime.Parse("09-Jan-14 1:45PM")); double eventClosePrice = MarketSeries.Close[i]; string WhyIsTheAboveNotWorking = "Please fix it!";
The code above is in a private method called from OnTick();
@jobenb
Spotware
12 Feb 2014, 14:22
We can not reproduce the described problem. Please send us the code code which can show the issue.
@Spotware