수고하십니다.
트레이딩뷰 지표 AWESOME OSC를 예스로 변환 부탁드립니다.
=======================================
//@version=5
indicator(title="Awesome Oscillator", shorttitle="AO", timeframe="", timeframe_gaps=true)
ao = ta.sma(hl2,5) - ta.sma(hl2,34)
diff = ao - ao[1]
plot(ao, color = diff <= 0 ? #F44336 : #009688, style=plot.style_columns)
changeToGreen = ta.crossover(diff, 0)
changeToRed = ta.crossunder(diff, 0)
alertcondition(changeToGreen, title = "AO color changed to green", message = "Awesome Oscillator's color has changed to green")
alertcondition(changeToRed, title = "AO color changed to red", message = "Awesome Oscillator's color has changed to red")
답변 1
예스스탁
예스스탁 답변
2024-03-25 13:42:48
안녕하세요
예스스탁입니다.
var : src(0),ao(0),diff(0);
src = (h+l)/2;
ao = ma(src,5) - ma(src,34);
diff = ao - ao[1];
plot1(ao,"ao", iff(diff <= 0 ,Blue , Red));
즐거운 하루되세요
> 부호장자 님이 쓴 글입니다.
> 제목 : 수식변환 문의
> 수고하십니다.
트레이딩뷰 지표 AWESOME OSC를 예스로 변환 부탁드립니다.
=======================================
//@version=5
indicator(title="Awesome Oscillator", shorttitle="AO", timeframe="", timeframe_gaps=true)
ao = ta.sma(hl2,5) - ta.sma(hl2,34)
diff = ao - ao[1]
plot(ao, color = diff <= 0 ? #F44336 : #009688, style=plot.style_columns)
changeToGreen = ta.crossover(diff, 0)
changeToRed = ta.crossunder(diff, 0)
alertcondition(changeToGreen, title = "AO color changed to green", message = "Awesome Oscillator's color has changed to green")
alertcondition(changeToRed, title = "AO color changed to red", message = "Awesome Oscillator's color has changed to red")