Description
This is a simple but powerful tool for your trading toolbox and was inspired by Insilico's Hull Suite Ribbon on TV. It's not a full port but with Haas provides even more MA options for you to tinker with. Generates a continuous signal long or short based on ribbon direction.
Requires Pshai’s HMA command:
https://www.haasscripts.com/t/pshaicmd-hull-moving-average-se/
Original Hull Suite: https://www.tradingview.com/script/hg92pFwS-Hull-Suite/
HaasScript
-- Author: Fogg
-- Hull MA Ribbon indicator inspired by Inisilico's Hull Suite
-- Original Hull Suite here: https://www.tradingview.com/script/hg92pFwS-Hull-Suite/
-- Select following MAs for Original Hull Suite types: Inisilico HMA = WMA type, Insilico EHMA = EMA Type, no equivalent for Insilico THMA
-- Get creative with the other MA types
-- Generates continuous Buy/Sell signals based on ribbon status
-- Definitions
DefineCommand('HULLMA_RIBBON', 'HMA Indicator Ribbon')
local chartIndex = DefineParameter(NumberType, 'chartIndex', 'Index to plot Hull Ribbon', true, 0, 'Number')
local length = DefineParameter(NumberType, 'HMA Length', 'HMA Length', true, 50, 'HMA Length - 10-50 for fast HMA, 100-200 for longer swings')
local interval = DefineParameter(NumberType, 'interval', '', false, CurrentInterval(), 'Number, InputInterval')
--INPUT
InputGroupHeader('HULL MA Type')
local hmatype = InputMaTypes('MA Type', WmaType, 'MA Type use to calculate Hull MA. For baseline HMA choose Wma. NOTE - Tema and T3 will return depth limit errors if the Length is too long')
--PRICES
local c = ClosePrices(interval)
local fast, slow = OptimizedForInterval(
interval, function()
-- HMA
local hma = CC_HMA(c, length, hmatype)
--Plots
local FHULL = hma[1]
local SHULL = hma[3]
local h1 = Plot(0, 'FHULL', FHULL, Green)
local h2 = Plot(0, 'SHULL', SHULL, Red)
PlotCloud(h1, h2, 50)
return FHULL, SHULL
end)
-- Signal Conditions
local signal = GetAboveBelowSignal(fast, slow)
--PlotSignalEnum(-2, signal)
DefineOutput(EnumType, signal, 'HMA Signal')
0 Comments
Sign in to leave a comment.
No comments yet. Be the first!