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)

Syntax

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

Value

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

Remarks

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