OPEN-SOURCE SCRIPT

Highlight 10-11 AM NY

34
//version=5
indicator("Highlight 10-11 AM NY", overlay=true)

// Inputs for flexibility
startHour = input.int(10, "Start Hour (NY time)")
endHour = input.int(11, "End Hour (NY time)")

// Check if the current bar is within the session (uses chart time zone)
inSession = (hour(time, syminfo.timezone) >= startHour) and (hour(time, syminfo.timezone) < endHour)

// Highlight background
bgcolor(inSession ? color.new(color.yellow, 85) : na)

כתב ויתור

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