I was wondering if anyone had any example code for opening trades during certain days. I'd like to only open trades Sunday (when market opens) until Thursday. If the trades are profitable by Friday, I'd like to close them out. I'd like to do this to eliminate gap risk over the weekends.
Does anyone have any example code or scripts I could look at?