커뮤니티

문의

프로필 이미지
레전드
2025-11-24 08:03:00
42
글번호 228338
답변완료

//@version=4 study("Highest High, Lowest Low", shorttitle="HHLL", overlay=true)

topPer          = input(20,    "Top Band Lookback Period") botPer          = input(20,    "Bot Band Lookback Period") maPer           = input(20,      "Moving Average Pereiod") topSrc          = input(high) botSrc          = input(low)

top             = highest(topSrc, topPer) bot             = lowest(botSrc,  botPer)

plot(top,       "Highest Band",  #00ff00) plot(bot,       "Lowest Band",   #ff0000) plot(sma(close, maPer), "Moving Average", #00ffff)

if close > top     alert("Price Crossing Highest High") if close < bot     alert("Price Crossing  Lowest Low")
예스로 부탁드립니다

지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2025-11-24 14:20:26

안녕하세요 예스스탁입니다. input : topPer(20); input : botPer(20); input : maPer(20); input : topSrc(high); input : botSrc(low); var : top(0),bot(0); top = highest(topSrc, topPer); bot = lowest(botSrc, botPer); plot1(top,"Highest Band"); plot2(bot,"Lowest Band"); plot3(ma(close, maPer), "Moving Average"); 즐거운 하루되세요