INVITE-ONLY SCRIPT

Momentum Table View (Bar-Based)

11
// NOTE:
// This script uses bar-based lookbacks instead of calendar months.
// Approximate conversions for daily charts:
// - 21 bars ≈ 1 month
// - 63 bars ≈ 3 months
// - 252 bars ≈ 1 year
// For other timeframes, adjust accordingly for different time periods and needs.
// For hourly I have it set at 24*5, 24*5*4 and then finally 24*5*4 to give the same,
// daily, weekly and monthly aggregate returns but on the hourly scale.
// Of course you can split it anyway you like as well depends on the expected needs you have.
Running idea so there will likely be revisions to the z scoring to possibly a different method and the atan angle represented in the code will also likely be changed at some point as to maybe a regression method. These changes will take time as this is only a secondary platform for me not the main source of data. In saying that the table has the data representing the log returns of an asset of n bars which I decided on over the original more accurate daily, weekly and monthly close points which the user can always specify using this method if wanting to be more accurate with the standard method of momentum returns factor.

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.