Hello,
I would like to set trade only during regular trading hours and no trading during economic events(flat 5 mins before a major economic news)
Has anyone implemented the logic?
Hi Bhupinder,
You can schedule your strategy using schedule_function. For stopping trade 5 minutes before economic events, you can again use the schedule_function and take trades only if there is no economic event in the next 5 minutes. The timing of economic events can be taken from some fundamental data feed or manually defined in a CSV file.
Hope this helps!
Thanks, it solved the problem.