Skip to main content

Posts

Showing posts from 2023

Real Relative Strength Tradingview PineScript

  // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // © WorkPiece 12.28.21 // @version=5 indicator ( title = "Real Relative Strength" , shorttitle = "RRS" ) comparedWithSecurity = input.symbol ( title = "Compare With" , defval = "SPY" ) length = input ( title = "Length" , defval = 12 ) //##########Rolling Price Change########## comparedClose = request.security ( symbol = comparedWithSecurity , timeframe = "" , expression = close ) comparedRollingMove = comparedClose - comparedClose [ length ] symbolRollingMove = close - close [ length ] //##########Rolling ATR Change########## symbolRollingATR = ta.atr ( length ) [ 1 ] comparedRollingATR = request.security ( symbol = comparedWithSecurity , timeframe = "" , expression = ta.atr ( length ) [ 1 ] ) //##########Calculations########## powerIndex = comparedRollingMove / comparedRolli...