areed1192 / python-trading-robot

A trading robot, that can submit basic orders in an automated fashion using the TD API.
MIT License
535 stars 312 forks source link

post_market_open - adjustment to post_market_end_time #12

Open spenceroulman opened 3 years ago

spenceroulman commented 3 years ago

First off - this work is a HUGE help!!! I have been learning out to trade and code at the same time. Your work and videos are very helpful.

This should be a simple one...

I noticed that the post_market_open was acting strange. Upon investigation I realized that the post_market_end_time was set to "hour = 00". That would adjust now() to today at 00:00:00. By shifting the post_market_end_time to "hour=23, minute=59, second=59", the post_market_open works as intended. I would suspect that most people would accept the 1 second error at the very end of the session.