예스스탁
예스스탁 답변
2020-08-20 15:54:40
안녕하세요
예스스탁입니다.
올려주신 수식의 내용 중 독해가 되지 않은 부분이 있습니다.
TS=highest(high-Mult*atr(Atr),Hhv),barssince(close>highest(high-Mult*atr(Atr),Hhv) and close>close)
위 수식의 의미를 정확히 올려주셔야 변환을 해드릴수 있을 것 같습니다.
TS가 단순히 highest(high-Mult*atr(Atr),Hhv)를 저장한 값이면 아래와 같습니다.
예스랭귀지는 수식종류별로 수식을 각각 작성해야 해서 식을 종류별로 올려드립니다.
1 강조(봉에색상변경)
input : Atrp(5),Hhv(10),Mult(2.5),Barcolor(true);
var : TS(0),Color(0);
TS = highest(high-Mult*atr(Atrp),Hhv);
Color=iff(close>TS,green,iff(close<TS,red,black));
PlotPaintBar(H,L,"강조",color);
2 지표
input : Atrp(5),Hhv(10),Mult(2.5),Barcolor(true);
var : TS(0),Color(0);
TS = highest(high-Mult*atr(Atrp),Hhv);
Color=iff(close>TS,green,iff(close<TS,red,black));
plot1(TS,"ATR Trailing Stoploss",Color);
3 시스템(매수매도신호)
input : Atrp(5),Hhv(10),Mult(2.5),Barcolor(true);
var : TS(0),Color(0);
TS = highest(high-Mult*atr(Atrp),Hhv);
Color=iff(close>TS,green,iff(close<TS,red,black));
if CrossUp(c,TS) Then
Buy("b");
if CrossDown(c,TS) Then
Sell("s");
즐거운 하루되세요
> bluedot 님이 쓴 글입니다.
> 제목 : 수식 전환 부탁드립니다.
> 더운 날씨에 고생 많으십니다. 다음 수식을 예스랭귀지에 맞도록 전환 부탁드립니다.
study("ATR Trailing Stoploss",overlay=true)
Atr=input(defval=5,title="Atr Period",minval=1,maxval=500)
Hhv=input(defval=10,title="HHV Period",minval=1,maxval=500)
Mult=input(defval=2.5,title="Multiplier",minval=0.1)
Barcolor=input(true,title="Barcolor")
TS=highest(high-Mult*atr(Atr),Hhv),barssince(close>highest(high-Mult*atr(Atr),Hhv) and close>close)
Color=iff(close>TS,color.green,iff(close<TS,color.red,color.black))
barcolor(Barcolor? Color:na)
plot(TS,color=Color,linewidth=3,title="ATR Trailing Stoploss")
Buy=crossover(close,TS)
Sell=crossunder(close,TS)
plotshape(Buy,color=color.green,text="Buy",location=location.belowbar,style=shape.labelup,textcolor=color.white,transp=10)
plotshape(Sell,color=color.red,text="Sell",style=shape.labeldown,textcolor=color.white,transp=10)
alertcondition(Buy, "Buy Signal", "Buy ATR Trailing Stoploss")
alertcondition(Sell, "Sell Signal", "Sell ATR Trailing Stoploss")