커뮤니티

수식 문의

프로필 이미지
사노소이
2024-03-17 05:38:59
740
글번호 177543
답변완료
시스템식으로 변환 부탁드립니다. 감사합니다!! input : Factor(7),Pd(10),highPd(1),lowPd(5); var : sp(0),th(0),ll(0),myh(0),myl(0),up(0),dn(0),ii(0),Trendup(0),trenddown(0),Trend(0); var : Tsl(0),linecolor(0),tx(0); sp = (H+L+c)/3; th = high; for ii = 1 to Pd*highPd { if th < high[ii] Then th = high[ii]; } ll = low; for ii=1 to Pd*lowPd { if ll > low[ii] Then ll = low[ii]; } myh = ma(high,Pd)*0.4+th*0.6; myl = (ma(sp,Pd)*0.5+ll*0.5); Up = myl-(Factor*atr(Pd)*0.8 ); Dn = (myh+(Factor*atr(Pd) )); TrendUp = iff(sp[1]>TrendUp[1], max(Up,TrendUp[1]) , Up); TrendDown = iff(sp[1]<TrendDown[1], min(Dn,TrendDown[1]) , Dn); Trend = iff(sp > TrendDown[1] , 1, iff(sp< TrendUp[1] , -1, Trend[1])); Tsl = IFF(Trend==1, TrendUp, TrendDown); linecolor = IFF(Trend == 1 , Red , Blue); plot1(Tsl,"SuperTrend",linecolor); if Trend != Trend[1] Then { if Trend == 1 Then { tx = Text_New_Self(sDate,sTime, Tsl,"●"); Text_SetColor(tx,Magenta); Text_SetSize(tx,10); Text_SetStyle(tx,2,2); } Else { tx = Text_New_Self(sDate,sTime, Tsl,"●"); Text_SetColor(tx,Cyan); Text_SetSize(tx,10); Text_SetStyle(tx,2,2); } }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2024-03-18 13:10:01

안녕하세요 예스스탁입니다. input : Factor(7),Pd(10),highPd(1),lowPd(5); var : sp(0),th(0),ll(0),myh(0),myl(0),up(0),dn(0),ii(0),Trendup(0),trenddown(0),Trend(0); var : Tsl(0),linecolor(0),tx(0); sp = (H+L+c)/3; th = high; for ii = 1 to Pd*highPd { if th < high[ii] Then th = high[ii]; } ll = low; for ii=1 to Pd*lowPd { if ll > low[ii] Then ll = low[ii]; } myh = ma(high,Pd)*0.4+th*0.6; myl = (ma(sp,Pd)*0.5+ll*0.5); Up = myl-(Factor*atr(Pd)*0.8 ); Dn = (myh+(Factor*atr(Pd) )); TrendUp = iff(sp[1]>TrendUp[1], max(Up,TrendUp[1]) , Up); TrendDown = iff(sp[1]<TrendDown[1], min(Dn,TrendDown[1]) , Dn); Trend = iff(sp > TrendDown[1] , 1, iff(sp< TrendUp[1] , -1, Trend[1])); Tsl = IFF(Trend==1, TrendUp, TrendDown); linecolor = IFF(Trend == 1 , Red , Blue); #plot1(Tsl,"SuperTrend",linecolor); if Trend != Trend[1] Then { if Trend == 1 Then { Buy(); } Else { Sell(); } } 즐거운 하루되세요 > 사노소이 님이 쓴 글입니다. > 제목 : 수식 문의 > 시스템식으로 변환 부탁드립니다. 감사합니다!! input : Factor(7),Pd(10),highPd(1),lowPd(5); var : sp(0),th(0),ll(0),myh(0),myl(0),up(0),dn(0),ii(0),Trendup(0),trenddown(0),Trend(0); var : Tsl(0),linecolor(0),tx(0); sp = (H+L+c)/3; th = high; for ii = 1 to Pd*highPd { if th < high[ii] Then th = high[ii]; } ll = low; for ii=1 to Pd*lowPd { if ll > low[ii] Then ll = low[ii]; } myh = ma(high,Pd)*0.4+th*0.6; myl = (ma(sp,Pd)*0.5+ll*0.5); Up = myl-(Factor*atr(Pd)*0.8 ); Dn = (myh+(Factor*atr(Pd) )); TrendUp = iff(sp[1]>TrendUp[1], max(Up,TrendUp[1]) , Up); TrendDown = iff(sp[1]<TrendDown[1], min(Dn,TrendDown[1]) , Dn); Trend = iff(sp > TrendDown[1] , 1, iff(sp< TrendUp[1] , -1, Trend[1])); Tsl = IFF(Trend==1, TrendUp, TrendDown); linecolor = IFF(Trend == 1 , Red , Blue); plot1(Tsl,"SuperTrend",linecolor); if Trend != Trend[1] Then { if Trend == 1 Then { tx = Text_New_Self(sDate,sTime, Tsl,"●"); Text_SetColor(tx,Magenta); Text_SetSize(tx,10); Text_SetStyle(tx,2,2); } Else { tx = Text_New_Self(sDate,sTime, Tsl,"●"); Text_SetColor(tx,Cyan); Text_SetSize(tx,10); Text_SetStyle(tx,2,2); } }