커뮤니티

수식부탁드립니다

프로필 이미지
다툼
2025-01-21 17:25:35
474
글번호 187447
답변완료
A=supertrend(period, multiplier); B=supertrend(period1, multiplier1); CROSSUP(C,A) and CROSSUP(C,B) ~~~~~~~~~~~~~~~~~ period 7 multiplier 1 period1 80 multiplier1 3 1분봉으로 사용합니다 첨부할 수식 있으면 첨부해주세요
검색
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2025-01-22 09:35:15

안녕하세요 예스스탁입니다. input : period1(7),multiplier1(1); input : period2(80),multiplier2(3); var : src(0); var : AtrV1(0),upperBand1(0),lowerBand1(0), prevLowerBand1(0), prevUpperBand1(0); var : prevSuperTrend1(0), direction1(0),alpha1(0),source1(0),SuperTrend1(C); var : AtrV2(0),upperBand2(0),lowerBand2(0), prevLowerBand2(0), prevUpperBand2(0); var : prevSuperTrend2(0), direction2(0),alpha2(0),source2(0),SuperTrend2(C); if CurrentBar > 1 Then { src = (H+L)/2; alpha1 = 1 / period1; source1 = max(high - low, abs(high - close[1]), abs(low - close[1])); ATrV1 = alpha1 * source1 + (1 - alpha1) * ATrV1[1]; upperBand1 = src + multiplier1 * AtrV1; lowerBand1 = src - multiplier1 * AtrV1; prevLowerBand1 = lowerBand1[1]; prevUpperBand1 = upperBand1[1]; if lowerBand1 > prevLowerBand1 or close[1] < prevLowerBand1 Then lowerBand1 = lowerBand1; Else lowerBand1 = prevLowerBand1; if upperBand1 < prevUpperBand1 or close[1] > prevUpperBand1 Then upperBand1 = upperBand1; Else upperBand1 = prevUpperBand1; if C > UpperBand1 Then direction1 = 1; if C < LowerBand1 Then direction1 = -1; if direction1 == 1 Then SuperTrend1 = lowerband1; Else SuperTrend1 = upperband1; alpha2 = 1 / period2; source2 = max(high - low, abs(high - close[1]), abs(low - close[1])); ATrV2 = alpha2 * source2 + (1 - alpha2) * ATrV2[1]; upperBand2 = src + multiplier2 * AtrV2; lowerBand2 = src - multiplier2 * AtrV2; prevLowerBand2 = lowerBand2[1]; prevUpperBand2 = upperBand2[1]; if lowerBand2 > prevLowerBand2 or close[1] < prevLowerBand2 Then lowerBand2 = lowerBand2; Else lowerBand2 = prevLowerBand2; if upperBand2 < prevUpperBand2 or close[1] > prevUpperBand2 Then upperBand2 = upperBand2; Else upperBand2 = prevUpperBand2; if C > UpperBand2 Then direction2 = 1; if C < LowerBand2 Then direction2 = -1; if direction2 == 1 Then SuperTrend2 = lowerband2; Else SuperTrend2 = upperband2; if CROSSUP(C,SuperTrend1) and CROSSUP(C,SuperTrend2) Then Find(1); } 즐거운 하루되세요 > 다툼 님이 쓴 글입니다. > 제목 : 수식부탁드립니다 > A=supertrend(period, multiplier); B=supertrend(period1, multiplier1); CROSSUP(C,A) and CROSSUP(C,B) ~~~~~~~~~~~~~~~~~ period 7 multiplier 1 period1 80 multiplier1 3 1분봉으로 사용합니다 첨부할 수식 있으면 첨부해주세요