twingall

Correlation Coefficient: Visible Range Dynamic Average R

twingall ที่อัปเดต:   
-Correlation Coefficient with Dynamic Average R (shows R average for the visible chart only, changes as you zoom in or out)
-Label: Vis-Avg-R = Visable Average R
-the Correlation Coefficient function for Pearson's R is taken from "BA🐷 CC" indicator by @balipour (highly recommended; more thorough treatment of R and other stats, but without the dynamic average)
-I wrote this primarily to add a dynamic Average R, showing correlation for arbitrary start times/end times; whether it be the last month, last year, of some specific period from the past (backtest mode)
-I have been using this to get an idea of correlation regimes over time between Bonds vs Stocks (ZB1! vs ES1!).
-As you see from the above, most of 2022 has seen an unusually strong positive correlation between Bonds and Stocks

~~inputs:
-lookback length for calculation of R
-Backtest mode (true by default): displays Average R for ONLY the visible range displayed on any part of chart history (LHS to RHS of screen only)
-source for both Ticker and compared Asset (close, open, high, low, ohlc4.. etc)

~~some other assets worth comparing:
Aussie vs Gold; Aussie vs ES; Btc vs ES; Copper vs ES
เอกสารเผยแพร่:
-changed default to: backtest mode OFF.
-added tooltip (if backtest mode is ON while there is white-space on right hand side of chart, then value will return NaN)
-change default asset to compare to DXY dollar index
เอกสารเผยแพร่:
-Ignore previous release note regarding backtest mode:
--Fixed error in code so that backtest mode always prints correct number (not NaN).
--backtest mode enabled by default: Average R shown for visible chart only
เอกสารเผยแพร่:
-added optional manual mode: show CC (plot and label) based on manual input bars lookback. Default is OFF.

You can buy me a coffee here...

PayPal.Me/twingall
BTC: 3JrhUwNRnKyqhaa1n1AXKeAubNeEFoch6S
ETH erc20: 0x4b0400B1c18503529ab69611e82a934DDe4Ab038
ETH bep20: 0x1F0f03F184079bb1085F8C9dF3a8191C9f5869B3
สคริปต์โอเพนซอร์ซ

ด้วยจิตวิญญาณของ TradingView อย่างแท้จริง ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้ผู้ค้าสามารถเข้าใจและตรวจสอบได้ ไชโยให้กับผู้เขียน! คุณสามารถใช้ได้ฟรี แต่การใช้รหัสนี้ซ้ำในสิ่งพิมพ์อยู่ภายใต้กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?