Hello all,
I am sure this has been asked before but I can not seem to find a concrete answer.
After being half way past the boot training, I felt advanterous enough to try an RSI strategy on the hourly period. Basically looking to buy SVXY whenever the RSI is above 70 and selling whenever it goes below 85.
However, I noticed that if the RSI changes on the last hour and decides to execute a trade, the transaction takes place the next day on opening rather than before the day's close. I am aware this becomes a Market on Open order since the hourly candlebar closes at 4 pm and time is now after hours. I have tried using "self.schedule.on" with 2 minutes before close in place but no luck.
For these types of situations... how can I execute a trade at 3:59 pm based on the current value of the RSI?
If unsure of what I mean. Please see attached backtest and orders filled on 2019-12-03 & 2019-12-04 at 16:00:00.
Alfred Aita
Have you tried changing to Resolution.Minute. Then use ScheduleOn to update it lees frequntly say every 30 minutes.
Andrés M
I tried using ScheduleOn on 2 ways and the results tends to vary, not really sure what I am doing wrong. The first one does close trades before daily close with current information, but it does not trade RSI changes throughout the day at the end of each hour. Thoughts?
Andrés M
The second one, it does trade on the times were it is ScheduleOn but delays the trade by 1 bar. This also affects the previous example where the trades where closing on time before the daily close, these have also now become 1 bar delayed.
Andrés M
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!