Hey guys, so im pretty new to futures, and usually you just register the indicators at the top with the correct symbol, but the issue with Futures is that i want to change the contractf every 90 days (to the front one) and I need to update/register the indicators with the updated symbols.
so I attached the backtest below where I followed this structure, but if you look at the backtest, for some reason its not doing any orders, anybody know why ?
Vladimir
Shner
I'll try to help, but I'm wondering if you had a chance to see what I asked you about earlier.
Shner
Hey Vladimir I did have a look at it, I although it wasnt what I was looking for, I closed the thread as I managed to edit the values directly by making my custom indicator which I can access the values updated on each datapoint.
Although, if you do find a way where I can just feed the values directly to the indicator without making a custom indicator from scratch I would gladly appreciated (like x.close * 1.2 / x.high), the reason is that b4 was just a simple example, but I would like to perform other subtractions in the future that might be completly different…
Vladimir
Shner
Thanks for understanding.
Try the algorithm with my changes. Hope it helps.
If you are satisfied with my answer, please accept it .
Shner
Thanks Vladimir It looks great, I just wanted to ask a few questions:
1. why use this attributes for the EMA's condition, is it necessary ? and whats the purpose of it ?
2. I know you didnt add this, but do you know by chance what this does:
I tried having a look at the docs and it said self.Portfolio.get(self.symbol) returns the value of the symbol, but then why not use “self.Securites” ?
3. what is the difference between:
is it just a standard consolidator for adding standard Timeframes (second, minute, hour…) ?
Vladimir
Shner
-→ 1. why use this attributes for the EMA's condition, is it necessary ? and whats the purpose of it ?
self.tolerance = 0.001
self.tolerance creates a buffer zone around the slow EMA
This technique is very often used to reduce false crossover signals.
If you are satisfied with my answer, please accept it and don't forget to like it.
I'll be happy to answer other your questions in another thread.
Vladimir
Shner
Here is a version of the algorithm without
holding = None if self.symbol is None else self.Portfolio.get(self.symbol)
Hope it helps.
If you are satisfied with my answer, please accept it and don't forget to like it.
Shner
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!