Description
Greeting!
I am a newbie in Python, and I greatly appreciate this brilliantly made built-in package for visualization of yfinance data.
I am learning and trying to plot the Ichimoku Cloud Chart, and found that the plot displayed would show with the x-axis limited at the latest data date, while the Ichimoku indicator actually would plot the cloud area 26days into future.
I tried to extend the x-axis using the xlim() function to extend 1 month into future, but the cloud still is not shown in the plot.
I have checked and make sure that in my calculations, the shift() function is applied to the calculation of the 3 lines, Leading Span A, Leading Span B, and Lagging Span. Thus I believe that there would be data to be plotted for the future date.
The first chart below is the plot generated from my broken code.
And the lower chart is a chart I got from a free online platform. I target to make my plot look more or less like this.
May I get help on how I can correctly plot the cloud for the Ichimoku chart?
Thanks in advance.
This is the chart plotted from my broken python code
This is the chart I got from a free online platform. I target to make my plot look more or less like this.