Search

Disparity_TA

함수설명

이격도(Disparity) 지표함수
※기존 Disparity함수는 기간만 지정이 가능해서 항상 종가와 지정한 기간의 단순이동평균과의 이격만 계산해 리턴하게 되어 있지만 DisParity_TA함수는 기준값도 지정이 가능하고 이동평균 기간 2개를 지정해서 다른 이평간의 이격도도 계산할 수 있습니다.

작성방법

DisParity_TA(기준값, 기간1, 기간2)
C
복사

매개변수 설명

"기준값": Numeric, 데이터, 함수, 변수, 계산식 등
"기간1": Numeric, 최근 N개봉 기간값을 입력
"기간2": Numeric, 최근 N개봉 기간값을 입력
계산
기간1 이동평균값/ 기간2 이동평균값 × 100

활용예시

1. var1 = DisParity_TA(C,5,10); --> 종가기준 5기간 이동평균과 20기간 이동평균의 이격도값을 계산하고 var1에 저장 2. //인라인함수(수식안에서 만들어 사용하는 함수) Function infx_Disparity_TA Numeric { Input : Price(NumericSeries),Period1(NumericSimple),Period2(NumericSimple); value1 = ma(Price,Period1); value2 = ma(Price,Period2); infx_Disparity_TA= value1 / Value2 * 100; } EndFunction Input : Period1(5), Period2(10); var1 = infx_Disparity_TA(C,Period1,Period2); plot1(var1,"이격도");
C
복사
뒤로가기는 좌측상단의 목차 버튼을 눌러주세요.