I wanted to create a kind of bar where wicks would be replaced by a candle body.
Or in another word, replace open and close by high and low.
This would be a kind of Market profile bar, without letters.
I thought that it would be enough to replace the OnDataPoint function and I did this:
protected override void OnDataPoint(Bars bars, double open, double high, double low, double close, DateTime time, long volume, bool isBar, double bid, double ask)
{
if (SessionIterator == null)
SessionIterator = new SessionIterator(bars);
if (bars.Count == 0)
AddBar(bars, high, high, low, low, TimeToBarTime(bars, time, isBar), volume);
else if (!isBar && time < bars.LastBarTime)
UpdateBar(bars, high, low, low, bars.LastBarTime, volume);
else if (isBar && time <= bars.LastBarTime)
UpdateBar(bars, high, low, low, bars.LastBarTime, volume);
else
{
time = TimeToBarTime(bars, time, isBar);
AddBar(bars, high, high, low, low, time, volume);
}
}
However I can'y understand why wicks are still appearing on bars ?
Can you help on this problem ?

Comment