Thank you Dan, you've been incredibly helpful.
Reason why I've been so focused on perfectly capturing daily opens and closes is the following and perhaps you may be interested in helping me to write the code of this strategy.
Using historical data in Excel, I've found this very interesting strategy (returns below exclude commission and slippage costs).
Security analyzed: SPY. Time range 12/31/02 - today.
Every day I check the prior day's High/Open return. (High/Open -1)*100.
If it was not equal or above 0.6% (I found this value through tons of VBA/Excel based simulations), then today I trade.
This means I buy today at the market open and sell at the close.
Now, today though is not based on a simple buy at open and sell at close.
Today I have in place a stop loss at -2% so that if the price crosses that threshold, I sell and close the position.
Also, if the price crosses (equal or greater than) 0.6% then, I move my stop loss to 0.6%.
So if the price will never revert back below 0.6%, I will make a profit equal to wherever the price will close for the day (above 0.6%), otherwise I should get 0.6%.
Last scenario is when the strategy goes long and that day the price doesn't cross neither the stop loss or the 0.6% threshold (that I call take profit level).
If today the price crosses the 0.6% level, then next day we won't trade anymore and the strategy will observe the market.
The strategy will be launched again right after one day when the high doesn't cross the 0.6% barrier.
Over that time period, SPY made 228% and this strategy made 163% however never going underwater.
If you change the time period from 12/31/07 to today:
SPY return: 81% ish
Strategy return 132%.
The strategy seems to be very consistent and less volatile.
The problem is that it relies a lot on precise intraday prices and I'm having really a hard time to implement it.