OPEN-SOURCE SCRIPT

3s vs 10s Up/Down

55
//version=5
indicator("3s vs 10s Up/Down", overlay=true, scale=scale.none)

three_sec_diff = close - request.security(syminfo.tickerid, "3S", close[1])
ten_sec_diff = close - request.security(syminfo.tickerid, "10S", close[1])

faster_up = three_sec_diff > ten_sec_diff
faster_down = three_sec_diff < ten_sec_diff
col = faster_up ? color.green : faster_down ? color.red : color.gray

// Plot a shape at the top of each bar
plotshape(series=true, location=location.top, color=col, style=shape.circle, size=size.large, title="Speed Tick Light")

// Optional: only display on the last bar for dashboard style light
show_light = barstate.islast
plotshape(series=show_light, location=location.top, color=col, style=shape.circle, size=size.huge, title="Current Tick Light")

כתב ויתור

המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.