OPEN-SOURCE SCRIPT

Previous Day and Week Levels DDT

//version=5
indicator("Previous Day and Week Levels", overlay=true)

// Get the previous day's high, low, and close
previousDayHigh = request.security(syminfo.tickerid, "D", high[1])
previousDayLow = request.security(syminfo.tickerid, "D", low[1])
previousDayClose = request.security(syminfo.tickerid, "D", close[1])

// Get the previous week's high and low
previousWeekHigh = request.security(syminfo.tickerid, "W", high[1])
previousWeekLow = request.security(syminfo.tickerid, "W", low[1])

// Plotting the previous day's high, low, and close
plot(previousDayHigh, color=color.red, linewidth=2, title="Previous Day High", style=plot.style_line)
plot(previousDayLow, color=color.green, linewidth=2, title="Previous Day Low", style=plot.style_line)
plot(previousDayClose, color=color.blue, linewidth=2, title="Previous Day Close", style=plot.style_line)

// Plotting the previous week's high and low
plot(previousWeekHigh, color=color.purple, linewidth=2, title="Previous Week High", style=plot.style_line)
plot(previousWeekLow, color=color.orange, linewidth=2, title="Previous Week Low", style=plot.style_line)

// Optionally, add labels for visual clarity
label.new(bar_index, previousDayHigh, text="Prev Day High", color=color.red, style=label.style_label_up, yloc=yloc.abovebar)
label.new(bar_index, previousDayLow, text="Prev Day Low", color=color.green, style=label.style_label_down, yloc=yloc.belowbar)
label.new(bar_index, previousDayClose, text="Prev Day Close", color=color.blue, style=label.style_label_left, yloc=yloc.abovebar)
label.new(bar_index, previousWeekHigh, text="Prev Week High", color=color.purple, style=label.style_label_up, yloc=yloc.abovebar)
label.new(bar_index, previousWeekLow, text="Prev Week Low", color=color.orange, style=label.style_label_down, yloc=yloc.belowbar)
educationalFractalPivot points and levels

Open-source Skript

Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun das Script auch andere Trader verstehen und prüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden. Die Nutzung dieses Codes in einer Veröffentlichung wird in unseren Hausregeln reguliert. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Möchten Sie dieses Skript auf einem Chart verwenden?

Haftungsausschluss