Login Page - Create Account

Support Board


Date/Time: Sun, 19 May 2024 00:52:53 +0000



Post From: Spreadsheet System for Trading - Flatten Positions And Cancel Orders At Set Time

[2019-08-21 21:36:09]
User695518 - Posts: 50
Hello,

I am currently using the Spreadsheet System for Trading study. I have my spreadsheet study system set with the following:

Allow Trading Only During Time Range (read/write):  TRUE
Start Time For Allowed Time Range (read/write):  07:30:00
End Time For Allowed Time Range (read/write):  13:00:00


I also have the following set:

Flatten Positions And Cancel Orders At Set Time (read/write):  TRUE
Time For Flatten Positions And Cancel Orders (read/write):  13:05:00


My desire is to ensure that at 13:05:00 all positions are flattened and any outstanding orders are cancelled.

However, it appears that the Flatten Positions And Cancel Orders At Set Time only works within the time frame set within Allow Trading Only During Time Range. This is not ideal.

What happens if I set End Time For Allowed Time Range to 13:00:00 and Time For Flatten Positions And Cancel Orders to 13:00:00 and somehow a new order is triggered milliseconds after the flatten?

I would much rather that Flatten Positions And Cancel Orders At Set Time did not take Allow Trading Only During Time Range into account, so that I could stop automated trading at 13:00:00 and flatten all positions at 13:05:00, as an example.

As it stands, this issue could put automated traders in a very precarious position, where they think they are ending the day flat, but they are not!

Thanks!