커뮤니티

지표문의드립니다

프로필 이미지
카카
2025-06-18 17:27:31
217
글번호 191892
답변완료
안녕하세요 관리자님 첨부한 파일의 지표는 트레이딩뷰에 적용할수 있는 지표의 소스코드입니다 이를 예스에서 구동할수 있도록 변환부탁드려요^^
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2025-06-19 12:42:49

안녕하세요 예스스탁입니다. // === ALMA Smoothing input : smooth(1); input : length1(8); input : offset(0.85); input : sigma1(7); var : pchange(0),avpchange(0); var : mm(0),ss(0),norm(0),sum(0),i(0),weight(0); pchange = (close-close[smooth]) / close * 100; mm = offset * (length1 - 1); ss = length1 / sigma1; norm = 0.0; sum = 0.0; for i = 0 to length1 - 1 { weight = exp(-1 * pow(i - mm, 2) / (2 * pow(ss, 2))); norm = norm + weight; sum = sum + pchange[length1 - i - 1] * weight; } avpchange = sum / norm; var : rsiv(0),rsil(False),rsis(False); // === RSI & Chande rsiv = rsi(14); rsiL = rsiv > rsiv[1]; rsiS = rsiv < rsiv[1]; input : length11(9); var : momm(0),m1(0),m2(0),sm1(0),sm2(0),chandeMO(0),cl(False),cs(False); momm = close-close[1]; m1 = iff(momm >= 0 , momm , 0); m2 = iff(momm < 0 , -momm , 0); sm1 = AccumN(m1, length11); sm2 = AccumN(m2, length11); chandeMO = 100 * (sm1 - sm2) / (sm1 + sm2); cL = chandeMO > chandeMO[1]; cS = chandeMO < chandeMO[1]; // === GAMA input : glength(9); input : sigma(1.8); var : gma(Nan),sumOfWeights(Nan),value(0); gma = 0.0; sumOfWeights = 0.0; for i = 0 to glength - 1 { weight =exp(-pow(((i - (glength - 1)) / (2 * sigma)), 2) / 2); value = highest(avpchange, i + 1) + lowest(avpchange, i + 1); gma = gma + (value * weight); sumOfWeights = sumOfWeights+weight; } gma = ema((gma / sumOfWeights) / 2, 7); var : up_color(0),dn_color(0); up_color = Red; dn_color = Blue; var : lastSignalBar(Nan); var : signalGap(0),inUptrend(False),inDntrend(False),tx1(0),tx2(0); signalGap = 5; inUptrend = close > ma(close, 50); inDntrend = close < ma(close, 50); if crossup(avpchange, gma) and rsiL and cL and inUptrend and (IsNan(lastSignalBar) == true or index - lastSignalBar > signalGap) Then { tx1 = text_new(sDate,sTime,low,"▲"); Text_SetColor(tx1,rgb(0, 161, 5)); Text_SetStyle(tx1,2,0); tx2 = text_new(sDate,sTime,low,NewLine+"Long"); Text_SetColor(tx2,rgb(0, 161, 5)); Text_SetStyle(tx2,2,0); lastSignalBar = index; } if CrossDown(avpchange, gma) and rsiS and cS and inDntrend and (IsNan(lastSignalBar) == true or index - lastSignalBar > signalGap) Then { tx1 = text_new(sdate,stime,high,"Short"+NewLine); Text_SetColor(tx1,rgb(215, 0, 0)); Text_SetStyle(tx1,2,1); tx2 = text_new(sdate,stime,high,"▼"); Text_SetColor(tx2,rgb(215, 0, 0)); Text_SetStyle(tx2,2,1); lastSignalBar = index; } // === LEVELS STRENGTH INDEX input : ls_length(20); input : transp(5); Array : level[11](0),colors[11](0); var : strength(0),lower_band(0),upper_band(0),stp(0),lvl(0); lower_band = lowest(L,ls_length); upper_band = highest(H,ls_length); stp = (upper_band - lower_band) / 10; for i = 0 to 10 { Level[i] = lower_band + stp * i; lvl = level[i]; if close> lvl and close[1] < lvl Then strength = strength + 1; if close < lvl and close[1] < lvl Then strength = strength - 1; } var : clamped_strength(0),price(0); clamped_strength = iff(strength < 0 , 0 , iff(strength > 10 , 10 , strength)); price = level[clamped_strength]; for i = 0 to 10 { lvl = level[i]; colors[i] = iff(close > lvl , up_color,dn_color); } // === Plot Levels plot1(level[0],"Level 0",colors[0]); plot2(level[1],"Level 1",colors[1]); plot3(level[2],"Level 2",colors[2]); plot4(level[3],"Level 3",rgb(56, 56, 56),def,3); plot5(level[4],"Level 4",colors[4]); plot6(level[5],"Level 5",colors[5]); plot7(level[6],"Level 6",colors[6]); plot8(level[7],"Level 7",rgb(56, 56, 56),Def,7); plot9(level[8],"Level 8",colors[8]); plot10(level[9],"Level 9",colors[9]); plot11(level[10],"Level 10",colors[10]); 즐거운 하루되세요 > 카카 님이 쓴 글입니다. > 제목 : 지표문의드립니다 > 안녕하세요 관리자님 첨부한 파일의 지표는 트레이딩뷰에 적용할수 있는 지표의 소스코드입니다 이를 예스에서 구동할수 있도록 변환부탁드려요^^