함수설명
ATR(Average True Range) 지표함수
작성방법
ATR(기간)
C
복사
매개변수 설명
•
"기간": Numeric, 최근 N개봉 기간값을 입력
계산
TrueRange의 지정기간 이동평균 값
활용예시
//인라인함수(수식안에서 만들어 사용하는 함수)
//TrueHigh 함수식
Function infx_TrueHigh Numeric
{
If C[1] > H then
infx_TrueHigh = C[1];
else
infx_TrueHigh = H;
}
EndFunction
//TrueLow 함수식
Function infx_TrueLow Numeric
{
If C[1] < L then
infx_TrueLow = C[1];
else
infx_TrueLow = L;
}
EndFunction
//TrueRange 함수식
Function infx_TrueRange Numeric
{
infx_TrueRange = infx_TrueHigh - infx_TrueLow;
}
EndFunction
//ATR 함수식
Function infx_ATR Numeric
{
Inputs: Period(NumericSimple);
infx_ATR = Ma(infx_TrueRange, Period);
}
EndFunction
input : Period(14);
var : ATRV(0);
ATRV = infx_ATR(Period);
Plot1(ATRV);
C
복사
뒤로가기는 좌측상단의 목차 버튼을 눌러주세요.