커뮤니티

문의합니다

프로필 이미지
회원
2016-11-20 01:21:46
126
글번호 104166
답변완료
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),T(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; if var3 > var4 Then { var1 = C; T = 1; } if var3 < var4 Then { var2 = C; T = -1; } if T == 1 Then plot1(var1,"지표",RED); if T == -1 Then plot1(var2,"지표",blue); ............................................................................. 해당식의 데이타2 (참조) 를 구합니다. 감사합니다.
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-11-21 11:47:33

안녕하세요 예스스탁입니다. input: PeriodRSI(14); // Indicator period input: StepSizeFast(5); // Fast step input: StepSizeSlow(15); // Slow step var: fmin(9999,data2),fmax(-9999,data2); var: smin(9999,data2),smax(-9999,data2); var: ftrend(1,data2),strend(1,data2); var: RSI0(0,data2),T(0,data2); var : V1(0,data2),v2(0,data2),v3(0,data2),v4(0,data2); //---- restore values of the variables RSI0=data2(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 v3=fmin+StepSizeFast; if(ftrend<0) then v3=fmax-StepSizeFast; if(strend>0) then v4=smin+StepSizeSlow; if(strend<0) then v4=smax-StepSizeSlow; if v3 > v4 Then { v1 = data2(C); T = 1; } if v3 < v4 Then { v2 = data2(C); T = -1; } if T == 1 Then plot1(v1,"지표",RED); if T == -1 Then plot1(v2,"지표",blue); 즐거운 하루되세요 > alsk 님이 쓴 글입니다. > 제목 : 문의합니다 > 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),T(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; if var3 > var4 Then { var1 = C; T = 1; } if var3 < var4 Then { var2 = C; T = -1; } if T == 1 Then plot1(var1,"지표",RED); if T == -1 Then plot1(var2,"지표",blue); ............................................................................. 해당식의 데이타2 (참조) 를 구합니다. 감사합니다.