커뮤니티

수식수정 부탁드립니다.

프로필 이미지
haenoori
2025-12-05 11:45:44
64
글번호 228703
답변완료

input : RSILen(21), UpZone(70), DownZone(30);

var : R(0), UpScore(0), DownScore(0);

/* 1) RSI 계산 */

R = RSI(RSILen);

/* 2) 위쪽 평균회귀 점수 (과매수에 가까울수록 0→100) */

DownScore = 0;

if R > 50 then

DownScore = (R - 50) / (UpZone - 50) * 100;

if DownScore < 0 then DownScore = 0;

if DownScore > 100 then DownScore = 100;

/* 3) 아래쪽 평균회귀 점수 (과매도에 가까울수록 0→100) */

UpScore = 0;

if R < 50 then

UpScore = (50 - R) / (50 - DownZone) * 100;

if UpScore < 0 then UpScore = 0;

if UpScore > 100 then UpScore = 100;

/* 4) 출력 */

Plot1(DownScore); { 위쪽 평균회귀 점수 }

Plot2(UpScore); { 아래쪽 평균회귀 점수 }

사용자 함수
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2025-12-05 14:15:30

안녕하세요 예스스탁입니다. input : RSILen(21), UpZone(70), DownZone(30); var : R(0), UpScore(0), DownScore(0); /* 1) RSI 계산 */ R = RSI(RSILen); /* 2) 위쪽 평균회귀 점수 (과매수에 가까울수록 0→100) */ DownScore = 0; if R > 50 then DownScore = (R - 50) / (UpZone - 50) * 100; if DownScore < 0 then DownScore = 0; if DownScore > 100 then DownScore = 100; /* 3) 아래쪽 평균회귀 점수 (과매도에 가까울수록 0→100) */ UpScore = 0; if R < 50 then UpScore = (50 - R) / (50 - DownZone) * 100; if UpScore < 0 then UpScore = 0; if UpScore > 100 then UpScore = 100; /* 4) 출력 */ Plot1(DownScore); #{ 위쪽 평균회귀 점수 } Plot2(UpScore); #{ 아래쪽 평균회귀 점수 } 즐거운 하루되세요