커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

지표 변환

Hap3 = DayClose()+nPreDayClose(1)+nPreDayClose(2);Hap5 = Hap3 + nPreDayClose(3)+nPreDayClose(4);Hap10 = Hap5 + nPreDayClose(5)+nPreDayClose(6)+nPreDayClose(7)+nPreDayClose(8)+nPreDayClose(9);M3 = Hap3/3;M5 = Hap5/5;M10 = Hap10/10;if(M5<M10, M5, M10)
프로필 이미지
삼손감자
2026-01-23
350
글번호 230020
지표
답변완료

수식 부탁드립니다.

안녕하세요 영웅문에서변수는u: (고+저)/2a=65중심 : 저가가격1 : 고가k : 0.7kk : 1.1period : 20b=2.55 이고 수식은 아래와 같습니다.e=sum(u*v, a)/sum(V, a);Q=highest(e,a) - B* ATR(a);y=MA(Q, a, 단순);x = sum(중심 * v); z = valuewhen(1, date != date(1), x(1)); x1 = sum(v);z1 = valuewhen(1, date != date(1), x1(1));K1=(x - z) / (x1 - z1) ;Aa=ma(가격1,Period,단순);Bb=ma(가격1,Period,단순) + (ATR(Period) * K);bbb=ma(가격1,Period,단순) - (ATR(Period) * KK);(bb>= y && bbb< y && crossup(k1,bb) && bb>= k1 && bbb< k1) or(bb>= y && bbb< y && crossup(k1,bbb)&& bb>= k1 && bbb< k1) or(bb>= y && bbb< y && crossdown(k1,bb)&& bb>= k1 && bbb< k1) or(bb>= y && bbb< y && crossdown(k1,bbb)&& bb>= k1 && bbb< k1) or(bb>= k1 && bbb< k1 && crossup(y,bb) && bb>= y && bbb< y) or(bb>= k1 && bbb< k1 && crossup(y,bbb)&& bb>= y && bbb< y) or(bb>= k1 && bbb< k1 && crossdown(y,bb)&& bb>= y && bbb< y) or(bb>= k1 && bbb< k1 && crossdown(y,bbb)&& bb>= y && bbb< y) 예스트레이더에서 화살표로 구현하고 싶은데 도움주시면 감사하겠습니다.새해복많이 받으세요.
프로필 이미지
데이남
2026-01-23
253
글번호 230019
강조
답변완료

고가저가 지표 문의드립니다

안녕하세요지표식 부탁드립니다.외부변수:시작시간 :09시 종료시간:12시 타주기(15분)첫 15분봉의 고가와 저가 중간값을 1분봉에 사용하려고 합니다.즉 첫번째 15분봉의 고가라인 저가라인 중간라인을 밴드로 만들어서 고가라인 위쪽으로 3개. 저가라인 3개를 종료시간까지 자동으로 유지할 수 있도록 지표를 만들어 주시면 감사하겠습니다.
프로필 이미지
황금룰
2026-01-23
171
글번호 230018
지표

부탁드립니다

INPUT : 기간(20),N(5) ;VAR : A(0),i(Nan),B(Nan),T(0);A=Highest (V,기간);IF V>A[1] TheNB=(O+C+L+H+C)/5;if B != B[1] Then{if B > B[1] ThenT = 1;if B < B[1] Then{T = 1;i = Index;if B <= B[1]*0.90 Then{T = 2;i = Index;}}}if T != T[1] and T == 1 andT[1] == 2 and index >= i+N ThenFind(1);하락후 돌파 검색식 입니다 하락한 지표값위에 평균가가 있는 종목 검색식 으로 수정이 가능한가요
프로필 이미지
님이랑
2026-01-23
235
글번호 230017
종목검색
답변완료

라인 설정 부탁드립니다.

input : sto1(10),sto2(5),sto3(5),침체(20),과열(80);var : stok(0),stod(0),box(0);stok = stochasticsK(sto1,sto2);stod = StochasticsD(sto1,sto2,sto3);plot1(stok,"slowk");plot2(stod,"slowd");PlotBaseLine1(20);PlotBaseLine2(80);if CrossUp(stok,80) Then#slowd기준이면 stok를 stod로 변경{ box = Box_New(sDate,sTime,H,NextBarSdate,NextBarStime,L); Box_SetColor(box,Pink); Box_SetFill(box,true); Box_SetExtFill(box,true);}else if CrossDown(stok,20) Then #slowd기준이면 stok를 stod로 변경{ box = Box_New(sDate,sTime,H,NextBarSdate,NextBarStime,L); Box_SetColor(box,Blue); Box_SetFill(box,true); Box_SetExtFill(box,true);}Else{ Box_SetEnd(box,NextBarSdate,NextBarStime,L);}위 수식에서 맨 마지막에만 수직선으로 표시될 수 있도록 변경 부탁드립니다.(변수로 과거의 선도 선택할 수 있도록요)
프로필 이미지
하리마우
2026-01-23
464
글번호 230013
지표
답변완료

수정 부탁드립니다.

mvar1 = Sarv+(AF_value)*(EP-SAR_Value); mvar2 = Max(mvar1,EntryPrice-EntryATR*ATr1);#최대손실폭이 약100p줄어듬 mvar3 = Min(mvar1,EntryPrice+ EntryATR*ATr2);#최대손실폭이 약100p줄어듬#매수진입후 파라볼릭 매도구간에 들어가면 즉시 청산 if marketPosition == 1 and Direction == 1 Then { Exitlong("bx1",AtStop,mvar2); 이식이 파라볼릭과 atr을 이용한 손절도 되지만 익절도 하는 식인가요?
프로필 이미지
산수유
2026-01-23
162
글번호 230008
시스템
답변완료

시스템 수식 검증

아래 수식 들을 검증 부탁 드립니다.특히 중괄호 부분들이 잘 되어 있는지 검토 부탁드립니다.[수식1]input : 시작일(20260101),시작시간(090000);input : 이평1(180),이평2(15);input : 윌리엄스R기간값(14);input : 손절틱수(100),목표틱수(200),트레일링스탑틱수(100);var : mav1(0),WR(0);if sdate >= 시작일 and sTime >= 시작시간 Then{Condition1 = true;Condition2 = true;}MAV1 = MA(c,이평1);WR = WILLR(윌리엄스R기간값);if TotalTrades > TotalTrades and IsExitName("StopLoss",1) ==true ThenCondition2 = False;if Condition1 == true and Condition2 == true Then{if MarketPosition == 0 and c < mav1 and CrossDown(WR, -20) ThenSell("s");if MarketPosition == -1 Then{if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*목표틱수 ThenExitShort("str",AtStop,EntryPrice-PriceScale*트레일링스탑틱수);}SetStopLoss(PriceScale*손절틱수,PointStop);}[수식2]input : 시작일(20260101),시작시간(090000);input : 이평1(180),이평2(15);input : 윌리엄스R기간값(14);input : 손절틱수(100),목표틱수(200),트레일링스탑틱수(100);var : mav1(0),WR(0);if sdate >= 시작일 and sTime >= 시작시간 Then{Condition1 = true;Condition2 = true;}MAV1 = MA(c,이평1);WR = WILLR(윌리엄스R기간값);if TotalTrades > TotalTrades and IsExitName("StopLoss",1) ==true ThenCondition2 = False;if Condition1 == true and Condition2 == true Then{if MarketPosition == 0 and c > mav1 and CrossUP(WR, -80) ThenBuy("b");if MarketPosition == 1 Then{if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*목표틱수 Then ExitLong("btr",AtStop,EntryPrice+PriceScale*트레일링스탑틱수); }SetStopLoss(PriceScale*손절틱수,PointStop);}[수식3]input : 시작일(20260101),시작시간(090000);input : 이평1(30);input : 윌리엄스R기간값(90);input : 손절틱수(140),청산틱수(240);var : mav1(0),WR(0);if sdate >= 시작일 and sTime >= 시작시간 Then{ Condition1 = true; Condition2 = true;}MAV1 = MA(c,이평1);WR = WILLR(윌리엄스R기간값);if TotalTrades > TotalTrades and IsExitName("StopLoss",1) ==true Then Condition2 = False;if Condition1 == true and Condition2 == true Then{ if MarketPosition == 0 and CrossUP(WR, -80) Then Buy("b"); if MarketPosition == 1 Then { if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*청산틱수 Then if CrossDown(C,mav1) Then ExitLong("bx"); } SetStopLoss(PriceScale*손절틱수,PointStop);}[수식4]input : 시작일(20260101),시작시간(090000);input : 이평1(30);input : 윌리엄스R기간값(90);input : 손절틱수(140),청산틱수(240);var : mav1(0),WR(0);if sdate >= 시작일 and sTime >= 시작시간 Then{ Condition1 = true; Condition2 = true;}MAV1 = MA(c,이평1);WR = WILLR(윌리엄스R기간값);if TotalTrades > TotalTrades and IsExitName("StopLoss",1) ==true Then Condition2 = False;if Condition1 == true and Condition2 == true Then{ if MarketPosition == 0 and CrossDown(WR, -20) Then Sell("s");}if MarketPosition == -1 Then{ if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*청산틱수 Then if CrossUp(C,mav1) Then ExitShort("sx"); }SetStopLoss(PriceScale*손절틱수,PointStop);[수식5]input : 시작일(20251101),시작시간(090000);input : 이평1(30),이평2(240);input : 손절틱수(150),청산틱수(300);var : mav1(0),mav2(0);if sdate >= 시작일 and sTime >= 시작시간 Then{Condition1 = true;Condition2 = true;}MAV1 = MA(c,이평1);MAV2 = MA(c,이평2);if TotalTrades > TotalTrades and IsExitName("StopLoss",1) ==true ThenCondition2 = False;if Condition1 == true and Condition2 == true Then{if MarketPosition == 0 and CrossDown(c, mav1) ThenSell("s");if MarketPosition == 1 Then{if highest(H,BarsSinceEntry) <= EntryPrice+PriceScale*청산틱수 Thenif CrossDown(C,mav2) ThenExitLong("sx"); } SetStopLoss(PriceScale*손절틱수,PointStop);}[수식6]input : 시작일(20251101),시작시간(090000);input : 이평1(30),이평2(240);input : 손절틱수(150),청산틱수(300);var : mav1(0),mav2(0);if sdate >= 시작일 and sTime >= 시작시간 Then{Condition1 = true;Condition2 = true;}MAV1 = MA(c,이평1);MAV2 = MA(c,이평2);if TotalTrades > TotalTrades and IsExitName("StopLoss",1) ==true ThenCondition2 = False;if Condition1 == true and Condition2 == true Then{if MarketPosition == 0 and CrossUp(c, mav1) ThenBuy("b");if MarketPosition == 1 Then{if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*청산틱수 Thenif CrossDown(C,mav2) ThenExitLong("bx"); } SetStopLoss(PriceScale*손절틱수,PointStop);}[수식7]input : 시작일(20260101),시작시간(090000);input : 이평1(180),이평2(15);input : 윌리엄스R기간값(14);input : 손절틱수(100),목표틱수(200),트레일링스탑틱수(100);var : mav1(0),WR(0);if sdate >= 시작일 and sTime >= 시작시간 Then{Condition1 = true;Condition2 = true;}MAV1 = MA(c,이평1);WR = WILLR(윌리엄스R기간값);if TotalTrades > TotalTrades and IsExitName("StopLoss",1) ==true ThenCondition2 = False;if Condition1 == true and Condition2 == true Then{if MarketPosition == 0 and c < mav1 and CrossDown(WR, -20) ThenSell("s");if MarketPosition == -1 Then{if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*목표틱수 ThenExitShort("str",AtStop,EntryPrice-PriceScale*트레일링스탑틱수);}SetStopLoss(PriceScale*손절틱수,PointStop);}[수식8]input : 시작일(20260101),시작시간(090000);input : 이평1(180),이평2(15);input : 윌리엄스R기간값(14);input : 손절틱수(100),목표틱수(200),트레일링스탑틱수(100);var : mav1(0),WR(0);if sdate >= 시작일 and sTime >= 시작시간 Then{Condition1 = true;Condition2 = true;}MAV1 = MA(c,이평1);WR = WILLR(윌리엄스R기간값);if TotalTrades > TotalTrades and IsExitName("StopLoss",1) ==true ThenCondition2 = False;if Condition1 == true and Condition2 == true Then{if MarketPosition == 0 and c > mav1 and CrossUP(WR, -80) ThenBuy("b");if MarketPosition == 1 Then{if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*목표틱수 Then ExitLong("btr",AtStop,EntryPrice+PriceScale*트레일링스탑틱수); }SetStopLoss(PriceScale*손절틱수,PointStop);}이상입니다.수고하세요..
프로필 이미지
블루3
2026-01-23
745
글번호 230007
시스템
답변완료

수고하십니다

항상 좋은 일만 있으시기 바랍니다psar지표를 연결psar로 색상을변경 요청 합니다현재는 음구간청색 양구간적색인데직전구간고가첫점을 돌파 하지 않으면 음구간 청색유지직전구간저가첫점을 이탈 하지 않으면 양구간 적색유지하게 색상을 변경 요청 합니다
프로필 이미지
2wnwn
2026-01-23
174
글번호 230006
지표
답변완료

경과봉 조정

아래수식은 국내지수선물데이트레이딩 수식입니다.진입명 b1,b2로 2회 거래합니다.요청사항b2진입시 경과봉 필터가 있습니다.이 경과봉에 조건을 하나 추가하고 싶습니다.기존 경과봉은 그대로 수행됩니다.단, b1이 트레일링스탑으로 포지션이 청산되었을 경우b2의 기존 경과봉이 새로운 경과봉으로 조정되는 수식입니다.ex)input : 경과봉(150), 조정경과봉(200),b2(1),진입눌림2(0),진입돌파2(0);항상 고맙습니다.****************************************************************************************************************************input : 진입시간(084500),진입제한시간(150000);input : 거래횟수(2),누적패수(2),연속패수(2),누적패수조정(2);input : b1(1),진입눌림1(0),진입돌파1(0);input : 경과봉(150),b2(1),진입눌림2(0),진입돌파2(0);input : als(21),atr1(0),atr2(999999);input : bls(40),btr1(0),btr2(999999);var : T1(0),entry(0),LL(0),EH(0),E1(0),H1(0),i1(0),S1(0),L1(0),V1(0);var : Tcond(false);var : loss(0),consecLoss(0),패수(0);//영업일변경if bdate != bdate[1] Then{//손실횟수 초기화 0loss = 0;//연속손실횟수 초기화 0consecLoss = 0;//패수는 누적패수패수 = 누적패수;}//청산발생if TotalTrades > TotalTrades[1] Then{//손실이면if PositionProfit(1) < 0 Then{//loss 1씩 증가loss = loss+1;//consecLoss 1씩 증가consecLoss = consecLoss+1;//consecLoss이 3이면 패수를 누적패수에서 누적패수조정으로 변경if consecLoss == 연속패수 Then{패수 = 누적패수조정;}}Else //손실이 아니면 consecLoss으로 초기화consecLoss = 0;}if (sdate != sdate[1] and stime >= 진입시간) or (sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then Tcond = true; if (sdate != sdate[1] and stime >= 진입제한시간) or (sdate == sdate[1] and stime >= 진입제한시간 and stime[1] < 진입제한시간) Then Tcond = false; if (sdate != sdate[1] and stime >= 진입시간) or (sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then{ T1 = TotalTrades; E1 = 0; LL = L;}if stime >= 진입시간 then{ if L < LL Then LL = L; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = (TotalTrades-T1)+1; if MarketPosition == 0 and entry == 0 Then{ if E1 == 0 and C >= LL+PriceScale*B1 Then{ E1 = 1; H1 = H; i1 = index; V1 = LL; //시작점 종가 } if E1 == 1 and index > i1 then{ if H > H1 Then H1 = H; #저가가 시작봉종가보다 클때만 눌림체크 if L >= V1 and L <= H1-PriceScale*진입눌림1 Then{ E1 = 2; i1 = index; S1 = H1; } } //시작점 종가보다 낮은 가격이 발생하면 초기화 if E1 >= 1 and L < V1 Then{ E1 = 0; LL = L; } if loss < 패수 and E1 == 2 and index > i1 and C >= S1+PriceScale*진입돌파1 and Tcond == true Then{ buy("b1"); } } if TotalTrades > TotalTrades[1] Then{ E1 = 0; LL = L; } if L < LL Then LL = L; if MarketPosition == 0 and entry >= 1 and entry < 거래횟수 Then{ if E1 == 0 and C >= LL+PriceScale*B2 Then{ E1 = 1; H1 = H; i1 = index; V1 = LL; //시작점 종가 } if E1 == 1 and index > i1 then{ if H > H1 Then H1 = H; #저가가 시작봉종가보다 클때만 눌림체크 if L >= V1 and L <= H1-PriceScale*진입눌림2 Then{ E1 = 2; i1 = index; S1 = H1; } } //시작점 종가보다 낮은 가격이 발생하면 초기화 if E1 >= 1 and L < V1 Then{ E1 = 0; LL = L; } if loss < 패수 and (TotalTrades == 0 or (TotalTrades >= 1 and BarsSinceExit(1) > 경과봉)) and loss < 누적패수 and E1 == 2 and index > i1 and C >= S1+PriceScale*진입돌파2 and Tcond == true Then{ buy("b2"); } }}if MarketPosition== 1 Then{ if IsEntryName("b1") == true Then { SetStopLoss(PriceScale*als,PointStop); SetStopTrailing(PriceScale*atr2,PriceScale*atr1,PointStop,1); } Else if IsEntryName("b2") == true Then { SetStopLoss(PriceScale*bls,PointStop); SetStopTrailing(PriceScale*btr2,PriceScale*btr1,PointStop,1); } Else { SetStopLoss(0);SetStopTrailing(0,0); }}
프로필 이미지
목마와숙녀
2026-01-23
498
글번호 230004
시스템