커뮤니티

문의 드립니다!

프로필 이미지
유로파54
2022-09-18 04:08:13
989
글번호 162269
답변완료
안녕하세요! 일전에 작성해주신 수식 많은 도움이 될것같습니다 다시한번 감사드립니다!! 아래수식과 이평선이 동시에 만족될때(일치할때)의 수식도 한번더 부탁드립니다 이평선은 5일선 20일선 60일선을 예시로해서 3개의 선이 발생토록 부탁드립니다 --------------------------------------------------------- input : n(2); input : Periods(10),Multiplier(3.0),changeATR(true),showsignals(true),highlighting(true); var : src(0),ATR2(0),ATrv(0),upv(0),dnv(0),trend(1); src = (h+l)/2; atr2 = ma(TrueRange, Periods); atrv = iff(changeATR, atr(Periods), atr2); upv = src-(Multiplier*atrv); upv = iff(close[1] > upv[1],max(upv,upv[1]), upv); dnv = src+(Multiplier*atrv); dnv = iff(close[1] < dnv[1],min(dnv, dnv[1]), dnv); trend = iff(trend == -1 and close > dnv[1] , 1 ,IFf(trend == 1 and close < upv[1] , -1 , trend)); if trend == 1 Then plot1(upv,"Trend",MAGENTA); Else plot1(dnv,"Trend",blue); if C > Plot1 Then plot2(999999999,"라인1"); Else plot2(0,"라인1"); var1 = IFf(Trend == 1,upv,dnv); if CountIf(trend != 1,2) == 2 and H < var1-PriceScale*n and H[1] >= var1[1]-PriceScale*n Then plot3(999999999,"라인2"); Else plot3(0,"라인2"); if CountIf(trend == 1,2) == 2 and L > var1+PriceScale*n and L[1] <= var1[1]+PriceScale*n Then plot4(999999999,"라인3"); Else plot4(0,"라인3");
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2022-09-19 11:11:08

안녕하세요 예스스탁입니다. input : n(2),P1(5),P2(20),P3(60); input : Periods(10),Multiplier(3.0),changeATR(true),showsignals(true),highlighting(true); var : src(0),ATR2(0),ATrv(0),upv(0),dnv(0),trend(1); var : mav1(0),mav2(0),mav3(0); src = (h+l)/2; atr2 = ma(TrueRange, Periods); atrv = iff(changeATR, atr(Periods), atr2); upv = src-(Multiplier*atrv); upv = iff(close[1] > upv[1],max(upv,upv[1]), upv); dnv = src+(Multiplier*atrv); dnv = iff(close[1] < dnv[1],min(dnv, dnv[1]), dnv); trend = iff(trend == -1 and close > dnv[1] , 1 ,IFf(trend == 1 and close < upv[1] , -1 , trend)); if trend == 1 Then plot1(upv,"Trend",MAGENTA); Else plot1(dnv,"Trend",blue); if C > Plot1 Then plot2(999999999,"라인1"); Else plot2(0,"라인1"); var1 = Round(IFf(Trend == 1,upv,dnv),2); if CountIf(trend != 1,2) == 2 and H < var1-PriceScale*n and H[1] >= var1[1]-PriceScale*n Then plot3(999999999,"라인2"); Else plot3(0,"라인2"); if CountIf(trend == 1,2) == 2 and L > var1+PriceScale*n and L[1] <= var1[1]+PriceScale*n Then plot4(999999999,"라인3"); Else plot4(0,"라인3"); mav1 = round(ma(C,P1),2); mav2 = round(ma(C,P2),2); mav3 = round(ma(C,P3),2); if var1 == mav1 Then value11 = value1; if var1 == mav2 Then value12 = value1; if var1 == mav3 Then value13 = value1; if value11 > 0 Then plot5(value11,"Plot1-mav1일치"); if value12 > 0 Then plot6(value12,"Plot1-mav2일치"); if value13 > 0 Then plot7(value13,"Plot1-mav3일치"); 즐거운 하루되세요 > 유로파54 님이 쓴 글입니다. > 제목 : 문의 드립니다! > 안녕하세요! 일전에 작성해주신 수식 많은 도움이 될것같습니다 다시한번 감사드립니다!! 아래수식과 이평선이 동시에 만족될때(일치할때)의 수식도 한번더 부탁드립니다 이평선은 5일선 20일선 60일선을 예시로해서 3개의 선이 발생토록 부탁드립니다 --------------------------------------------------------- input : n(2); input : Periods(10),Multiplier(3.0),changeATR(true),showsignals(true),highlighting(true); var : src(0),ATR2(0),ATrv(0),upv(0),dnv(0),trend(1); src = (h+l)/2; atr2 = ma(TrueRange, Periods); atrv = iff(changeATR, atr(Periods), atr2); upv = src-(Multiplier*atrv); upv = iff(close[1] > upv[1],max(upv,upv[1]), upv); dnv = src+(Multiplier*atrv); dnv = iff(close[1] < dnv[1],min(dnv, dnv[1]), dnv); trend = iff(trend == -1 and close > dnv[1] , 1 ,IFf(trend == 1 and close < upv[1] , -1 , trend)); if trend == 1 Then plot1(upv,"Trend",MAGENTA); Else plot1(dnv,"Trend",blue); if C > Plot1 Then plot2(999999999,"라인1"); Else plot2(0,"라인1"); var1 = IFf(Trend == 1,upv,dnv); if CountIf(trend != 1,2) == 2 and H < var1-PriceScale*n and H[1] >= var1[1]-PriceScale*n Then plot3(999999999,"라인2"); Else plot3(0,"라인2"); if CountIf(trend == 1,2) == 2 and L > var1+PriceScale*n and L[1] <= var1[1]+PriceScale*n Then plot4(999999999,"라인3"); Else plot4(0,"라인3");