Pine Script Mastery Course: https://courses.theartoftrading.com/c...
FREE Pine Script Basics Course: https://courses.theartoftrading.com/c...
Source Code: https://courses.theartoftrading.com/p...
Lesson Resources:
TradingView Array Blog: https://www.tradingview.com/blog/en/a...
TradingView Array Documentation: https://www.tradingview.com/pine-scri...
Array Diagram: https://media.geeksforgeeks.org/wp-co...
FIFO/Stack Diagram: https://4cawmi2va33i3w6dek1d7y1m-wpen...
Covariance Definition: https://www.investopedia.com/terms/c/...
Correlation Definition: https://www.investopedia.com/terms/c/...
My Indicators: https://zenandtheartoftrading.com/ind...
Create Your FREE TradingView Account: https://www.tradingview.com/gopro/?of...
Want to learn Pine Script? Look no further. I have you covered!
This lesson demonstrates how to use array functions in Pine Script to calculate the correlation coefficient (and covariance) of two different markets.
With over 15 years of coding experience and 4+ years of trading experience, I specialize in TradingView's Pine Script programming language and I'm here to pass on everything I've learned about both trading and coding.
If you want more information about who I am and what I do, head over to https://zenandtheartoftrading.com/about.
▼Timestamps▼
00:00 - Intro
04:30 - What Are Arrays?
06:35 - Get User Input
08:40 - Calculate % Change of Markets
12:55 - Declaring A Float Array
16:45 - FIFO vs Stack Arrays
17:57 - Adding Data to an Array
20:20 - What is Covariance?
21:10 - Calculating Array Covariance
24:56 - What is the Correlation Coefficient?
27:10 - Getting Array's Standard Deviation
28:19 - Calculating Array Correlation
29:33 - Summary & Analysis
35:08 - PineScriptMastery.com
#PineScript #TradingView #Indicator