Last active
May 27, 2024 23:11
-
-
Save NVentimiglia/7c71feb025789f6ddcf6cc6ddc8ffbac to your computer and use it in GitHub Desktop.
ThinkScript : IV Correlation, use to identify divergences in implied and realized volatility
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# https://github.com/NVentimiglia | |
# Nic_IVCorrelation | |
# ThinkScript : IV Correlation, use to identify divergences in implied and realized volatility | |
# | |
declare lower; | |
input length = 10; | |
def ImpVol = IMP_VOLATILITY(); | |
plot Correlation = correlation(close, ImpVol, length); | |
Correlation.DefineColor("Positive", Color.DOWNTICK); | |
Correlation.DefineColor("Negative", Color.UPTICK); | |
Correlation.AssignValueColor(if Correlation >= 0 then Correlation.Color("Positive") else Correlation.Color("Negative")); | |
Correlation.SetPaintingStrategy(PaintingStrategy.HISTOGRAM); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment