An event raised in simulation just before a bar closes, if the EnableTradeOnClose property is set to true.

Namespace: RightEdge.Common
Assembly: Common (in Common.dll) Version: 2010.1.0.0 (2010.1.0.0)


public event EventHandler<NewBarEventArgs> BarClosing
Visual Basic
Public Event BarClosing As EventHandler(Of NewBarEventArgs)
Visual C++
 event EventHandler<NewBarEventArgs^>^ BarClosing {
	void add (EventHandler<NewBarEventArgs^>^ value);
	void remove (EventHandler<NewBarEventArgs^>^ value);
member BarClosing : IEvent<EventHandler<NewBarEventArgs>,


Type: System..::..EventHandler<(Of <(<'NewBarEventArgs>)>)>


You should be aware that using the BarClosing event may produce unrealistic results. This is because you are provided with the close price of the bar, but if you submit a market order it will be filled at the close price. In real trading it is not possible to know the exact price at which you will be filled when you submit a market order, and it is not possible to know the exact close price until after trading has closed.

See Also