An event raised in simulation just before a bar closes, if the EnableTradeOnClose property is set to true.
Namespace:
RightEdge.CommonAssembly: Common (in Common.dll) Version: 2010.1.0.0 (2010.1.0.0)
Syntax
| C# |
|---|
public event EventHandler<NewBarEventArgs> BarClosing |
| Visual Basic (Declaration) |
|---|
Public Event BarClosing As EventHandler(Of NewBarEventArgs) |
| Visual C++ |
|---|
public: event EventHandler<NewBarEventArgs^>^ BarClosing { void add (EventHandler<NewBarEventArgs^>^ value); void remove (EventHandler<NewBarEventArgs^>^ value); } |
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.