Login Page - Create Account

Support Board


Date/Time: Sat, 11 Jan 2025 02:20:13 +0000



[Programming Help] - Spreadsheet Study for Automated Trading

View Count: 730

[2016-10-30 17:19:35]
jakesans - Posts: 50
What would be a a good formula to exit all open positions prior to session close? I didn't see a default study setting to do this.

I was thinking adding the time line study and setting to 1 minute prior to market close and using the crossover function, but it seems like this isn't necessary and may not actually work because of the values the study provides on the spreadsheet. It seems like the best way is to create a formula from the time stamps already provided in the default spreadsheet, but I am not sure how exactly to do it. I have tried the TIME and TIMEVALUE functions, but I get errors, so probably not using correctly. An example would be most helpful. Please advise.

Thanks.
[2016-10-30 17:48:08]
Sawtooth - Posts: 4147
Try using cell J29 with a formula like this:
=J41-INT(J41)>TIMEVALUE("15:59:00")
[2016-10-30 21:45:17]
jakesans - Posts: 50
Works perfectly. Thanks so much, Tom.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account