Untitled
unknown
plain_text
a year ago
3.8 kB
5
Indexable
//@version=5 indicator('dcademo', shorttitle='dcademo', overlay=true) colUp = color(#2962ff) // Mavi renk colDn = color(#f23645) // Kırmızı renk length = input(6, title='Length') length2 = input(9, title='Length2') low_values = array.new_float(0) high_values = array.new_float(0) var bool plotDotLow = false var bool plotDotHigh = false var bool plotDotLow2 = false var bool plotDotHigh2 = false for i = 0 to math.max(length, length2) - 1 by 1 array.push(low_values, low[i]) array.push(high_values, high[i]) if array.get(low_values, 0) < array.get(low_values, 1) and array.get(low_values, 1) < array.get(low_values, 2) and array.get(low_values, 2) < array.get(low_values, 3) and array.get(low_values, 3) < array.get(low_values, 4) and array.get(low_values, 4) < array.get(low_values, 5) plotDotLow := true plotDotLow else plotDotLow := false plotDotLow if array.get(high_values, 0) > array.get(high_values, 1) and array.get(high_values, 1) > array.get(high_values, 2) and array.get(high_values, 2) > array.get(high_values, 3) and array.get(high_values, 3) > array.get(high_values, 4) and array.get(high_values, 4) > array.get(high_values, 5) plotDotHigh := true plotDotHigh else plotDotHigh := false plotDotHigh if array.get(low_values, 0) < array.get(low_values, 1) and array.get(low_values, 1) < array.get(low_values, 2) and array.get(low_values, 2) < array.get(low_values, 3) and array.get(low_values, 3) < array.get(low_values, 4) and array.get(low_values, 4) < array.get(low_values, 5) and array.get(low_values, 5) < array.get(low_values, 6) and array.get(low_values, 6) < array.get(low_values, 7) and array.get(low_values, 7) < array.get(low_values, 8) plotDotLow2 := true plotDotLow2 else plotDotLow2 := false plotDotLow2 if array.get(high_values, 0) > array.get(high_values, 1) and array.get(high_values, 1) > array.get(high_values, 2) and array.get(high_values, 2) > array.get(high_values, 3) and array.get(high_values, 3) > array.get(high_values, 4) and array.get(high_values, 4) > array.get(high_values, 5) and array.get(high_values, 5) > array.get(high_values, 6) and array.get(high_values, 6) > array.get(high_values, 7) and array.get(high_values, 7) > array.get(high_values, 8) plotDotHigh2 := true plotDotHigh2 else plotDotHigh2 := false plotDotHigh2 if array.size(low_values) > math.max(length, length2) array.shift(low_values) if array.size(high_values) > math.max(length, length2) array.shift(high_values) // Mavi görsel plotshape(series=(plotDotLow or plotDotLow2) and (bar_index % length == 0 or bar_index % length2 == 0) ? low : na, color=colUp, style=shape.circle, location=location.absolute, size=size.tiny) plotshape(series=(plotDotLow or plotDotLow2) and (bar_index % length == 0 or bar_index % length2 == 0) ? low : na, color=color.new(colUp, 50), style=shape.circle, location=location.absolute, size=size.small) plotshape(series=(plotDotLow or plotDotLow2) and (bar_index % length == 0 or bar_index % length2 == 0) ? low : na, color=color.new(colUp, 75), style=shape.circle, location=location.absolute, size=size.normal) // Kırmızı görsel plotshape(series=(plotDotHigh or plotDotHigh2) and (bar_index % length == 0 or bar_index % length2 == 0) ? high : na, color=colDn, style=shape.circle, location=location.absolute, size=size.tiny) plotshape(series=(plotDotHigh or plotDotHigh2) and (bar_index % length == 0 or bar_index % length2 == 0) ? high : na, color=color.new(colDn, 50), style=shape.circle, location=location.absolute, size=size.small) plotshape(series=(plotDotHigh or plotDotHigh2) and (bar_index % length == 0 or bar_index % length2 == 0) ? high : na, color=color.new(colDn, 75), style=shape.circle, location=location.absolute, size=size.normal)
Editor is loading...
Leave a Comment