Support Board
Date/Time: Thu, 26 Dec 2024 02:16:51 +0000
[User Discussion] - Formula for buying at market close and selling at market open
View Count: 1692
[2015-11-26 19:14:46] |
Litz - Posts: 131 |
I want to test a formula that would buy ES at the 4 pm close and sell pre open using the spreadsheet system for trading. I notice that the futures traders usually, maybe 90% to the time, use the off hours move to the eminis up and seldom down. I wish to back test this observation to see how profitable it would be. I don't know what the formula would be to buy at close sell at open to input into the spreadsheet.K =(J42)=TIMEVALUE("16:15:00") L =(J42)=TIMEVALUE("09:15:00") ?? Appreciate any help. Date Time Of Last Edit: 2015-11-26 19:39:08
|
[2015-11-26 22:05:02] |
Sawtooth - Posts: 4143 |
Use an absolute reference to cell J41, and include a time range, like this: K3: =AND($J$41>=TIMEVALUE("16:14:58"),$J$41<TIMEVALUE("16:15:00")) This is a 2 second window before market close. L3: =AND($J$41>=TIMEVALUE("09:15:00"),$J$41<TIMEVALUE("09:15:02")) This is a 2 second window after 9:15 AM. |
[2015-11-26 22:50:56] |
Litz - Posts: 131 |
Thanks Tom. Happy Thanksgiving. Tried those out but no buy or sell orders generated. Got no TRUE conditions met. Date Time Of Last Edit: 2015-11-26 23:02:47
|
[2015-11-26 23:30:34] |
Sawtooth - Posts: 4143 |
In a slow market, there might not be a trade within the 2 second window. Here's another way to do it, if you are using time based bars of an interval that meets 15 min: K3: =AND(A3-INT(A3)>TIMEVALUE("16:14:59"),A3-INT(A3)<TIMEVALUE("16:15:01")) L3: =AND(A3-INT(A3)>TIMEVALUE("09:14:59"),A3-INT(A3)<TIMEVALUE("09:15:01")) These 2 second windows will catch the bar timestamp within the floating point errors. |
[2015-11-26 23:55:29] |
Litz - Posts: 131 |
That works. Thanks for you help.
|
To post a message in this thread, you need to log in with your Sierra Chart account: