Evaluating bids

Ajuste em código Pine Script

Published on the September 19, 2024 in IT & Programming

About this project

Open

Preciso apresentar as informações do Data window na vela atual junto o tempo de fechamento da vela, preciso selecionar o tempo da vela para que o indicador mostre apenas as informações do horário especificado, no código de exemplo eu consigo apresentar algumas informações, falta a seleção do tempo, apresentar o tempo de fechamento da vela e validar as informações

//@version=5
indicator("Candle Close Countdown", overlay=true)

// Get data from the Data window
open_price = request.security(syminfo.tickerid, "D", open)
high_price = request.security(syminfo.tickerid, "D", high)
low_price = request.security(syminfo.tickerid, "D", low)
close_price = request.security(syminfo.tickerid, "D", close)
change = close_price - open_price
vol = request.security(syminfo.tickerid, "D", volume)
lastDayChange = close_price - close_price[1]


// Format the information
info = "Open: " + str.tostring(open_price) + "\n" +
      "High: " + str.tostring(high_price) + "\n" +
      "Low: " + str.tostring(low_price) + "\n" +
      "Close: " + str.tostring(close_price) + "\n" +
      "Change: " + str.tostring(change) + "\n" +
      "Volume: " + str.tostring(vol) + "\n" +
      "Last Day Change: " + str.tostring(lastDayChange) + "\n"

// Display the information next to the current candle
label.new(bar_index, high, info, color=color.new(color.blue, 0), style=label.style_label_down)

Project overview

Preciso apresentar as informações do Data window na vela atual junto o tempo de fechamento da vela, preciso selecionar o tempo da vela para que o indicador mostre apenas as informações do horário especificado, no código de exemplo eu consigo apresentar algumas informações, falta a seleção do tempo, apresentar o tempo de fechamento da vela e validar as informações //@version=5 indicator("Candle Close Countdown", overlay=true) // Get data from the Data window open_price = request.security(syminfo.tickerid, "D", open) high_price = request.security(syminfo.tickerid, "D", high) low_price = request.security(syminfo.tickerid, "D", low) close_price = request.security(syminfo.tickerid, "D", close) change = close_price - open_price vol = request.security(syminfo.tickerid, "D", volume) lastDayChange = close_price - close_price[1] // Format the information info = "Open: " + str.tostring(open_price) + "\n" + "High: " + str.tostring(high_price) + "\n" + "Low: " + str.tostring(low_price) + "\n" + "Close: " + str.tostring(close_price) + "\n" + "Change: " + str.tostring(change) + "\n" + "Volume: " + str.tostring(vol) + "\n" + "Last Day Change: " + str.tostring(lastDayChange) + "\n" // Display the information next to the current candle label.new(bar_index, high, info, color=color.new(color.blue, 0), style=label.style_label_down)

Category IT & Programming
Subcategory Web development
Is this a project or a position? Project
I currently have I have specifications
Required availability Part time
Roles needed Developer

Project duration 1 to 3 months

Skills needed

Other projects posted by Itamar S.