RemoveLastBar()

<< Click to Display Table of Contents >>

Navigation:  NinjaScript > Language Reference > Bars Type >

RemoveLastBar()

Previous page Return to chapter overview Next page

Definition

Removes the last data point for the Bars Type.  There may be cases where your custom bar type may need to amend the last values added on a bar that has already closed.  Calling RemoveLastBar() will remove the last points for that bar type and allow you to call AddBar() with the updated values.

 

Notes:  

In order to use this method, the IsRemoveLastBarSupported method must be true.  

RemoveLastBar() CANNOT be used with TickReplay

 

 

Syntax

RemoveLastBar(Bars bars)

 

Parameters

bars

The Bars object of your bars type

 

 

Examples

ns

RemoveLastBar(bars);