[Giankam] Trail Blaze

1 815 Views No Comments 1 year ago
HTS 3.XSTABLE
  • The main set of features includes:

    Three independent trailing types each with their own +/- multipliers:
    – Standard % change
    – ATR (aka Supertrend)
    – IQR (inter-quartile range)
    These can be used in isolation or summed together. A subsequent pair of direction specific multipliers are also included.

    Example:

    local atrLength = Input('atrLength', 8)
    local atrMult = Input('atrMult', 1)
    local tslPercent = Input('Trailing %', 0)
    local triggerLength = Input('triggerLength', 2)
    local centreLength = Input('centreLength', 8)
    local iqrLength = Input('iqrLength', 12)
    local iqrMult = Input('iqrMult', 0)
    local loMult = Input('loMult', 1)
    local hiMult = Input('loMult', 1)
    local filterSum = Input('filterSum', false)

    local trlBlz = CC_Trail_Blaze(atrLength, atrMult, tslPercent, triggerLength, centreLength, iqrLength,iqrMult, loMult,hiMult, filterSum)

    if trlBlz.trnd == 1 then
    PlotShapes(
    Plot(0, 'up', trlBlz.lostp, {w = 1, c=Aqua(100), s=Smooth, id = NewGuid()}),
    ShapeCircle,Aqua
    )

    elseif trlBlz.trnd == -1 then

    PlotShapes(
    Plot(0, 'down', trlBlz.histp, {w = 1, c=Purple(100), s=Smooth, id = NewGuid()}),
    ShapeCircle, Purple
    )

    end

    HaasScript Code
    Sign in or Register to download for free
Login or Register to Comment

Unlock your crypto trading potential

Create a free account and enjoy everything we have to offer.

Join for Free