TimeFrame

TimeFrame

Timeframe is a segment of time used for constructing price chart elements such as bars and candles. In other words, it's the interval during which price movement information was gathered before the candle was formed. Let's look at a 15-minute chart for example:

The candle highlighted by the crosshair began forming exactly at midnight according to the exchange's time. The candle's open is equal to the price of the first trade that fell into this time interval. Then, over the next 15 minutes, the candle's maximum and minimum are formed. The last trade made before 00:15:00 sets the closing price. In this way, all candles with a 15-minute interval are formed, and similar calculations are done for other timeframes. A list of timeframes supported by the exchange API can be found in the relevant documentation.

After connecting to the exchange server, OsEngine requests this candle history and then continues to build candles according to the algorithm described above.

To find out the current timeframe from the code, you can use two methods:

The first is to refer to the TimeFrame property of the BotTabSimple class, which returns the current timeframe as a TimeSpan structure value.

The second is through the connector of the tab to refer to the TimeFrame property, which returns a value of the TimeFrame enumeration.

All timeframes supported by the program are listed here.

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