In a Strategy I will like for it to exit any open positions in that Strategy only at a particular time during the day while keeping the Strategy running. I already have the time frames to actually take trades set, but just need it to exit all positions at a particular time and then let the next trade happen per the time frames I set. I already have used your thread on timefilters so thanks for that...however, it does not seem to address exiting all positions at x time.
I don't want to flatten all positions totally with other trades I may be in with other Strategies or manual trades within the Options>Data>Misc. Flatten all in NT...it should be in each Strategy that is deployed.
What I have it doing per the timefilters thread is:
Take any trades that may develop per the Strategy beginning on Sunday after 190000 (7pm est) to 115900 (midnight 11:59 pm est), then on Monday-Friday 000100 (one min passed midnight) til 153000 (3:30 pm est) and it then takes a break from taking trades til 190000 (7pm est) Monday-Friday and so on. So, there is a gap between 153000 (3:30 pm est) and 190000 (7 pm est) daily Mon-Friday that I do not want the strategy to actually taking any trades or in any trades either.
There is 29 +/- min (between 153000 3:30 pm est - 155900 4 pm est) where I tell it to stop actually entering any new trades after that time but it has 29 +/- extra min. for any establish trade positions to finish developing before it needs to exit all long and short positions for that particular Strategy until after 190000 (7 pm est) later that day.
Can you send me over some code that I can plug into the Strategy that tells it to exit all long and short positions (if any) for this Strategy at 155900 3:59 pm est?
and
Where would I put the code (beginning, middle, or end)? If you could take a basic simple strategy code and highlight the code you would have me put in to exit all positions in the Strategy at >= 155900 (3:59 pm est) and <= 185900 (6:59 pm est) that would be absolutely wonderful. I have some ideas, but can not get the code just right yet on exiting all long and short positions in the Strategy between those particular time frames.
P.S. By the way, I can not use the Flatten function in NT (Options>Data>Misc) because I need the Strategy to stay on at all times daily for the week without restarting it, don't want for it to Flatten any other separate Strategies I may have going, and lastly don't want it to Flatten any manual trades I may be in at the time (among other reasons). Therefore, that is why I need it to be put into each individual Strategy independent of NT).
Thank NT...great customer support by the way...
Anyone else who can reply, please do...maybe it will also help others...

Greg

Comment