Matplotlib Tutorial 21 - adding more indicator data to our charts

preview_player
Показать описание
In this Matplotlib tutorial, we cover adding a couple simple functions to calculate data for us to fill our axis with. One is a simple moving average, the other is a simple high minus low calculation for prices.

Рекомендации по теме
Комментарии
Автор

I believe the high_minus_low function can be easily rewritten to work with list this way:

def high_minus_low(highs, lows):
return [i-j for i, j in zip(highs, lows)]

SkielCast
Автор

That is one hell of a way to get a MA!

Locke
Автор

interesting...i'm researching the same process in FSharp...
historical prices in CSV ->  to database (FSharp offers a SQL 'type provider'),
live charting thru webquery,  
custom indicators,
winforms vs WPF
etc etc - its also a point worth noting that MAs are just discrete forms of convolution integrals...
and convolutions are continuous forms of moving averages etc

rickdeckard
Автор

I cannot plot the data from the link you are using please any help regarding this point

mohammedfelioune
Автор

How to add a common x axis to the plot? In this case the MA plot is moving to the left as the first 30 days are ignored.

sukumarhonkote
Автор

I did get a very low number for my len(ma1)i.e. 2, and now even with the [-start:] fix, I'm getting "x and y must have the same first dimension"...

I think I'm not understanding the overall concept though, otherwise perhaps I could've thought up my own handling fix by now. 


Could you offer any help? Thanks!

...Oh, and thanks for all the great videos!!! =)

brade
Автор

Maybe I am just too pedantic. I think that this video should have a title "Matplotlib Tutorial 21 - Adding more indicator data to our charts".

kamilziemian