커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

수식 문의 드립니다.

예스 스탁_질의(250719) 안녕하세요. 수식 문의 드립니다. 켈트너 Band 켈트너 상한선 TR = max(abs(H-L), abs(H-C(1)), abs(L-C(1))); eavg(C, Period) + eavg(TR, PeriodTR)*D1 .하한선 TR = max(abs(H-L), abs(H-C(1)), abs(L-C(1))); eavg(C, Period) - eavg(TR, PeriodTR) * D1 중심선 eavg(C, Period) Period = 20 D1 = 2.0 PeriodTR = 10 ---------------------------------------- 1. 상단 이탈 하는선 2. 하단 돌파 하는선 ========================== 부탁드립니다. 감사 합니다
프로필 이미지
s1017051
2025-07-19
186
글번호 192600
지표
답변완료

시스템식 부탁합니다

당일 첫봉이 양봉이고, 당일 고가에서 하락하여 당일 (고가의 1/2+0.3틱)에 도달(atlimit) 하면 매수
프로필 이미지
피카2
2025-07-19
154
글번호 192599
시스템
답변완료

수식 문의 드립니다.

안녕하세요. 수식 문의 드립니다. A. 상단_(가중)선택적_그물망 1. M = ma(C, 기간, 종류); if(중심 < M, M, 중심) 기간 = 1 중심 = ma(C, 20) 종류 = 가중 2 M = ma(C, 기간+1, 종류); if(중심 < M, M, 중심) 3 M = ma(C, 기간+2, 종류); if(중심 < M, M, 중심) 4. M = ma(C, 기간+3, 종류); if(중심 < M, M, 중심) 5 M = ma(C, 기간+4, 종류); if(중심 < M, M, 중심) -------------------------------------------- B_. 하단__(가중)선택적_그물망 1. M = ma(C, 기간, 종류); if(중심 > M, M, 중심) 기간 = 1 중심 = ma(C, 20) 종류 = 가중 2 M = ma(C, 기간+1, 종류); if(중심 > M, M, 중심) 3 M = ma(C, 기간+2, 종류); if(중심 > M, M, 중심) 4. M = ma(C, 기간+3, 종류); if(중심 > M, M, 중심) 5 M = ma(C, 기간+4, 종류); if(중심 > M, M, 중심) -------------------------------------------- C_. 5 가중이평+ 20 가중이평-G/C 1. ma(C, 기간1, 종류) // 가중 2. ma(C, 기간2, 종류) // 가중 3. G/C A = MA(C, 기간1, 종류); B = MA(C, 기간2, 종류); 조건 = CrossUp(A, B) or CrossDown(A, B); S = Valuewhen(1, 조건, 위치); // 위치=B ---------------------------------------- D. 강조+20 가중이평 1 M = ma(C, 기간, 종류); 2.강조 M(두께) // 두께 = 2 ========================== 부탁드립니다. 감사 합니다
프로필 이미지
s1017051
2025-07-19
243
글번호 192598
지표

s1017051 님에 의해서 삭제되었습니다.

프로필 이미지
s1017051
2025-07-19
1
글번호 192597
지표
답변완료

변환 부탁드립니다

다음의 pine editor용 코드를 1. supertrend 함수 2. kalman Filter 함수 3. 이 함수들을 사용한 지표로 변환 부탁 드립니다. 감사합니다. (색깔은 Green, Red, Gray로만 표시하고 입력 변수 설명 등 불요) //@version=6 indicator("Range Filtered Trend Signals [AlgoAlpha]", "AlgoAlpha - Range Filtered", true) groupKalman = "Kalman Filter" kalmanAlpha = input.float(0.01, title="Kalman Alpha", tooltip="The Alpha parameter controls the smoothing factor of the Kalman filter. A smaller value results in more smoothing, while a larger value makes the filter more responsive to price changes.", group=groupKalman) kalmanBeta = input.float(0.1, title="Kalman Beta", tooltip="The Beta parameter influences the rate of change in the Kalman filter. It adjusts the filter's sensitivity to trend changes.", group=groupKalman) kalmanPeriod = input.int(77, title="Kalman Period", tooltip="The Period defines the number of bars used in the Kalman filter calculation, affecting the filter's responsiveness to market movements.", group=groupKalman) dev = input.float(1.2, title="Deviation", tooltip="The Deviation parameter sets the multiplier for the deviation from the trend line, affecting the width of the trend band.", group=groupKalman) groupSupertrend = "Supertrend" supertrendFactor = input.float(0.7, title="Supertrend Factor", tooltip="This Factor determines the multiplier for the ATR in the Supertrend calculation, affecting the distance of the trend line from the price.", group=groupSupertrend) supertrendAtrPeriod = input.int(7, title="ATR Period", tooltip="The ATR Period specifies the number of bars used to calculate the Average True Range, which is a component of the Supertrend indicator.", group=groupSupertrend) groupColors = "Colors" green = input.color(#00ffbb, title="Bullish Color", tooltip="This color is used to indicate a bullish trend in the chart.", group=groupColors) red = input.color(#ff1100, title="Bearish Color", tooltip="This color is used to indicate a bearish trend in the chart.", group=groupColors) kalman(a, b, alpha, beta) => var float v1 = na var float v2 = 1.0 var float v3 = alpha * b var float v4 = 0.0 var float v5 = na if na(v1) v1 := a[1] v5 := v1 v4 := v2 / (v2 + v3) v1 := v5 + v4 * (a - v5) v2 := (1 - v4) * v2 + beta / b v1 pine_supertrend(k, factor, atrPeriod) => src = k atr = ta.atr(atrPeriod) upperBand = src + factor * atr lowerBand = src - factor * atr prevLowerBand = nz(lowerBand[1]) prevUpperBand = nz(upperBand[1]) lowerBand := lowerBand > prevLowerBand or k[1] < prevLowerBand ? lowerBand : prevLowerBand upperBand := upperBand < prevUpperBand or k[1] > prevUpperBand ? upperBand : prevUpperBand int _direction = na float superTrend = na prevSuperTrend = superTrend[1] if na(atr[1]) _direction := 1 else if prevSuperTrend == prevUpperBand _direction := k > upperBand ? -1 : 1 else _direction := k < lowerBand ? 1 : -1 superTrend := _direction == -1 ? lowerBand : upperBand [superTrend, _direction] k = kalman(close, kalmanPeriod, kalmanAlpha, kalmanBeta) [supertrend, direction] = pine_supertrend(k, supertrendFactor, supertrendAtrPeriod) vola = ta.wma(high-low, 200) upper = k+vola*dev lower = k-vola*dev midbody = math.avg(close, open) var trend = 0 if close > upper trend := 1 else if close < lower trend := -1 ktrend = 0 if direction < 0 ktrend := 1 else if direction > 0 ktrend := -1 t = 70 t_ = 20 p1 = plot(ktrend * trend == 1 ? k : na, color=color.gray, style = plot.style_linebr, linewidth = 3) m = plot(midbody, color=color.gray, display = display.none) up = plot(trend == -1 or ktrend * trend == -1 ? upper : na, color=ktrend * trend == -1 ? color.gray : ktrend == -1 ? color.new(red, t) : color.gray, style = plot.style_circles) lo = plot(trend == 1 or ktrend * trend == -1 ? lower : na, color=ktrend * trend == -1 ? color.gray : ktrend == 1 ? color.new(green, t) : color.gray, style = plot.style_circles)
프로필 이미지
씸풀
2025-07-19
280
글번호 192596
지표
답변완료

여러 이평선중 3개이상 돌파 종목

안녕하세요. 5,10,20,60,120 이평 중 3개 이평을 종가가 아래와 같이 동시 돌파하는 종목 검색 1. 특정 이평이나 순서에 관계없이 종가가 3개 이평 동시돌파하는 종목 검색식 2. 특정 이평을 골라서 예컨대 5,20,120 3개 이평을 순서에 관계없이 돌파하는 종목 검색식 3. 특정 이평을 골라서 예컨대 120, 5, 20 이평순으로 돌파하는 종목 검색식을 부탁드립니다. 항상 감사드리며 건강과 행복을 기원합니다.
프로필 이미지
선도인
2025-07-18
230
글번호 192595
종목검색

목마와숙녀 님에 의해서 삭제되었습니다.

프로필 이미지
목마와숙녀
2025-07-18
0
글번호 192588
시스템
답변완료

문의

아래 답변 수식을 검토했더니 요청대로 b1 익절 이후 b2 진입은 막았으나, 익절이 발생하지 않은 경우의 b2 진입도 막는 결과가 발생하였습니다 (b1 익절이 없는 경우, b2 진입이 20번 발생했다면 답변수식으로는 10번 정도 진입함) 다시 부탁드립니다. 항상 고맙습니다. *************************************************************************************** 안녕하세요 예스스탁입니다. Input : 최대(99999),최소(0),거래횟수(2); input : lock1(103000),b1(9),진입눌림1(4),진입돌파1(2); input : lock2(113000),b2(18),진입눌림2(3),진입돌파2(1); input : als(50),atr1(0),atr2(32),agl(128); input : bls(38),btr1(0),btr2(90),bgl(108); var : T1(0,data1),entry(0,data1); var : LL(0,data2),EH(0,data2),E1(0,data2),H1(0,data2); var : i1(0,data2),S1(0,data2),L1(0,data2); var : DH2(0,data2),DL2(0,data2); var : Trade(true,Data1); if data1(Bdate != Bdate[1]) Then { T1 = TotalTrades; E1 = 0; DH2 = data2(H); DL2 = data2(L); Trade = true; } if data2(H > DH2) Then DH2 = data2(H); if data2(L < DL2) Then DL2 = data2(L); if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = (TotalTrades-T1)+1; if TotalTrades > TotalTrades[1] and IsEntryName("b1",1) == true and IsExitName("StopProfitTarget",1) == true Then Trade = False; if MarketPosition == 0 and entry == 0 Then { if data2(E1 == 0 and C >= DL2+PriceScale*B1) Then { E1 = 1; H1 = data2(H); i1 = data2(index); } if data2(E1 == 1 and index > i1) then { if data2(H > H1) Then H1 = data2(H); if data2(L <= H1-PriceScale*진입눌림1) Then { E1 = 2; i1 = data2(index); S1 = H1; } } if stime<lock1 and 최대 >= C and C >= 최소 and data2(E1 == 2 and index > i1 and C >= S1+PriceScale*진입돌파1) and Trade == true Then { buy("b1"); } } if TotalTrades > TotalTrades[1] Then LL = data2(L); if data2(L < LL) Then LL = data2(L); if MarketPosition == 0 and entry >= 1 and entry < 거래횟수 Then { if data2(E1 == 0 and C >= LL+PriceScale*B2 and C[1] < LL+PriceScale*B2) Then { E1 = 1; H1 = data2(H); i1 = data2(index); } if data2(E1 == 1 and index > i1) then { if data2(H > H1) Then H1 = data2(H); if data2(L <= H1-PriceScale*진입눌림2) Then { E1 = 2; i1 = data2(index); S1 = H1; } } if stime<lock2 and data2(E1 == 2 and index > i1 and C >= S1+PriceScale*진입돌파2) and Trade == true Then { buy("b2"); } } if MarketPosition== 1 Then { if IsEntryName("b1") == true Then { SetStopLoss(PriceScale*als,PointStop); SetStopTrailing(PriceScale*atr2,PriceScale*atr1,PointStop,1); SetStopProfittarget(PriceScale*agl,PointStop); } Else if IsEntryName("b2") == true Then { SetStopLoss(PriceScale*bls,PointStop); SetStopTrailing(PriceScale*btr2,PriceScale*btr1,PointStop,1); SetStopProfittarget(PriceScale*bgl,PointStop); } Else { SetStopLoss(0); SetStopTrailing(0,0); SetStopProfittarget(0); } } 즐거운 하루되세요 > 목마와숙녀 님이 쓴 글입니다. > 제목 : 문의 > 아래 수식은 국내 데이트레이딩 하루 2회 거래하는 수식입니다. 첫번째 진입(b1)에서 익절로 포지션을 청산했을 경우 거래를 중지하는 수식을 추가해주십시요. b1 익절 이후 b2 진입은 성공율이 낮기 때문입니다. 항상 고맙습니다. ************************************************************************************** Input : 최대(99999),최소(0),거래횟수(2); input : lock1(103000),b1(9),진입눌림1(4),진입돌파1(2); input : lock2(113000),b2(18),진입눌림2(3),진입돌파2(1); input : als(50),atr1(0),atr2(32),agl(128); input : bls(38),btr1(0),btr2(90),bgl(108); var : T1(0,data1),entry(0,data1); var : LL(0,data2),EH(0,data2),E1(0,data2),H1(0,data2); var : i1(0,data2),S1(0,data2),L1(0,data2); var : DH2(0,data2),DL2(0,data2); if data1(Bdate != Bdate[1]) Then T1 = TotalTrades; if data2(Bdate != Bdate[1]) Then{ E1 = 0; DH2 = data2(H); DL2 = data2(L); } if data2(H > DH2) Then DH2 = data2(H); if data2(L < DL2) Then DL2 = data2(L); if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = (TotalTrades-T1)+1; if MarketPosition == 0 and entry == 0 Then{ if data2(E1 == 0 and C >= DL2+PriceScale*B1) Then{ E1 = 1; H1 = data2(H); i1 = data2(index); } if data2(E1 == 1 and index > i1) then{ if data2(H > H1) Then H1 = data2(H); if data2(L <= H1-PriceScale*진입눌림1) Then{ E1 = 2; i1 = data2(index); S1 = H1; } } if stime<lock1 and 최대 >= C and C >= 최소 and data2(E1 == 2 and index > i1 and C >= S1+PriceScale*진입돌파1) Then{ buy("b1"); } } if TotalTrades > TotalTrades[1] Then LL = data2(L); if data2(L < LL) Then LL = data2(L); if MarketPosition == 0 and entry >= 1 and entry < 거래횟수 Then{ if data2(E1 == 0 and C >= LL+PriceScale*B2 and C[1] < LL+PriceScale*B2) Then{ E1 = 1; H1 = data2(H); i1 = data2(index); } if data2(E1 == 1 and index > i1) then{ if data2(H > H1) Then H1 = data2(H); if data2(L <= H1-PriceScale*진입눌림2) Then{ E1 = 2; i1 = data2(index); S1 = H1; } } if stime<lock2 and data2(E1 == 2 and index > i1 and C >= S1+PriceScale*진입돌파2) Then{ buy("b2"); } } if MarketPosition== 1 Then { if IsEntryName("b1") == true Then { SetStopLoss(PriceScale*als,PointStop); SetStopTrailing(PriceScale*atr2,PriceScale*atr1,PointStop,1); SetStopProfittarget(PriceScale*agl,PointStop); } Else if IsEntryName("b2") == true Then { SetStopLoss(PriceScale*bls,PointStop); SetStopTrailing(PriceScale*btr2,PriceScale*btr1,PointStop,1); SetStopProfittarget(PriceScale*bgl,PointStop); } Else { SetStopLoss(0); SetStopTrailing(0,0); SetStopProfittarget(0); } }
프로필 이미지
목마와숙녀
2025-07-18
201
글번호 192587
시스템
답변완료

시스템 매매 관련 추가사항 문의 입니다.

오늘 답변 잘받았고 한 가지만 추가할 사항이 있어서 문의합니다... 예를 들어 3분한 진입을 할때, 최초 1분할 진입후 진입가격대비 3%하락시 2분할 진입 2분할 진입후 추가로3% 하락시 3분할 최종 진입을 할수 있도록 시스템 아래 수식을 수정 부탁드리고, 가격하락 % 지정을 변수로 지정해주시면 정말 고맙겠습니다.. input : short(12),long(26),P(60),시작일(20250714); var : macdv(0),mav(0); macdv = macd(short,long); mav = ma(C,P); if sDate >= 시작일 Then { if TotalTrades == TotalTrades[1] and macdv > 0 and C > mav Then buy(); if TotalTrades == TotalTrades[1] and macdv < 0 and C < mav Then sell(); }
프로필 이미지
서민순
2025-07-18
160
글번호 192578
시스템
답변완료

수식 변환 문의

안녕하세요. 아래 영웅문 수식을 종목검색용으로 변환 부탁드립니다. B=sum(if(c>o,(H+O+L+C)/4*v/100000000,if(c<o,-(H+O+L+C)/4*V/100000000,0))); B2=if(날짜==일자, valuewhen(1,date(1)!=date,B(1)),valuewhen(1,date==날짜 and date(1)!=날짜,B(1))); C=B-B2; C<=-30
프로필 이미지
장태주
2025-07-18
176
글번호 192577
종목검색