Hi :) How do i get the ichimoku Senkou B and Senkou A in the future I know this has been asked :
https://www.quantconnect.com/forum/discussion/4507/output-of-ichimoku-indicator/p1But I still dont get it.
I know there is a mthod of calling self.Ichimoku.SenkouA.Current.value and
self.Ichimoku.SenkouB.Current.value
and also other calls https://www.quantconnect.com/lean/documentation/topic28737.html
Is there something like self.Ichimoku.SenkouA.Future.value ?
I tried self.Ichimoku.DelayedTenkanSenkouA
but wht is that? is it tenkan + SenkouA?
Thanks :)
Martin etellerandet
Im trying to calculate the senkou A and B and then I will store them in a Rolling window and so I can at least get the "future" values.
but the reasult is not that pretty.
B calculated looks like B from the indicator just shiftet I wonder if im doing it right.
the code is attached.
Martin etellerandet
Im trying to calculate but I keep getting it wrong. right now im simply trying to make the tenkan and kijun
is this the way ? It looks close but not tottally..
Martin etellerandet
I finaly figured out senkou A now I can get the "future" values. its in the attached script.
but what about senkou B ? I made a rollingwindow of the last 52 days and found the highes high and the lowest low and devided it by 2.
I seems really close the the inbuild senkou B but its not quite the same values. its as if senkou B cal is 2 pips higher. what is wrong.
Is there a way to see all the inbuild values of senkou B? like "self.ichimoku.senkouB.All.values"
Cloud
Hello,
Apparently their implementation of ichimoku does not calculate future values of the cloud. Also some values seem to be incorrect. I think it might be better if you code it yourself.
Martin etellerandet
Hi :) I calculated the values myself, I just dont know if I can trust them. I dont know why my values are a little higher than the ones provided my the indicator. I the back test you can see the one I calculated "senkouBCal" (white) and the one from the indicator "senkouB"(yellow). It seems to be consistent that there is around 2 USD in difference between the 2 lines in the y axis if you take intoaccount that they are 26 days apart. the white line needs to be moved 26 days into the future. I guess I will try to see if I can place them on top of each other and see if they are the same. and how big the difference is. besides that is there something wrong with my calculation?
in initialize:
self.rwHigh = RollingWindow[float](52)
self.rwLow = RollingWindow[float](52)
in onData:
lowestLow = min(list(self.rwHigh))
highestHigh = max(list(self.rwHigh))
self.SenkouBCal = (highestHigh + lowestLow) / 2
Martin etellerandet
Now I got the senkou B calculated (senkouBCal) to overlap the inbuild senkouB indicator. but I had to shift it shifted by 28 days. and I still need to lift it around 1-2 USD.
And "senkouACal" overlaps perfectly with senkou A form the inbuild indicator. but only when its shiftet 27 days. hmm I dont get why its 27 and 28 days.
is it my calculation correct? I guess they should only be placed 26 days days in the "future" so whats wrong?
Cloud
yes it's weird, normally you would just have to place them 26 days in the future.
Your calculations seem to be correct
Martin etellerandet
thanks for checking. I still wonder how many days I should project them into the future.. I guess I will go with 26. But it seems to me that "Tradingweiv.com" is using 25..
I still wonder why my senkouBCal is different than their senkouB just the curve itself looks so close. I wonder if quantconnect get their values for high and low some other way? I tried to change the period of to 51 instead of 52 that dosent seam to do it.. However Im at a point now where it seems like I can use it.. but Is quitecomplicated to future users. I hope the team will look at it. I made a bug report. I will put it here when i get the answer :)
Martin etellerandet
the support wrote. :
"Hi Martin,
All Lean indicators are verified with a third party software because we can only compare indicators with the same data. If the OHLC from QuantConnect and TradingView are different, it's normal that the results are different too.
You can found the IchimokuKinkoHyo calculations here: IchimokuKinkoHyo.cs and the data used to verify it is spy_with_ichimoku.csv.
Best regards,
Alex"
But I still wonder about getting the future senkou B correctly. I will try to understand the indicator code.
Martin etellerandet
I finnaly got it to work :) This line is the senkouB of the "future":
self.SenkouBCal=(self.ichimoku.SenkouBMaximum.Current.Value + self.ichimoku.SenkouBMinimum.Current.Value) / 2
here is an example in a project.
Martin etellerandet
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!