Plot a point only on the last bar

Questions about MultiCharts .NET and user contributed studies.
User avatar
orad
Posts: 121
Joined: 14 Nov 2012
Has thanked: 50 times
Been thanked: 20 times

Plot a point only on the last bar

Postby orad » 11 Feb 2015

Hi,

I want to plot a point only on the last bar that is ticking, and when the bar steps forward, I don't want to get a track of the point on previous bars. Is it possible to do this?

Thanks!

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Plot a point only on the last bar

Postby Henry MultiСharts » 11 Feb 2015

Hello orad,

Here is how to do that:
protected override void CalcBar()
{
if (Bars.Status != EBarState.Close)
plot1.Set(Bars.CloseValue);
else
plot1.Reset();

}


Return to “MultiCharts .NET”