Aroon Indicator - Mathematics and stock indicators in Python 16

sentdex · Beginner ·🛠️ AI Tools & Apps ·12y ago

Key Takeaways

Implements the Aroon indicator in Python for stock analysis

Full Transcript

hello and welcome to another mathematics and stock indicators tutorial within python next few videos are going to be discussing this term right here uh arun in the indicator it was developed by tushar shande back in the mid 90s and arun is sanskrit for literally meaning dawn's early light so if that doesn't give you an idea what a rune is here we go it's going to determine whether or not a stock is trending and then that trend strength if it is and the calculation for a rune is pretty simple and this is one of the more simple indicators that we're going to even be covering and so to calculate it it's going to be there's going to be two lines here and you're going to have the arun upline and the roon downline the rune up line is going to be time frame minus how long since the last high divided by that time frame times 100 so it's kind of like a percentage of how long um and that percentage is going to be of whatever time frame you choose so you can choose anything you choose a 5 you can choose a 10 day or something like that but the idea here is how long has it been since the last uh high price right the last highest price so um i wouldn't necessarily recommend you use something as short as like a five it's probably better to use like a 15 to 20 something plus um and then the down is basically the exact same thing only it's just for how long since the last low so with this indicator you could actually forget about dividing by the time frame times 100 for the percentage thing you could just leave it and the indicator will look exactly the same but this is just kind of a way to normalize it if you wanted to compare it to maybe you wanted to compare it to another chart and still display the arun line so yeah you can just keep that in mind now finally that's pretty much it now i'm going to show you guys a few examples including you know what we're going to be doing with this um so let me bring up the charting application here and uh so now uh we'll just pick something we'll do uh we'll do apple first and here it is and we just drag it over here and fit it okay so here's an apple and down here is our room we're using a 20 time period so it's 20 days um although it's probably a little bit more than that so our time frame or the stock here is 10 years so it's probably actually more like 60 days but anyway um so as you can see the idea here we've got you know the arun upline is this green line the room down line is this red line so every time you know this trend starts trending up i mean this thing the arun called it instantly here right as that new high was uh announced and then it keeps hitting new highs so it continues trending up and then you can almost see here where it kind of pops down a little bit there and so the room down is kind of coming up but we're still you know we still have no crossover still had no crossover we didn't even have a crossover until this point here which you know is right here and it did trend down sure enough and then it crossed back over again here and didn't cross over again until really here and then it continued going up and then we finally had you know nice strong downward and sure enough it did go down so honestly for the simplicity of this indicator um i was pretty surprised i've never actually used the iron indicator before i decided i was going to do tutorial video on it and uh pretty interesting indicators say the least you don't really hear too much about this one or at least i didn't but maybe that's just apple right so let's go ahead and let's look at a couple other ones so we'll do let's do ebay ebay has done a lot of fluctuating at least recently it's all year to date ebates you can see how ebay has been doing this year so again you can see here uh where we've got a definite uptrend here sure enough it calls it at about here and then says you know hey you might want to leave right about here um and then again it says you might want to leave right about here and sure enough you should have left uh did signal you here but then told you never mind um really a little bit after so like here um anyway downtrend here uptrend there sure enough i mean it's calling these trends pretty well which again i'm just pretty surprised i didn't have too much faith in this indicator when i was looking at how you calculate it um i should have let me go back here do this hopefully yeah so like if you were looking at a shorter time frame this is an example where you know you might want uh like this would be just under year to date and we're using each little thing is about three days so to give you an idea here let's uh plot let me plot up a one year of ebay we'll keep 20 and see how that looks so let me close out of this and edit the time frame here for us so here is uh still in a room 20 only we're considering one year's data so it's every day right and so as you can see here with a highly volatile stock you're kind of getting late signals right so you're getting signaled that it's an uptrend here and you're getting signaled that never mind here and then you're getting signal up trend again here at the peak of this stock and so on so again i'd like to use ebay because ebay is like one of the most volatile like up down up down up down up down stocks like this year to date uh at least that everybody knows about and so that's a good example whereas you can compare this to maybe a company like tesla who's just only recently started coming down but for the most part was just an uptrend the whole way um it was actually quite accurate so for for i would say you know long-term investing uh this is actually a pretty decent pretty decent indicator right um because here in this scenario with a nice level non-highly volatile stock you can see here that indeed it it would have made you money to trade it with tesla but of course tesla was going up the whole time but you can see where tesla's going down here and if you were warned of that you know really right here which is quite a good warning because you know the crossover the moving average was pretty late as well so um for later than this anyway uh that's that with uh this this rune indicator in the next video what we're going to be talking about is actually programming this rune indicator into python and then after that we're going to actually uh graph it up just like this so you guys can play with it yourself and see what you think so anyway stay tuned for the next video as always thanks for watching thanks for the support of the subscriptions and until next time

Original Description

This video introduces you to the Aroon indicator and its purpose with some examples. The purpose of this series is to teach mathematics within python. To do this, we will be working with a bunch of the more popular stock indicators used with technical analysis. With most of the indicators, we will first discuss them, their purpose, then teach how to program them into python, then actually display them on a chart. The basic charting application comes from a previous tutorial series, here: http://www.youtube.com/playlist?list=PLQVvvaa0QuDcR-u9O8LyLR7URiKuW-XZq Required files: Sample Code for the actual charting parts: http://sentdex.com/sentiment-analysisbig-data-and-python-tutorials-algorithmic-trading/python-matplotlib-sample-code-charting-stocks-python/ Python: http://python.org Numpy: http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy Matplotlib: http://matplotlib.org/downloads.html Sentdex.com Facebook.com/sentdex Twitter.com/sentdex
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from sentdex · sentdex · 0 of 60

← Previous Next →
1 Matplotlib Python Tutorial Part 1: Basics and your first Graph!
Matplotlib Python Tutorial Part 1: Basics and your first Graph!
sentdex
2 Python Encryption Tutorial with PyCrypto
Python Encryption Tutorial with PyCrypto
sentdex
3 Python's Logging Function
Python's Logging Function
sentdex
4 wxPython Tutorials 1: Making Windows GUIs with Python : Installing + 1st window!
wxPython Tutorials 1: Making Windows GUIs with Python : Installing + 1st window!
sentdex
5 wxPython Tutorials 2: Making Windows GUIs with Python: Customizing Window Parameters
wxPython Tutorials 2: Making Windows GUIs with Python: Customizing Window Parameters
sentdex
6 wxPython Programming Tutorial 3: Menu Bar and Menu Button
wxPython Programming Tutorial 3: Menu Bar and Menu Button
sentdex
7 wxPython Programming Tutorial 4: Panels
wxPython Programming Tutorial 4: Panels
sentdex
8 wxPython Programming Tutorial 5: User Input Saved To Variables
wxPython Programming Tutorial 5: User Input Saved To Variables
sentdex
9 wxPython Programming Tutorial 6: Multiple Choice Input
wxPython Programming Tutorial 6: Multiple Choice Input
sentdex
10 wxPython Programming Tutorial 7: Adding Static Text and Colors
wxPython Programming Tutorial 7: Adding Static Text and Colors
sentdex
11 wxPython Programming Tutorial 8: Custom Button Images
wxPython Programming Tutorial 8: Custom Button Images
sentdex
12 wxPython Programming Tutorial 9: Tool Bar Items and Sub Menus!
wxPython Programming Tutorial 9: Tool Bar Items and Sub Menus!
sentdex
13 Basic PHP Tutorial 13: Multi-dimensional Array
Basic PHP Tutorial 13: Multi-dimensional Array
sentdex
14 Basic PHP Tutorial 15: Functions and Global Variables
Basic PHP Tutorial 15: Functions and Global Variables
sentdex
15 Basic PHP Tutorial 12: Associative Array
Basic PHP Tutorial 12: Associative Array
sentdex
16 Basic PHP Tutorial 14: Foreach loop
Basic PHP Tutorial 14: Foreach loop
sentdex
17 Basic PHP Tutorial 16: Include and Require
Basic PHP Tutorial 16: Include and Require
sentdex
18 Basic PHP Tutorial 7: Assignment, comparison and Logical operators
Basic PHP Tutorial 7: Assignment, comparison and Logical operators
sentdex
19 Basic PHP Tutorial 4: Variables and Comments
Basic PHP Tutorial 4: Variables and Comments
sentdex
20 Basic PHP Tutorial 11: Arrays part 1, basic array
Basic PHP Tutorial 11: Arrays part 1, basic array
sentdex
21 Basic PHP Tutorial 6: If else and else if conditionals cont'd
Basic PHP Tutorial 6: If else and else if conditionals cont'd
sentdex
22 Basic PHP Tutorial 1: Intro to PHP
Basic PHP Tutorial 1: Intro to PHP
sentdex
23 Basic PHP Tutorial 3: HTML with PHP
Basic PHP Tutorial 3: HTML with PHP
sentdex
24 Basic PHP Tutorial 9: While Loop
Basic PHP Tutorial 9: While Loop
sentdex
25 Basic PHP Tutorial 10: Switch Statement
Basic PHP Tutorial 10: Switch Statement
sentdex
26 Basic PHP Tutorial 2: Print and Echo
Basic PHP Tutorial 2: Print and Echo
sentdex
27 Basic PHP Tutorial 5: If else and else if conditional statements
Basic PHP Tutorial 5: If else and else if conditional statements
sentdex
28 Basic PHP Tutorial 8: Arithmatic Operators: Doing math with php
Basic PHP Tutorial 8: Arithmatic Operators: Doing math with php
sentdex
29 Basic PHP Tutorial 17: User Input Form Example / String Manipulation
Basic PHP Tutorial 17: User Input Form Example / String Manipulation
sentdex
30 Basic PHP Tutorial 18: HTML Entities and forms cont'd
Basic PHP Tutorial 18: HTML Entities and forms cont'd
sentdex
31 Basic PHP Tutorial 19: Finding words in strings
Basic PHP Tutorial 19: Finding words in strings
sentdex
32 Basic PHP Programming Tutorial 20: Saving to a File / writing and appending
Basic PHP Programming Tutorial 20: Saving to a File / writing and appending
sentdex
33 Basic PHP Programming Tutorial 22: Hashing part 2: salting
Basic PHP Programming Tutorial 22: Hashing part 2: salting
sentdex
34 Basic PHP Programming Tutorial 23: Variables in Strings and tokenizing
Basic PHP Programming Tutorial 23: Variables in Strings and tokenizing
sentdex
35 Basic PHP Programming Tutorial 21: MD5 Hashing For Security
Basic PHP Programming Tutorial 21: MD5 Hashing For Security
sentdex
36 Basic PHP Programming Tutorial 24: String similarity
Basic PHP Programming Tutorial 24: String similarity
sentdex
37 Basic PHP Programming Tutorial 25: Time and Time stamps
Basic PHP Programming Tutorial 25: Time and Time stamps
sentdex
38 Basic PHP Programming Tutorial 26: Die and Exit
Basic PHP Programming Tutorial 26: Die and Exit
sentdex
39 Basic PHP Programming Tutorial 27: MySQL Databases Part 1
Basic PHP Programming Tutorial 27: MySQL Databases Part 1
sentdex
40 Basic PHP Programming Tutorial 28: MySQL Database Part 2: Reading From Database
Basic PHP Programming Tutorial 28: MySQL Database Part 2: Reading From Database
sentdex
41 Basic PHP Programming Tutorial 29: MySQL Database Part 3: Inputting Data
Basic PHP Programming Tutorial 29: MySQL Database Part 3: Inputting Data
sentdex
42 Basic PHP Programming Tutorial 30: MySQL database in Use
Basic PHP Programming Tutorial 30: MySQL database in Use
sentdex
43 Django Tutorial Web Development with Python Part 1: Installing Django
Django Tutorial Web Development with Python Part 1: Installing Django
sentdex
44 Python Tutorial: File Deletion and Folder Deletion / directory deletion
Python Tutorial: File Deletion and Folder Deletion / directory deletion
sentdex
45 Python Tutorial: How to Rename Files and Move Files with Python
Python Tutorial: How to Rename Files and Move Files with Python
sentdex
46 3D Graphs in Matplotlib for Python: Basic 3D Line
3D Graphs in Matplotlib for Python: Basic 3D Line
sentdex
47 3D Plotting in Matplotlib for Python: 3D Scatter Plot
3D Plotting in Matplotlib for Python: 3D Scatter Plot
sentdex
48 3D Charts in Matplotlib for Python: Multiple datasets scatter plot
3D Charts in Matplotlib for Python: Multiple datasets scatter plot
sentdex
49 Sikuli Tutorial 1: Visually programming in python!
Sikuli Tutorial 1: Visually programming in python!
sentdex
50 Sikuli Tutorial 2: Program visually in python!
Sikuli Tutorial 2: Program visually in python!
sentdex
51 Sikuli Tutorial 3: Program visually in python!
Sikuli Tutorial 3: Program visually in python!
sentdex
52 3D Bar Charts in Python and Matplotlib
3D Bar Charts in Python and Matplotlib
sentdex
53 3D Plane wire frame Graph Chart in Python
3D Plane wire frame Graph Chart in Python
sentdex
54 Raspberry Pi Part 1 Introduction
Raspberry Pi Part 1 Introduction
sentdex
55 Raspberry Pi Part 8: First Download and Update! (Firmware)
Raspberry Pi Part 8: First Download and Update! (Firmware)
sentdex
56 Raspberry Pi Part 10: How to set up a Linux Web Server on your Pi
Raspberry Pi Part 10: How to set up a Linux Web Server on your Pi
sentdex
57 Raspberry Pi Part 11: Remote Desktop
Raspberry Pi Part 11: Remote Desktop
sentdex
58 Twitter Analysis: How to rank a user's influence
Twitter Analysis: How to rank a user's influence
sentdex
59 GPIO Tutorial for Pi Part 2 - Programming the GPIO
GPIO Tutorial for Pi Part 2 - Programming the GPIO
sentdex
60 GPIO Tutorial for Raspberry Pi Part 1 - Setting up
GPIO Tutorial for Raspberry Pi Part 1 - Setting up
sentdex

Related Reads

📰
AI is reducing quality
AI-generated content can lack quality and coherence, learn how to improve your writing and avoid common pitfalls
Dev.to AI
📰
The Shift From Prompting to Building: How Beginners Are Creating Real Apps Without Writing Code
Beginners can now create real apps without writing code, thanks to new AI-powered tools, and this shift is changing the way we approach software development
Medium · AI
📰
Video Clipper: An Open-Source Video Processing Tool with Python, PySide6, and FFmpeg
Learn to build a video processing tool using Python, PySide6, and FFmpeg with Video Clipper
Dev.to · Developer zouraiz
📰
10 Free AI Tools That Feel Like Magic in 2026
Discover 10 free AI tools that can streamline tasks and improve productivity, and learn how to apply them in your daily work
Medium · AI
Up next
How an AI tool helped a student create a resume when no human help was available #shorts
EDUCAUSE
Watch →