Login Page - Create Account

Support Board


Date/Time: Mon, 25 Nov 2024 04:51:05 +0000



Post From: ACSIL: Flatten Orders & Stop Trading Before Market Close

[2024-04-08 12:58:08]
User582682 - Posts: 3
I've been reading the forums, and there doesn't seem to be any simple solutions so far. What I am looking to do is the following:

- Detect market close times.
- Stop trading and flatten positions x amount of time before market close.
- Re-enable trading when the market opens back up.

I am aware of the solutions here in the Global Management: Global Profit Loss Management: Global Profit/Loss Management

The issue is that different instruments may have different closing times. It's not very efficient to have to go and manually edit this for each instrument. Also, what happens if the times get changed and a trader who is prop trading gets their account blown due to being forced to manually inputting the old market times?

What I would like to do is somehow write code in ACSIL to auto-detect the market close times (Sierra Charts can't seem to do this). Is it possible to use the data feed at all? Has anyone figured out a way to resolve this?

The idea I have is to create a study that you can simply add to a chart. Once added, it can auto-detect the closing times and then flatten positions and stop trading shortly before the market closes. This way it'll be simple for users to add the study to each chart, and it'll automatically do this for the trader.
Date Time Of Last Edit: 2024-04-08 12:59:13