offset = 2 // How many bars to the left to set the right side of the speedometer radius = 10 // Radius in bars of the semi circle y_axis = 0.00 // Where to place the y axis y_scale = 100 // Y axis scaling. 100 by default will size the semicircle to fit with for example RSI or any other oscillator with a 0..100 range
var float pi = 2 * asin(1) // Required variables needed for calculations
x_axis = array.new_int(radius * 2, 0) for i = offset to offset + 2 * radius - 1 array.set(x_axis, i - offset, time)
metric = rsi(src, len) // RSI is already 0..100 so no modification needed.
// Draw the needle and title using the metric f_draw_needle(metric, x_center, radius, y_axis, y_scale, color.blue, 1) f_draw_title_label(25, x_center, y_axis, y_scale, color.blue, color.black, "TRENDMETER")
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.