커뮤니티

문의드립니다.

프로필 이미지
as8282
2020-03-09 08:09:26
457
글번호 136657
답변완료
1. 아래 Trend Score식을 예스식으로 변경 부탁합니다. TrendScore = iff(close>=close[11],1,-1) + iff(close>=close[12],1,-1) + iff(close>=close[13],1,-1) + iff(close>=close[14],1,-1) + iff(close>=close[15],1,-1) + iff(close>=close[16],1,-1) + iff(close>=close[17],1,-1) + iff(close>=close[18],1,-1) + iff(close>=close[19],1,-1) + iff(close>=close[20],1,-1) plot(5,color=color.green,linewidth=1) plot(0,color=color.black,linewidth=1) plot(-5,color=color.red,linewidth=1) col1= TrendScore>5 col2= TrendScore<-5 col = col1 ? color.green : col2 ? color.red : color.yellow plot(TrendScore, color=col, linewidth=3,title="Trend Score") 2. 혹 위 수식을 색상변경에따른 시스템식으로 작성가능하면 부탁드립니다. 빨강 => 노랑 === 매수 녹색 => 노랑 === 매도
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-03-09 14:48:11

안녕하세요 예스스탁입니다. 1 var : TrendScore(0),col1(false),col2(false),col(0); TrendScore = iff(close>=close[11],1,-1) + iff(close>=close[12],1,-1) + iff(close>=close[13],1,-1) + iff(close>=close[14],1,-1) + iff(close>=close[15],1,-1) + iff(close>=close[16],1,-1) + iff(close>=close[17],1,-1) + iff(close>=close[18],1,-1) + iff(close>=close[19],1,-1) + iff(close>=close[20],1,-1) ; col1 = TrendScore>5; col2= TrendScore<-5; col = iff(col1,green,iff(col2,red,yellow)); plot1(TrendScore,"ts",col); PlotBaseLine1(5,"5",green); PlotBaseLine2(0,"0",black); PlotBaseLine3(-5,"-5",red); 2 var : TrendScore(0),col1(false),col2(false),col(0); TrendScore = iff(close>=close[11],1,-1) + iff(close>=close[12],1,-1) + iff(close>=close[13],1,-1) + iff(close>=close[14],1,-1) + iff(close>=close[15],1,-1) + iff(close>=close[16],1,-1) + iff(close>=close[17],1,-1) + iff(close>=close[18],1,-1) + iff(close>=close[19],1,-1) + iff(close>=close[20],1,-1) ; if crossup(TrendScore,-5) Then buy(); if CrossDown(TrendScore,5) Then sell(); 즐거운 하루되세요 > as8282 님이 쓴 글입니다. > 제목 : 문의드립니다. > 1. 아래 Trend Score식을 예스식으로 변경 부탁합니다. TrendScore = iff(close>=close[11],1,-1) + iff(close>=close[12],1,-1) + iff(close>=close[13],1,-1) + iff(close>=close[14],1,-1) + iff(close>=close[15],1,-1) + iff(close>=close[16],1,-1) + iff(close>=close[17],1,-1) + iff(close>=close[18],1,-1) + iff(close>=close[19],1,-1) + iff(close>=close[20],1,-1) plot(5,color=color.green,linewidth=1) plot(0,color=color.black,linewidth=1) plot(-5,color=color.red,linewidth=1) col1= TrendScore>5 col2= TrendScore<-5 col = col1 ? color.green : col2 ? color.red : color.yellow plot(TrendScore, color=col, linewidth=3,title="Trend Score") 2. 혹 위 수식을 색상변경에따른 시스템식으로 작성가능하면 부탁드립니다. 빨강 => 노랑 === 매수 녹색 => 노랑 === 매도