Hi,
I'm new to QuantConnect and python (in process of learning). I'm used to algo trading on Tradestation using their Easy language script. I want to test my algo's here but I'm having a hard time to find relavent information on the type of HFT code I'm looking for (probably due to being new to python). Wondering if someone can help me with a working sample code based on the logic mentioned below, so I can edit and make changes as needed.
[0] - current minute, [-1] - previous mintue, and so on
Logic:
If low[-1] > high[-2] & low[-1] > high[-3] & (rsi (Resloution = minutes) between 25 and 30) & (ema 20 < ema 50 (Resloution = minutes)) then buy at next bar/minute open, and sell after 5 minutes
The basic jist I want to understand from the above logic is,
- how to work with minute resolution high low open close data (also if possible can you comment on how I can switch to a 5 minute resolution),
- incorporating indicators on a minute resolution (I have seen code with daily resolution but not minute ) and
- ability to sell after a certain amount of time has passed.
I'm sorry for the trouble, and thank you in advance. :)
Derek Melchin
Hi Utsav,
We can use a RollingWindow to get the historical bars. The RelativeStrengthIndex and ExponentialMovingAverage are built-in indicators. We can switch to 5-min bars through consolidation. Review the linked documentation and the Bootcamp lessons for examples.
Best,
Derek Melchin
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.
Utsav Gaikwad
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!