커뮤니티

문의드립니다.

프로필 이미지
alsk
2016-04-06 00:17:52
142
글번호 96884
답변완료
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"); ......................................................................................... 상기지표에서 plot1(RSI0,"RSI"); plot2(var3,"Fast_Metro"); plot3(var4,"Slow_Metro"); 위 세선에 색깔을 넣어 주세요 즉 RSI0선이 상승하면 빨간색, 하락하면 파란색 마찬가지로 var3,"Fast_Metro선이 상승하면 빨간색 하락하면 파란색 var4,"Slow_Metro선이 상승하면 빨간색 하락하면 파란색을 넣어주세요 감사합니다
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-04-06 17:17:05

안녕하세요 예스스탁입니다. 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),T1(0),T2(0),T3(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 RSI0 > RSI0[1] Then T1 = 1; if RSI0 < RSI0[1] Then T1 = -1; if var3 > var3[1] Then T2 = 1; if var3 < var3[1] Then T2 = -1; if var4 > var4[1] Then T3 = 1; if var4 < var4[1] Then T3 = -1; if T1 == 1 Then plot1(RSI0,"RSI",red); else plot1(RSI0,"RSI",blue); if T2 == 1 Then plot2(var3,"Fast_Metro",RED); Else plot2(var3,"Fast_Metro",BLUE); if T3 == 1 Then plot3(var4,"Slow_Metro",RED); Else plot3(var4,"Slow_Metro",BLUE); PlotBaseLine1(30, "기준선 30"); PlotBaseLine2(70, "기준선 70"); 즐거운 하루되세요 > 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); //---- 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"); ......................................................................................... 상기지표에서 plot1(RSI0,"RSI"); plot2(var3,"Fast_Metro"); plot3(var4,"Slow_Metro"); 위 세선에 색깔을 넣어 주세요 즉 RSI0선이 상승하면 빨간색, 하락하면 파란색 마찬가지로 var3,"Fast_Metro선이 상승하면 빨간색 하락하면 파란색 var4,"Slow_Metro선이 상승하면 빨간색 하락하면 파란색을 넣어주세요 감사합니다