커뮤니티

지표 전환 부탁드립니다

프로필 이미지
고저중
2024-12-20 12:46:00
578
글번호 186441
답변완료
//@version=6 indicator("Intraday Volume", overlay=false) // Define session times for the market open and close session_start = timestamp("GMT-5", year, month, dayofmonth, 9, 35) // 9:30 AM EST session_end = timestamp("GMT-5", year, month, dayofmonth, 15, 55) // 4:00 PM EST // Check if the current time is within the intraday session is_intraday_session = time >= session_start and time < session_end // Accumulate volume during the intraday session var float intraday_volume = na if (is_intraday_session) intraday_volume := volume // volume nz(intraday_volume) == 0 ? volume : na else intraday_volume := na // Reset volume outside the session // Plot the intraday volume candle_color() => if open > close color.red else color.green plot(intraday_volume, title="Intraday Volume", color=candle_color(), style=plot.style_columns) // Optional: Add a horizontal line for visual reference hline(0, "Zero Line", color=color.gray)
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2024-12-20 16:26:04

안녕하세요 예스스탁입니다. input : session_start(93000),session_end(160000); if stime >= session_start and stime < session_end Then plot1(v,"Intraday Volume",iff(O>C,Red,Blue)); Else NoPlot(1); 즐거운 하루되세요 > 고저중 님이 쓴 글입니다. > 제목 : 지표 전환 부탁드립니다 > //@version=6 indicator("Intraday Volume", overlay=false) // Define session times for the market open and close session_start = timestamp("GMT-5", year, month, dayofmonth, 9, 35) // 9:30 AM EST session_end = timestamp("GMT-5", year, month, dayofmonth, 15, 55) // 4:00 PM EST // Check if the current time is within the intraday session is_intraday_session = time >= session_start and time < session_end // Accumulate volume during the intraday session var float intraday_volume = na if (is_intraday_session) intraday_volume := volume // volume nz(intraday_volume) == 0 ? volume : na else intraday_volume := na // Reset volume outside the session // Plot the intraday volume candle_color() => if open > close color.red else color.green plot(intraday_volume, title="Intraday Volume", color=candle_color(), style=plot.style_columns) // Optional: Add a horizontal line for visual reference hline(0, "Zero Line", color=color.gray)