Input trueRangeAverageType = AverageType.SIMPLE ĭef shifthigh = factorhigh * MovingAverage(trueRangeAverageType, TrueRange(high, close, low), length) ĭef shiftMid = factormid * MovingAverage(trueRangeAverageType, TrueRange(high, close, low), length) ĭef shiftlow = factorlow * MovingAverage(trueRangeAverageType, TrueRange(high, close, low), length) ĭef average = MovingAverage(averageType, price, length) ĭef UpperBandKCLow = average + shiftlow ĭef LowerBandKCLow = average - shiftlow ĭef UpperBandKCMid = average + shiftMid ĭef LowerBandKCMid = average - shiftMid ĭef UpperBandKCHigh = average + shifthigh ĭef LowerBandKCHigh = average - shifthigh ĭef K = (Highest(high, length) + Lowest(low, length)) /ĭef momo = Inertia(price - K / 2, length) ĭef dn = momo LowerBandKCLow and UpperBandBB LowerBandKCMid and UpperBandBB LowerBandKCHigh and UpperBandBB < UpperBandKCHigh He provided this image with the comparison of the indicator which is the one on the very bottom.#Assembled by TheBewb using existing Mobius Squeeze Momentum coding and "squeeze" concept made popular by John Carter.ĭef sDev = StDev(data = price, length = length) ĭef MidLineBB = MovingAverage(averageType, data = price, length = length) ĭef LowerBandBB = MidLineBB + Num_Dev_Dn * sDev ĭef UpperBandBB = MidLineBB + Num_Dev_up * sDev # End Code V02 Momentum Squeeze shared this on Discord. Plot "-1" = if IsNaN(c) then Double.NaN else -1 Plot "1" = if IsNaN(c) then Double.NaN else 1 Plot "0" = if !IsNaN(Squeeze) or IsNaN(c) then Double.NaN else 0 01ĪddLabel(Squeeze, "Squeeze", Color.YELLOW) ![]() Plot Squeeze = if ((W - Sq) / (B - Sq)) <=. Momo.SetPaintingStrategy(PaintingStrategy.HISTOGRAM) Plot Momo = Inertia((c - mean) / SD, Floor(n )) # New faster Momentum Oscillator with outer band markers. SignalUp.SetPaintingStrategy(PaintingStrategy.Arrow_Up) Plot signalUp = if(bullishCross, 0, Double.NAN) Plot bullishCross = Crosses(SAR, price, CrossingDirection.BELOW) SignalDown.AssignValueColor(Color.DOWNTICK) SignalDown.SetPaintingStrategy(PaintingStrategy.Arrow_Down) Plot signalDown = if(bearishCross, 0, Double.NAN) Plot bearishCross = Crosses(SAR, price, CrossingDirection.ABOVE) Plot MS2 = Average(Average(price, LongLength1) - Average(price, LongLength2), LongLength3) ĭef MS2Yellows = if (MS2 0 and PerB < 0 then color.GREEN else color.WHITE) ĭef SAR = ParabolicSAR(accelerationFactor = accelerationFactor, accelerationLimit = accelerationLimit) Plot MS = Average(Average(price, ShortLength1) - Average(price, ShortLength2), ShortLength3) Optimal Short Sequence is the reverse of the above (histogram from dark green to light green, red squeeze indicators firing, and red arrow for bearish Parabolic SAR crossover).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |