CandleFinishedEvent

CandleFinishedEvent
public event Action<List<Candle>> CandleFinishedEvent;

This event signals the completion of the formation of the last candle in the series. It passes a list of all candles for the instrument on the tab. Most often, the event is used in classic strategies based on candlestick data analysis, acting as a trigger for executing trading logic. It is called at intervals equal to the specified timeframe. On the tab, this is the only event that is called at regular time intervals.

1. Subscribe to the candle completion event.

2. Save a reference to the last candle in the series.

3. If there are no open positions and the last candle closed at 2% above the opening price, open a long position.

4. Close at the market if the candle closed at 1% below the opening.

The desired timeframe is selected in the connection settings. In the example, it is 15 minutes:

Accordingly, the CandleFinishedEvent will trigger every 15 minutes.

If you have any difficulties or questions, please write to the support chat. Link