Support Board
Date/Time: Sat, 01 Nov 2025 00:35:05 +0000
Post From: how to get the last bar of a trading session
| [2021-05-05 15:37:10] |
| User30743 - Posts: 366 |
|
how to get the last bar of a trading session? for example, US futures ends at 15:15 on normal days so it is easy to close the position by hardcoding some previous time. but what about days that have early close? Around 12:00 clock. How to deal with it? I would like to have a systematic approach and never hold any positions over night, so I need to somehow get the last bar of current trading session and flat the position there, if it was not done earlier. Ay ideas how to do it? |
