--C:/QUIK/LuaIndicators/Include/eunic-brussels.euction myExtr()local HH, LL, mH, mL, imH, imL localfunction SetL(oH, oL, oi, min_hl)if oH > mH then mH, imH = oH, oi ifnot LL thenif oH - mL >= min_hl then LL = mL SetValue(imL,1, LL) mL, imL = oL, oi HH =nilendelse mL, imL = oL, oi endif HH and oH >= HH then HH =nilendendendlocalfunction SetH(oH, oL, oi, min_hl)if oL < mL then mL, imL = oL, oi ifnot HH thenif mH - oL >= min_hl then HH = mH SetValue(imH,2, HH) mH, imH = oH, oi LL =nilendelse mH, imH = oH, oi endif LL and oL <= LL then LL =nilendendendreturnfunction(oi, min_hl, i)if i <= oi then mH, mL = H(oi), L(oi) imH, imL = oi, oi HH, LL =nil,nilreturnend local oH, oL = H(oi), L(oi)if imL < imH then SetL(oH, oL, oi, min_hl) SetH(oH, oL, oi, min_hl)else SetH(oH, oL, oi, min_hl) SetL(oH, oL, oi, min_hl)endendend |