커뮤니티
문의드립니다.
2015-10-27 12:42:16
138
글번호 91759
안녕하세요.
아래 지표식은 RSI+Metro라는 지표를 표현한건데,
여기서 Fast Metro line과 Slow Metro Line 의 값을 지수로 환산해서 지수차트에
같이 올려보고 싶은데 가능할까요?
input: PeriodRSI(14); // Indicator period
input: StepSizeFast(5); // Fast step
input: StepSizeSlow(15); // Slow step
var: fmin(9999),fmax(-9999);
var: smin(9999),smax(-9999);
var: ftrend(1),strend(1);
var: RSI0(0);
//---- restore values of the variables
RSI0=RSI(PeriodRSI);
fmax=RSI0+2*StepSizeFast;
fmin=RSI0-2*StepSizeFast;
if(RSI0>fmax[1]) then ftrend=1;
if(RSI0<fmin[1]) then ftrend=-1;
if(ftrend>0 && fmin<fmin[1]) then fmin=fmin[1];
if(ftrend<0 && fmax>fmax[1]) then fmax=fmax[1];
smax=RSI0+2*StepSizeSlow;
smin=RSI0-2*StepSizeSlow;
if(RSI0>smax[1]) then strend=1;
if(RSI0<smin[1]) then strend=-1;
if(strend>0 && smin<smin[1]) then smin=smin[1];
if(strend<0 && smax>smax[1]) then smax=smax[1];
if(ftrend>0) then var3=fmin+StepSizeFast;
if(ftrend<0) then var3=fmax-StepSizeFast;
if(strend>0) then var4=smin+StepSizeSlow;
if(strend<0) then var4=smax-StepSizeSlow;
plot1(RSI0,"RSI");
plot2(var3,"Fast_Metro");
plot3(var4,"Slow_Metro");
PlotBaseLine1(30, "기준선 30");
PlotBaseLine2(70, "기준선 70");
감사합니다.
답변 1
예스스탁 예스스탁 답변
2015-10-27 16:30:14
안녕하세요
예스스탁입니다.
문의하신 내용 수식으로 지표값을 지수값으로
환산할 계산방법을 모르겠습니다.
도움을 드리지 못해 죄송합니다.
즐거운 하루되세요
> 한바다 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> 안녕하세요.
아래 지표식은 RSI+Metro라는 지표를 표현한건데,
여기서 Fast Metro line과 Slow Metro Line 의 값을 지수로 환산해서 지수차트에
같이 올려보고 싶은데 가능할까요?
input: PeriodRSI(14); // Indicator period
input: StepSizeFast(5); // Fast step
input: StepSizeSlow(15); // Slow step
var: fmin(9999),fmax(-9999);
var: smin(9999),smax(-9999);
var: ftrend(1),strend(1);
var: RSI0(0);
//---- restore values of the variables
RSI0=RSI(PeriodRSI);
fmax=RSI0+2*StepSizeFast;
fmin=RSI0-2*StepSizeFast;
if(RSI0>fmax[1]) then ftrend=1;
if(RSI0<fmin[1]) then ftrend=-1;
if(ftrend>0 && fmin<fmin[1]) then fmin=fmin[1];
if(ftrend<0 && fmax>fmax[1]) then fmax=fmax[1];
smax=RSI0+2*StepSizeSlow;
smin=RSI0-2*StepSizeSlow;
if(RSI0>smax[1]) then strend=1;
if(RSI0<smin[1]) then strend=-1;
if(strend>0 && smin<smin[1]) then smin=smin[1];
if(strend<0 && smax>smax[1]) then smax=smax[1];
if(ftrend>0) then var3=fmin+StepSizeFast;
if(ftrend<0) then var3=fmax-StepSizeFast;
if(strend>0) then var4=smin+StepSizeSlow;
if(strend<0) then var4=smax-StepSizeSlow;
plot1(RSI0,"RSI");
plot2(var3,"Fast_Metro");
plot3(var4,"Slow_Metro");
PlotBaseLine1(30, "기준선 30");
PlotBaseLine2(70, "기준선 70");
감사합니다.