MarketSeries.WeightedClose?
MarketSeries.WeightedClose?
08 Jan 2016, 15:40
Hello,
what exactly does the property MarketSeries.WeightedClose do?
The documentation says: Weighted price series of historical trendbar...but this value is exactly the same as the MarketSeries.Close value.
So is this a bug or can anyone explain?
Thanks in advance,
Oliver
Replies
lorddevil
11 Jan 2016, 20:41
Ok that's what I thought but then it must be a bug -> try using the MarketSeries.WeightedClose -> it is exactly the same as MarketSeries.Close!
@lorddevil
lorddevil
12 Jan 2016, 18:09
Hmm all I do is taking the last MarketSeries Close and Weighted Close Value. E.g. on a EUR/USD M1 or M5 chart?
protected override void OnBar()
{
Print("WC: {0}", MarketSeries.WeightedClose[MarketSeries.Close.Count - 1]);
Print("C: {0}", MarketSeries.Close[MarketSeries.Close.Count - 1]);
}
Am I doing something wrong here - as both values are always the same.
@lorddevil
lorddevil
12 Jan 2016, 18:13
Eeeek I guess I just found the problem... if I am using the OnBar() - which is called every beginning of the candle, then the Close and Weighted Close is the same because it is not finished yet?
If so then sorry for the wrong report!!
@lorddevil
lorddevil
12 Jan 2016, 23:36
RE:
lorddevil said:
Eeeek I guess I just found the problem... if I am using the OnBar() - which is called every beginning of the candle, then the Close and Weighted Close is the same because it is not finished yet?
If so then sorry for the wrong report!!
Yeah sorry I now have a better understanding on how OnBar() works - so surely there can't be a weighted close on the start of a new candle ;) Sorry for taking your time!
@lorddevil
Spotware
11 Jan 2016, 17:26
Dear Trader,
@Spotware