Skip to main content

Posts

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...
Recent posts

QQE LINE

function QQELine( indiValue, deltaRSIValue, smoothPeriod ) { local prevVal, prevIndi, qqeValue, indi_sum; local indi_diff, higherCond, lowerCond, result; prevVal = prevIndi = 0; qqeValue = Null; indi_sum = indiValue + deltaRSIValue; indi_diff = indiValue - deltaRSIValue; for ( i = 1; i < BarCount; i++ ) { prevVal = qqeValue[i - 1]; prevIndi = indiValue[i - 1]; higherCond = prevIndi > prevVal AND indiValue[i] > prevVal; lowerCond = prevIndi < prevVal AND indiValue[i] < prevVal; qqeValue[i] = Iif( indiValue[i] == prevVal, prevVal, Iif( lowerCond, Min( prevVal, indi_sum[i] ), Iif( higherCond, Max( prevVal, indi_diff[i] ), Iif( indiValue[i] > prevVal, indi_diff[i], indi_sum[i] ) ) ) ); } result = EMA( qqeValue, smoothPeriod );// EL XAverage is EMA return result; } // Modified Exponential Moving Average function MEMA( Price, Period ) { local smoothing, result; smoothing = 1 / Max( 1, Period ); result = AMA( Pric...

Order vol free

_SECTION_BEGIN( "Ord Volume"); ZigPercent = Param( "Percent of Change for Zig", 4.6, 0, 50, 0.1 ); ZigUpColor = ParamColor( "Up Color", colorDarkBlue ); ZigDownColor = ParamColor( "Down Color", colorViolet ); ZerRedVol = Param( "Zeros to Reduce from Volume", 3, 0, 8, 1 ); SwingXoffset = Param( "Swing X Position", 3, -10, 30, 1 ); SwingYoffset = Param( "Swing Y Position", 1, 0, 30, 0.2 ); Color_LVT = ParamColor( "Leg Volume Text Color", colorWhite ); Color_LPTS = ParamColor( "Leg % Text Color Simple", colorGrey50 ); Color_LPTH = ParamColor( "Leg % Text Color Highlighted", colorBlack ); Color_LPBH = ParamColor( "Leg % Background Highlighted", colorYellow ); LegYoffset = Param( "Leg Y Position", 1.5, 0, 10, 0.1 ); RedVol = IIf( ZerRedVol == 0, 1,  IIf( ZerRedVol == 1, 10, IIf( ZerRedVol == 2, 100, IIf( ZerRedVol == 3, 1000, IIf( ZerRedVol == 4, 10000, IIf( ZerRedVol == ...

Pocket pivots

What is a pocket pivot trade? It lets you buy early in the base before the break out. So your average cost by buying the pocket pivot, then the base breakout, is lower than had you just bought the base breakout alone. You are also in a psychologically stronger position to hold onto the stock instead of getting whipped out of your position, which has been common in the 2000s. As with breakouts, you want to focus on fundamentally and technically strong stocks in leading industry groups. The day’s volume should be larger than the highest down volume day over the prior 10 days. Ten Rules for Pocket Pivots 1.As with base breakouts, proper pocket pivots should emerge within or out of constructive basing patterns. 2.The stock’s fundamentals should be strong, i.e., excellent earnings, sales, pretax margins, ROE, strong leader in its space, etc. 3.The day’s volume should be larger than the highest down volume day over the prior 10 days. 4.If the pocket pivot occurs in an uptrend...

NR explorers

1st //// Filter conditions  NR21 = (H - L) < Ref(LLV(H-L,20) ,-1); InsideBar = ((H < Ref(H,-1)) AND (Low > Ref(L,-1))); NR4 = (H - L) < Ref(LLV(H-L,3), -1); NR7 = (H - L) < Ref(LLV(H-L,6), -1); //// Scan the list for stocks matching the criteria Filter = (NR21 OR NR4 OR NR7) AND InsideBar ; AddColumn(H, "High",1.2 ); AddColumn(L, "Low ",1.2 ); AddColumn(H-L, "Range",1.2 ); AddColumn(C, "Close ",1.2 ); AddColumn(Volum e, "Volume ",1.0 ); AddColumn(ATR(8 ), "ATR 8 ",1.2 ); AddColumn(High,  "Buy Above",1.2 ); AddColumn(Low, "Sell Below",1.2 ); color1 = IIf(NR4, colorGreen, IIf(NR7, colorBlue, IIf(NR21, colorRed,colorB lack))); AddTextColumn(W riteIf((NR4),"N R4",WriteIf(NR7 ,"NR7",WriteIf( NR21,"NR21"," ")))," ",1.2,color1); 2nd  //// Filter conditions  NR21 = (H - L) < Ref(LLV(H-L,20) ,-1); InsideBar = ...