커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내

안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
프로필 이미지
예스스탁
2026-02-27
1664
글번호 230811
지표
답변완료

수정부탁드립니다.

변곡점 수직선 적색 청색 변경부탁드립니다。 Input:Cnt(60),선TL선(4),사각박스굵기(1); Var:nj(0),turnPntBit(""),TdL1(0),color(0),vtx(0),box1(0),box2(0); Array:valArr[10](0),barArr[10](0),turnPntArr[10](""); // 봉이 새로 생겼으므로 봉개수 관리하는 변수들의 봉개수 값 1씩 증가 For nj = 0 To 9 { barArr[nj] = barArr[nj] + 1; } // 고점조건 = 5-1-5에서 가운데 고가가 좌측 5봉과 우측 5봉 고가보다 높다 // 저점조건 = 5-1-5에서 가운데 저가가 좌측 5봉과 우측 5봉 저가보다 낮다 Condition1 = Highest(H,Cnt)[Cnt+1] <= H[Cnt] and H[Cnt] > Highest(H,Cnt); Condition2 = Lowest(L,Cnt)[Cnt+1] >= L[Cnt] and L[Cnt] < Lowest(L,Cnt); // 전환점구분 null값으로 초기화; // if 고점조건, 저점조건 동시 만족시 then // if 이전 고점,저점 범위를 모두 벗어났을 때 // 전환점구분 = 고저점; // else if 이전 고점을 갱신했다면 전환점구분 = 고점; // else if 이전 저점을 갱신했다면 전환점구분 = 저점; // else if 전환점배열의 현재(배열상 1번째)값이 고점이면 전환점구분 = 저점; // else if 전환점배열의 현재 값이 저점이면 전환점구분 = 고점; // else if 고점조건 만족하면 전환점구분 = 고점; // else if 저점조건 만족하면 전환전구분 = 저점; turnPntBit = ""; If Condition1 and Condition2 Then { If Max(valArr[1],valArr[2]) < H[Cnt] and Min(valArr[1],valArr[2]) > L[Cnt] Then turnPntBit = "HiLo"; Else If Max(valArr[1],valArr[2]) < H[Cnt] Then turnPntBit = "Hi"; Else If Min(valArr[1],valArr[2]) > L[Cnt] Then turnPntBit = "Lo"; Else If turnPntArr[1] == "Hi" Then turnPntBit = "Lo"; Else If turnPntArr[1] == "Lo" Then turnPntBit = "Hi"; } Else If Condition1 Then turnPntBit = "Hi"; Else If Condition2 Then turnPntBit = "Lo"; // if 전환점구분에 값이 있을 때만 아래 실행, 없으면 통과 If turnPntBit <> "" Then { // if 전환점구분이 고저점이면 then // 이전 파동은 연장시키고 아래에서 새로이 파동선을 추가토록 한다. If turnPntBit == "HiLo" Then { valArr[1] = IFF(turnPntArr[1] == "Hi",H[Cnt],L[Cnt]); barArr[1] = Cnt; TL_SetEnd(TdL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]); If turnPntArr[1] == "Hi" Then turnPntBit = "Lo"; Else turnPntBit = "Hi"; } // if 신규 전환점구분이 현재(전환점배열 1번째)와 다르면 then // 배열값들을 이전값으로 Move; If turnPntBit <> turnPntArr[1] Then { for nj = 8 downto 1 { valArr[nj+1] = valArr[nj]; barArr[nj+1] = barArr[nj]; turnPntArr[nj+1] = turnPntArr[nj]; } } // if 전환점구분이 바뀌었거나 또는 // (전환점구분은 안바뀌었는데 // (이전 고점보다 높은 고점이 발생했거나 또는 // 이전 저점보다 낮은 저점이 발생했으면)) then If turnPntBit <> turnPntArr[1] or (turnPntBit == turnPntArr[1] and ((turnPntBit == "Hi" and valArr[1] < H[Cnt]) or (turnPntBit == "Lo" and valArr[1] > L[Cnt]))) Then { // 값 배열에는 고점 또는 저점을 대입; // 봉개수 배열에는 입력변수의 봉개수 대입; // 전환점 배열에 전환점구분값을 대입; valArr[1] = IFF(turnPntBit == "Hi",H[Cnt],L[Cnt]); barArr[1] = Cnt; turnPntArr[1] = turnPntBit; // if 이전봉대비 전환점구분이 바뀌었다면 추세선 새로 그리고; // else 전환점구분이 안바뀌었으면 값만 바뀐거므로 추세선 연장; If turnPntArr[1][1] <> turnPntArr[1][0] Then { TdL1 = TL_New(sDate[barArr[2]],sTime[barArr[2]],valArr[2],sDate[barArr[1]],sTime[barArr[1]],valArr[1]); // vtx = text_new(sDate[barArr[1]],sTime[barArr[1]],valArr[1],NumToStr(valArr[1],2)); if turnPntArr[1][1] > turnPntArr[1][0] then { color = red; Text_SetStyle(vtx,2,1); } Else { color = blue; Text_SetStyle(vtx,2,0); } box1 = box_new(sDate[barArr[2]],sTime[barArr[2]],valArr[2],sDate[barArr[1]],sTime[barArr[1]],valArr[1]); Box_SetColor(box1,color); Box_SetFill(box1,true); box2 = box_new(sDate[barArr[2]],sTime[barArr[2]],valArr[2],sDate[barArr[1]],sTime[barArr[1]],valArr[1]); Box_SetColor(box2,color); Box_SetSize(box2,사각박스굵기); } Else { TL_SetEnd(TdL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]); Box_SetEnd(box1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]); Box_SetEnd(box2,sDate[barArr[1]],sTime[barArr[1]],valArr[1]); } } } TL_SetSize(TdL1,선TL선); TL_Setcolor(TdL1,color);
프로필 이미지
외국인
2024-11-01
769
글번호 184903
지표
답변완료

문의 드립니다

안녕하세요 다음 트레이딩 코딩을 시스템 신호로 전환 부탁드립니다 // Inputs a = input(1, title = "Key Vaule. 'This changes the sensitivity'") c = input(10, title = "ATR Period") h = input(false, title = "Signals from Heikin Ashi Candles") xATR = atr(c) nLoss = a * xATR src = h ? security(heikinashi(syminfo.tickerid), timeframe.period, close, lookahead = false) : close xATRTrailingStop = 0.0 xATRTrailingStop := iff(src > nz(xATRTrailingStop[1], 0) and src[1] > nz(xATRTrailingStop[1], 0), max(nz(xATRTrailingStop[1]), src - nLoss), iff(src < nz(xATRTrailingStop[1], 0) and src[1] < nz(xATRTrailingStop[1], 0), min(nz(xATRTrailingStop[1]), src + nLoss), iff(src > nz(xATRTrailingStop[1], 0), src - nLoss, src + nLoss))) pos = 0 pos := iff(src[1] < nz(xATRTrailingStop[1], 0) and src > nz(xATRTrailingStop[1], 0), 1, iff(src[1] > nz(xATRTrailingStop[1], 0) and src < nz(xATRTrailingStop[1], 0), -1, nz(pos[1], 0))) xcolor = pos == -1 ? color.red: pos == 1 ? color.green : color.blue ema = ema(src,1) above = crossover(ema, xATRTrailingStop) below = crossover(xATRTrailingStop, ema) buy = src > xATRTrailingStop and above sell = src < xATRTrailingStop and below barbuy = src > xATRTrailingStop barsell = src < xATRTrailingStop plotshape(buy, title = "Buy", text = 'Buy', style = shape.labelup, location = location.belowbar, color= color.green, textcolor = color.white, transp = 0, size = size.tiny) plotshape(sell, title = "Sell", text = 'Sell', style = shape.labeldown, location = location.abovebar, color= color.red, textcolor = color.white, transp = 0, size = size.tiny) barcolor(barbuy ? color.green : na) barcolor(barsell ? color.red : na) alertcondition(buy, "UT Long", "UT Long") alertcondition(sell, "UT Short", "UT Short") 감사합니다
프로필 이미지
만강
2024-11-01
637
글번호 184901
시스템

노기법 님에 의해서 삭제되었습니다.

프로필 이미지
노기법
2024-11-01
12
글번호 184897
검색

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

프로필 이미지
2wnwn
2024-11-01
46
글번호 184878
지표
답변완료

키움수식 시스템 트레이딩 식으로 변경부탁드립니다.

매수 진입 B = if(C>O, Sum(V,기간1), 0); S = if(C A = eavg(eavg(B,기간1),기간2) > eavg(eavg(S,기간1),기간2) and eavg(eavg(B,기간1),기간2) > eavg(eavg(B(1),기간1),기간2); D = eavg(eavg(B,기간1),기간2) < eavg(eavg(S,기간1),기간2) and eavg(eavg(S,기간1),기간2) > eavg(eavg(S(1),기간1),기간2); ((sum(A,1,1) > sum(D,1,1) or eavg(eavg(B,기간1),기간2) > eavg(eavg(S,기간1),기간2) or (eavg(eavg(B,기간1),기간2) > eavg(eavg(S,기간1),기간2) and eavg(eavg(B,기간1),기간2) > eavg(eavg(B(1),기간1),기간2))) and (StochasticsSlow(period1,period2) > eavg(StochasticsSlow(period1,period2),period2) or StochasticsSlow(period2,period3) > eavg(StochasticsSlow(period2,period3),period3)) and Trix(100)-Trix(100,1) > 0) or (MACD(shortPeriod,longPeriod) >= baseLine and(MACD(shortPeriod,longPeriod) >= eavg(MACD(shortPeriod,longPeriod),sigPeriod) and avg(c,100) < avg(c,50) and (C > EnvelopeUp(Period1,0.1) or C > MA(종가, 20, 단순)) and ADX(14) > 25 and (EnvelopeUp(Period1,0.1) > MA(종가, 100, 단순) or MA(종가, 20, 단순) > MA(종가, 100, 단순))) 매도 진입 B = if(C>O, Sum(V,기간1), 0); S = if(C A = eavg(eavg(B,기간1),기간2) > eavg(eavg(S,기간1),기간2) and eavg(eavg(B,기간1),기간2) > eavg(eavg(B(1),기간1),기간2); D = eavg(eavg(B,기간1),기간2) < eavg(eavg(S,기간1),기간2) and eavg(eavg(S,기간1),기간2) > eavg(eavg(S(1),기간1),기간2); ((sum(A,1,1) < sum(D,1,1) or eavg(eavg(B,기간1),기간2) < eavg(eavg(S,기간1),기간2) or (eavg(eavg(B,기간1),기간2) < eavg(eavg(S,기간1),기간2) and eavg(eavg(B,기간1),기간2) < eavg(eavg(B(1),기간1),기간2))) and (StochasticsSlow(period1,period2) < eavg(StochasticsSlow(period1,period2),period2) or StochasticsSlow(period2,period3) < eavg(StochasticsSlow(period2,period3),period3)) and Trix(100)-Trix(100,1) < 0) or (MACD(shortPeriod,longPeriod) < baseLine and MACD(shortPeriod,longPeriod) < eavg(MACD(shortPeriod,longPeriod),sigPeriod) and avg(c,100) > avg(c,50) and (C < Envelopedown(Period1,0.1) or C < MA(종가, 20, 단순)) and ADX(14) > 25 and (Envelopedown(Period1,0.1) < MA(종가, 100, 단순) or MA(종가, 20, 단순) < MA(종가, 100, 단순))) 수식이 좀 복잡해서 혼자 만들기 힘드네요. 도움 주시면 감사하겠습니다. 수고하세요.
프로필 이미지
황금오리
2024-11-01
684
글번호 184877
시스템
답변완료

추세전환 동시

input : Period(150); Var:j(0),T(0),tx1(0),box(0),TL1(0),TL(0),TL2(0); Var: date11(0),date12(0),time11(0),time12(0), date21(0),date22(0),time21(0),time22(0), date31(0),date32(0),time31(0),time32(0); Array:HiVal[20](0),LoVal[20](0),HiBar[20](0),LoBar[20](0); For j = 0 To 19 { HiBar[j] = HiBar[j] + 1; LoBar[j] = LoBar[j] + 1; } if crossup(H,highest(H,Period)[1]) and (T == 0 or (T==-1 and H >= Loval[0]+0.8)) Then T = 1; if CrossDown(L,Lowest(L,Period)[1]) and (T == 0 or (T==1 and L <= Hival[0]-0.8)) Then T = -1; If T == -1 Then { If T[1] != -1 Then { For j = 18 DownTo 0 { LoVal[j+1] = LoVal[j]; LoBar[j+1] = LoBar[j]; } LoVal[0] = L; LoBar[0] = 0; date11 = date[HiBar[0]]; time11 = stime[HiBar[0]]; Value11 = HiVal[0]; date12 = date[LoBar[0]]; time12 = stime[LoBar[0]]; Value12 = LoVal[0]; TL_Delete(TL); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,Blue); TL_SetSize(TL1,1); date21 = date[HiBar[0]]; time21 = stime[HiBar[0]]; date22 = date[0]; time22 = stime[0]; Condition3 = False; if Condition3 == False and Value12 <= value11-0.8 Then { Condition3 = true; } } If LoVal[0] > L Then { LoVal[0] = L; LoBar[0] = 0; date12 = date[LoBar[0]]; time12 = stime[LoBar[0]]; Value12 = LoVal[0]; TL_SetEnd(TL1, date12,time12,Value12); date22 = date[0]; time22 = stime[0]; } if Condition3 == False and Value12 <= value11-0.8 Then { Condition3 = true; TL2= TL_New(sDate,sTime,0,sDate,sTime,999); TL_SetColor(TL2,Lime); TL_SetSize(TL2,2); } } If T == 1 Then { If T[1] != 1 Then { For j = 18 DownTo 0 { HiVal[j+1] = HiVal[j]; HiBar[j+1] = HiBar[j]; } HiVal[0] = H; HiBar[0] = 0; date11 = date[LoBar[0]]; time11 = stime[LoBar[0]]; Value11 = LoVal[0]; date12 = date[HiBar[0]]; time12 = stime[HiBar[0]]; Value12 = HiVal[0]; TL_Delete(TL); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,Red); TL_SetSize(TL1,1); date31 = date[LoBar[0]]; time31 = stime[LoBar[0]]; date32 = date[0]; time32 = stime[0]; Condition7 = False; if Condition7 == False and Value12 >= value11+0.85 Then { Condition7 = true; } } If HiVal[0] < H Then { HiVal[0] = H; HiBar[0] = 0; date12 = date[HiBar[0]]; time12 = stime[HiBar[0]]; Value12 = HiVal[0]; TL_SetEnd(TL1, date12,time12,Value12); date32 = date[0]; time32 = stime[0]; } if Condition7 == False and Value12 >= value11+0.85 Then { Condition7 = true; TL2= TL_New(sDate,sTime,0,sDate,sTime,999); TL_SetColor(TL2,Gold); TL_SetSize(TL2,2); } } 0.8 이상이면 전환되는 조건이라서, 크기가 0.8에 세로선 표시되는 수식은 표시가 안됩니다. 전환 조건과 같은 크기의(0.8) 세로선도 표시되게 부탁드립니다.
프로필 이미지
고성
2024-11-01
779
글번호 184876
지표
답변완료

변환부탁드립니다.

안녕하세요~ 매번 감사합니다. period 10 d1 4 af 1 maxaf 3 period1 55 multiple 3 ma1 3 ma2 55 percent 55 이평방법 지수 CrossUp(h,BBandsUp((c+l+h)/3,Period,D1,이평방법)) and c >= SAR(af,maxAF) and V > avg(V, Period) * Multiple && V > V(1) * Multiple and eavg(c,MA1) >= eavg(c,MA2) and Disparity(c,Period1,이평방법) <= Percent and Disparity(c,448,이평방법) <= percent 종목 검색으로 변환 부탁드립니다. 즐거운 하루 되십시오
프로필 이미지
미서니
2024-11-01
916
글번호 184875
종목검색

비슬짱 님에 의해서 삭제되었습니다.

프로필 이미지
비슬짱
2024-11-01
0
글번호 184874
지표
답변완료

수정부탁드립니다.

변곡점마다 사각박스 색상 과 테두리 선표시 부탁드립니다. 감사합니다. Input:Cnt(60),선TL선(4); Var:nj(0),turnPntBit(""),TdL1(0),color(0),vtx(0); Array:valArr[10](0),barArr[10](0),turnPntArr[10](""); // 봉이 새로 생겼으므로 봉개수 관리하는 변수들의 봉개수 값 1씩 증가 For nj = 0 To 9 { barArr[nj] = barArr[nj] + 1; } // 고점조건 = 5-1-5에서 가운데 고가가 좌측 5봉과 우측 5봉 고가보다 높다 // 저점조건 = 5-1-5에서 가운데 저가가 좌측 5봉과 우측 5봉 저가보다 낮다 Condition1 = Highest(H,Cnt)[Cnt+1] <= H[Cnt] and H[Cnt] > Highest(H,Cnt); Condition2 = Lowest(L,Cnt)[Cnt+1] >= L[Cnt] and L[Cnt] < Lowest(L,Cnt); // 전환점구분 null값으로 초기화; // if 고점조건, 저점조건 동시 만족시 then // if 이전 고점,저점 범위를 모두 벗어났을 때 // 전환점구분 = 고저점; // else if 이전 고점을 갱신했다면 전환점구분 = 고점; // else if 이전 저점을 갱신했다면 전환점구분 = 저점; // else if 전환점배열의 현재(배열상 1번째)값이 고점이면 전환점구분 = 저점; // else if 전환점배열의 현재 값이 저점이면 전환점구분 = 고점; // else if 고점조건 만족하면 전환점구분 = 고점; // else if 저점조건 만족하면 전환전구분 = 저점; turnPntBit = ""; If Condition1 and Condition2 Then { If Max(valArr[1],valArr[2]) < H[Cnt] and Min(valArr[1],valArr[2]) > L[Cnt] Then turnPntBit = "HiLo"; Else If Max(valArr[1],valArr[2]) < H[Cnt] Then turnPntBit = "Hi"; Else If Min(valArr[1],valArr[2]) > L[Cnt] Then turnPntBit = "Lo"; Else If turnPntArr[1] == "Hi" Then turnPntBit = "Lo"; Else If turnPntArr[1] == "Lo" Then turnPntBit = "Hi"; } Else If Condition1 Then turnPntBit = "Hi"; Else If Condition2 Then turnPntBit = "Lo"; // if 전환점구분에 값이 있을 때만 아래 실행, 없으면 통과 If turnPntBit <> "" Then { // if 전환점구분이 고저점이면 then // 이전 파동은 연장시키고 아래에서 새로이 파동선을 추가토록 한다. If turnPntBit == "HiLo" Then { valArr[1] = IFF(turnPntArr[1] == "Hi",H[Cnt],L[Cnt]); barArr[1] = Cnt; TL_SetEnd(TdL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]); If turnPntArr[1] == "Hi" Then turnPntBit = "Lo"; Else turnPntBit = "Hi"; } // if 신규 전환점구분이 현재(전환점배열 1번째)와 다르면 then // 배열값들을 이전값으로 Move; If turnPntBit <> turnPntArr[1] Then { for nj = 8 downto 1 { valArr[nj+1] = valArr[nj]; barArr[nj+1] = barArr[nj]; turnPntArr[nj+1] = turnPntArr[nj]; } } // if 전환점구분이 바뀌었거나 또는 // (전환점구분은 안바뀌었는데 // (이전 고점보다 높은 고점이 발생했거나 또는 // 이전 저점보다 낮은 저점이 발생했으면)) then If turnPntBit <> turnPntArr[1] or (turnPntBit == turnPntArr[1] and ((turnPntBit == "Hi" and valArr[1] < H[Cnt]) or (turnPntBit == "Lo" and valArr[1] > L[Cnt]))) Then { // 값 배열에는 고점 또는 저점을 대입; // 봉개수 배열에는 입력변수의 봉개수 대입; // 전환점 배열에 전환점구분값을 대입; valArr[1] = IFF(turnPntBit == "Hi",H[Cnt],L[Cnt]); barArr[1] = Cnt; turnPntArr[1] = turnPntBit; // if 이전봉대비 전환점구분이 바뀌었다면 추세선 새로 그리고; // else 전환점구분이 안바뀌었으면 값만 바뀐거므로 추세선 연장; If turnPntArr[1][1] <> turnPntArr[1][0] Then { TdL1 = TL_New(sDate[barArr[2]],sTime[barArr[2]],valArr[2],sDate[barArr[1]],sTime[barArr[1]],valArr[1]); // vtx = text_new(sDate[barArr[1]],sTime[barArr[1]],valArr[1],NumToStr(valArr[1],2)); if turnPntArr[1][1] > turnPntArr[1][0] then { color = red; Text_SetStyle(vtx,2,1); } Else { color = blue; Text_SetStyle(vtx,2,0); } } Else TL_SetEnd(TdL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]); } } TL_SetSize(TdL1,선TL선); TL_Setcolor(TdL1,color);
프로필 이미지
외국인
2024-11-01
690
글번호 184873
지표