커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

부탁드립니다

옵션의 미결을 콜과 풋으로 나누어서 실시간으로 계속 쉽게 모니터링 할수 있는 방법은 없는지요?
프로필 이미지
jabes
2013-11-15
226
글번호 69550
검색
답변완료

수식 문의요

안녕하세요 2번째추가매수 할때는 평균단가 -5프로 이상 빠졌을때 매수하게만들어주세요 첫번째 매수하여 평균-4프로에 있을&#46468;는 2번째 매수는 못하게 하구요 -5프로 이상일때 매수들어가게 해주세요 매번-5프로 빠지면 들어가는 식이 아니구 매수가평균대비 -5프로 일경우 매수식입니다 예를들어 -10프로에 추가매수들어갈는데 평균금액이 -6프로이면 다시매수가능식입니다 매도식은 처음 매수후는 +5프로일경우 매도, 물타기(2번째추가 매수일경우 평균 +2프로에 전량대도식으로 바꾸어주세요 ) 수고하세요 input : 투자금액(200000),P(60); Var : Body(0),HighBody(0),LowBody(0),Height(0),UpTail(0),DnTail(0),Long(False); var : Vol(0),entrycond(false),mav(0); mav = ma(C,P); if date != date[1] Then entrycond = false; if CodeCategoryEx == 11 and BasePrice < 50000 Then vol = int(int((투자금액)/C)/10)*10; Else vol = int((투자금액)/C); Body = Abs(C-O); HighBody = Max(C,O); LowBody = Min(C,O); Height = H-L; UpTail = H-Max(C,O); DnTail = Min(C,O)-L; DnTail = Min(O,C) - L; Uptail = H - Max(O,C); Height = H - L; body= Abs(O-C); highbody = Max(O,C); LowBody = Min(O,C); If Abs(Open-Close) > ma(Abs(Open-Close),10)*2 Then Long = True; Else Long = False; If UpTail == 0 and DnTail == 0 Then Condition1 = True; Else Condition1 = False; If C > mav and entrycond == false and C < Ma(C,10) and DnTail < Height*0.1 and C == O and Height > Ma(Height,10) then{ buy("a1",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C < Ma(C,10) and (Uptail < Height * 0.1) and C == O and (Height > Ma(Height,10)) then{ buy("a2",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[1] < Ma(C,10)[1] and C[1] < O[1] and Long[1] == True and C > O and Long and O < L[1] and C >= (O[1]+C[1])/2 and C < O[1] then{ buy("a3",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and (C[2] >= Ma(C,10)[2] and C[2] < O[2] and C[1] < O[1] and C < O) and (O[1] > Min(O,C)[2] and O[1] < Max(O,C)[2]) and (O > Min(O,C)[1] and O < Max(O,C)[1]) and (C[2] > C[1] and C[1] > C[0]) and (L[2] < L[1] and L[1]< L[0]) then{ buy("a4",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[2] < Ma(C,10)[2] and C[2] < O[2] and C[1] > O[1] and C < O and O[1] > C[2] and O[1] == L[1] and O > Max(H[1],H[2]) and C[2] == C[0] then{ buy("a6",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and (C[4] < Ma(C,10)[4] and C[4] < O[4] and C[3] < O[3] and C[2] < O[2]) and (O[4] > O[3] and O[3] > O[2]) and (C[4] > C[3] and C[3] > C[2]) and (C[1] < O[1] and H[1] - MaxList(O,C)[1] > 0) and (H[1] < O[3] and C[2] > C[1]) and Close > Open and (O > O[1] and C > MaxList(H[1],H[2])) then{ buy("a7",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and (C[2] < Ma(C,10)[2] and Long[2] == True and C[2] < O[2]) and (C[1] == O[1] and Max(O,C)[1] < Min(O,C)[2])and (C > O and Min(O,C) > Max(O,C)[1])and (C > C[2]) then{ buy("a8",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and (C[1] < O[1] and Long[1] == True and Condition1[1] == True ) and (Long == True and C > O and Condition1 == True ) and (L > H[1]) then{ buy("a9",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[1] < Ma(C,10)[1] and C[1] < O[1] and body[1] > Ma(body[1],10)*2 and C > O and Abs(C-C[1]) < Ma(Height,10)*0.1 then{ buy("a10",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C < Ma(C,10) and body > Ma(body,10)*2 and C > O and O == L and Uptail > 0 and Uptail < Height*0.1 then{ buy("a11",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[2] < Ma(C,10)[2] and C[2] == O[2] and C[1] == O[1] and C == O and HighBody[1]< LowBody[2] and HighBody[1] < LowBody[0] then{ buy("a12",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[1] < Ma(C,10)[1] and C[1] < O[1] and body[1] > Ma(body[1],10)*2 and C == O and Highbody < Highbody[1] and Lowbody > Lowbody[1] then{ buy("a13",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[1] < Ma(C,10)[1] and C[1] < O[1] and body[1] > Ma(body[1],10)*2 and C > O and Highbody < Highbody[1] and Lowbody > Lowbody[1] then{ buy("a14",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[2] < Ma(C,10)[2] and C[2] < O[2] and body[2] > Ma(body[2],10)*2 and C[1] > O[1] and Highbody[1] < Highbody[2] and Lowbody[1] > Lowbody[2] and C > O and C > C[1] then{ buy("a15",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[1] < Ma(c,10)[1] and C[1] < O[1] and C > O and Body > Ma(Body,10)*2 and Highbody > Highbody[1] and Lowbody < Lowbody[1] then{ buy("a16",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[2] < Ma(C,10)[2] and C[2] < O[2] and C[1] > O[1] and Body[1] > Ma(Body[1],10)*2 and Highbody[1] > Highbody[2] and Lowbody[1] < Lowbody[2] and C > O and C > C[1] then{ buy("a17",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and (C[4] < Ma(c,10)[4] and Body[4] > Ma(Body,10)[4]*2 and C[4] < O[4]) and (C[3] < O[3] and C[1] < O[1]) and (Body > Ma(Body,10)*2 and C > O) and (O[3] > HighBody[2] and HighBody[2] > O[1]) and (C[3] > LowBody[2] and LowBody[2] > C[1]) and (C >= O[1] and C > O[3] and C < C[4]) then{ buy("a18",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[2] < Ma(C,10)[2] and Body[2] > Ma(Body,10)[2]*2 and C[2] < O[2] and C[1] == O[1] and HighBody[1]<LowBody[2] and C > O and C > C[2] then{ buy("a19",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[2] < Ma(C,10)[2] and Body[2] > Ma(Body,10)[2]*2 and C[2] < O[2] and Body[1] < Ma(Body,10)[1]*0.5 and HighBody[1] < LowBody[2] and C > O and C > C[2] then{ buy("a20",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[3] < Ma(C,10)[3] and Body[3] > Ma(Body,10)[3]*2 and C[3] < O[3] and Body[2] > Ma(Body,10)[2]*2 and C[2] < O[2] and O[3] == H[3] and C[3] == L[3] and O[2] == H[2] and C[2] == L[2] and O[1] < Min(O,C)[2] and H[1] > C[2] and UpTail[1] > Height*0.5 and O > H[1] and C < L[1] then{ buy("a21",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C < Ma(C,10) and DnTail < Height*0.1 and UpTail > Body*2 and Height > Ma(Height,10) and C != O then{ buy("a22",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[2] < Ma(C,10)[2] and C[2] > O[2] and C[1] > O[1] and C > O and O[1] >= LowBody[2] and O[1]<= HighBody[2] and O <= HighBody[1] and C[2] <= C[1] and C[1] <= C then{ buy("a23",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[1] < Ma(C,10)[1] and C[1] < O[1] and Body[1] > Ma(Body,10)[1]*2 and C < O and Highbody < Highbody[1] and Lowbody > Lowbody[1] then{ buy("a24",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C < Ma(C,10) and UpTail < Height*0.1 and DnTail > Body*2 and Height > Ma(Height,10) and C != O then{ buy("a26",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and (C[2] < Ma(C,10)[2] and Body[2] > Ma(Body,10)[2]*2 and C[2] < O[2]) and (C[1] < O[1] and C > O and Highbody[1] < Highbody[2] and Lowbody[1] > Lowbody[2]) and (L[1] < L[2] or L[1] < Min(L[2],L[3],L[4])) and (L[1] < O and C[1] > C) then{ buy("a27",OnClose,def,vol); entrycond = true; } SetStopProfittarget(5,PercentStop); if CurrentEntries >= 2 Then exitlong("매도2",atlimit,AvgEntryPrice*1.02);
프로필 이미지
회원
2013-11-17
242
글번호 69549
시스템
답변완료

문의드립니다

[ 기존수식] input : BBP(20),dv(2); var : BBup(0),BBdn(0); BBup = BollBandUp(BBP,dv); BBdn = BollBandDown(BBp,Dv); if C > O and C <= BBdn Then var1 = 1; if MarketPosition == 0 or C <= BBdn Then{ var1 = 2; Buy("매수"); } if C < O and BBUp>= C Then var1 = -1; if MarketPosition == 0 or C >= BBup Then{ var1 = -2; sell("매도"); } if MarketPosition == 1 Then{ if countif(C<O,3) == 3 and C < EntryPrice Then ExitLong(); if stime == 150000 and C <= EntryPrice-0.5 Then ExitLong(); } if MarketPosition == -1 Then{ if countif(C>O,3) == 3 and C > EntryPrice Then ExitShort(); if stime == 150000 and C >= EntryPrice+0.5 Then ExitShort(); } 위 수식에서 신호발생 봉에서 지표상 거래대금(전일비교)이 10,000 이상 또는 직전봉대비 거래대금이 500%이상 높을경우 하나라도 해당될때 신호 진입하고, 반대의 경우는 신호 집입 금지로 수정좀 부탁드립니다.
프로필 이미지
칼봉산
2013-11-15
203
글번호 69547
지표
답변완료

감사합니다.

감사합니다. Input : Period(20), LPercent(85); Var : value(0); value = Disparity(Period) ; If value <= LPercent and countif(c >=o,5) >= 2 Then Buy(); 이 수식이 20선 대비 이격도 85보다 작거나 같고, 양봉2개이상인 경우 매수 신호인지요? 그리고 "20분선과 현재주가의 괴리 80% 발생후 30분 경과"를 조건식으로 하면 어떻게 되는지요? 감사합니다.
프로필 이미지
huhboo99
2013-11-15
215
글번호 69543
시스템
답변완료

문의드립니다

메타로 짜여진 수식을 예스로 변경을 할려고 하는데 어렵네요 좀 도와주세요 메타로 단순 매수 매도식으로 나오는것인데요 ========================================= #property copyright "Copyright ?2010, FX Turbo Marksman" #property link "http://www.fxturbomarksman.com" #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Red #property indicator_color2 Yellow #property indicator_width1 1 #property indicator_width2 1 extern int gi_76 = 4; extern int gi_80 = 500; extern bool SoundAlarm = FALSE; extern bool EmailAlarm = FALSE; double g_ibuf_92[]; double g_ibuf_96[]; int gi_100 = 0; int gi_104 = 0; int init() { IndicatorBuffers(2); SetIndexStyle(0, DRAW_ARROW); SetIndexArrow(0, 164); SetIndexStyle(1, DRAW_ARROW); SetIndexArrow(1, 164); SetIndexBuffer(0, g_ibuf_92); SetIndexBuffer(1, g_ibuf_96); GlobalVariableSet("AlertTime" + Symbol() + Period(), TimeCurrent()); GlobalVariableSet("SignalType" + Symbol() + Period(), 5); return (0); } int deinit() { GlobalVariableDel("AlertTime" + Symbol() + Period()); GlobalVariableDel("SignalType" + Symbol() + Period()); return (0); } int start() { int li_12; double ld_52; double ld_60; double ld_68; double ld_76; double ld_84; double ld_92; double ld_100; double lda_108[1000]; double ld_120; if (gi_80 >= 1000) gi_80 = 950; SetIndexDrawBegin(0, Bars - gi_80 + 11 + 1); SetIndexDrawBegin(1, Bars - gi_80 + 11 + 1); int l_ind_counted_8 = IndicatorCounted(); double ld_112 = 0; int li_20 = gi_76 * 2 + 3; double ld_36 = gi_76 + 67; double ld_44 = 33 - gi_76; int l_period_24 = li_20; if (Bars <= 12) return (0); if (l_ind_counted_8 < 12) { for (int li_0 = 1; li_0 <= 0; li_0++) g_ibuf_92[gi_80 - li_0] = 0.0; for (li_0 = 1; li_0 <= 0; li_0++) g_ibuf_96[gi_80 - li_0] = 0.0; } for (int li_4 = gi_80 - 11 - 1; li_4 >= 0; li_4--) { li_12 = li_4; ld_76 = 0.0; ld_84 = 0.0; for (li_12 = li_4; li_12 <= li_4 + 9; li_12++) ld_84 += MathAbs(High[li_12] - Low[li_12]); ld_76 = ld_84 / 10.0; li_12 = li_4; ld_68 = 0; while (li_12 < li_4 + 9 && ld_68 < 1.0) { if (MathAbs(Open[li_12] - (Close[li_12 + 1])) >= 2.0 * ld_76) ld_68 += 1.0; li_12++; } if (ld_68 >= 1.0) ld_92 = li_12; else ld_92 = -1; li_12 = li_4; ld_68 = 0; while (li_12 < li_4 + 6 && ld_68 < 1.0) { if (MathAbs(Close[li_12 + 3] - Close[li_12]) >= 4.6 * ld_76) ld_68 += 1.0; li_12++; } if (ld_68 >= 1.0) ld_100 = li_12; else ld_100 = -1; if (ld_92 > -1.0) l_period_24 = 3; else l_period_24 = li_20; if (ld_100 > -1.0) l_period_24 = 4; else l_period_24 = li_20; ld_52 = 100 - MathAbs(iWPR(NULL, 0, l_period_24, li_4)); lda_108[li_4] = ld_52; g_ibuf_92[li_4] = 0; g_ibuf_96[li_4] = 0; ld_60 = 0; if (ld_52 < ld_44) { for (int li_16 = 1; lda_108[li_4 + li_16] >= ld_44 && lda_108[li_4 + li_16] <= ld_36; li_16++) { } if (lda_108[li_4 + li_16] > ld_36) { ld_60 = High[li_4] + ld_76 / 2.0; if (li_4 == 1 && gi_100 == FALSE) { gi_100 = TRUE; gi_104 = FALSE; } g_ibuf_92[li_4] = ld_60; } } if (ld_52 > ld_36) { for (li_16 = 1; lda_108[li_4 + li_16] >= ld_44 && lda_108[li_4 + li_16] <= ld_36; li_16++) { } if (lda_108[li_4 + li_16] < ld_44) { ld_60 = Low[li_4] - ld_76 / 2.0; if (li_4 == 1 && gi_104 == FALSE) { gi_104 = TRUE; gi_100 = FALSE; } g_ibuf_96[li_4] = ld_60; } } } if (gi_100 == TRUE && TimeCurrent() > GlobalVariableGet("AlertTime" + Symbol() + Period()) && GlobalVariableGet("SignalType" + Symbol() + Period()) != 0.0) { ld_120 = High[iHighest(Symbol(), 0, MODE_HIGH, 3, 0)] + 5.0 * Point; if (SoundAlarm) Alert("Sell signal @ ", Symbol(), " Period ", Period(), " Stop Loss @", ld_120); if (EmailAlarm) SendMail("Sell Signal FX Marksman", "Sell signal @ " + Symbol() + " Period " + Period() + " Stop Loss @ " + ld_120); ld_112 = TimeCurrent() + 60.0 * (Period() - MathMod(Minute(), Period())); GlobalVariableSet("AlertTime" + Symbol() + Period(), ld_112); GlobalVariableSet("SignalType" + Symbol() + Period(), 0); } if (gi_104 == TRUE && TimeCurrent() > GlobalVariableGet("AlertTime" + Symbol() + Period()) && GlobalVariableGet("SignalType" + Symbol() + Period()) != 1.0) { ld_120 = Low[iLowest(Symbol(), 0, MODE_LOW, 3, 0)] - 5.0 * Point; if (SoundAlarm) Alert("Buy signal @ ", Symbol(), " Period ", Period(), " Stop Loss @", ld_120); if (EmailAlarm) SendMail("BUY Signal FX Marksman", "Buy signal @ " + Symbol() + " Period " + Period() + " Stop Loss @ " + ld_120); ld_112 = TimeCurrent() + 60.0 * (Period() - MathMod(Minute(), Period())); GlobalVariableSet("AlertTime" + Symbol() + Period(), ld_112); GlobalVariableSet("SignalType" + Symbol() + Period(), 1); } return (0); } 부탁드립니다.
프로필 이미지
드림컴트루1
2013-11-15
1133
글번호 69538
시스템

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

프로필 이미지
huhboo99
2013-11-15
0
글번호 69535
시스템
답변완료

감사합니다.

감사합니다. input : P(20),per(30); var1 = ma(c,P); if CrossDown(c,var1*(1-Per/100)) Then buy(); 위의 수식에 조건을 추가하여 아래와 같이 하면 지표상에서 조건이 충족되었은데도 신호가 발생하는 않은 사유는 무엇언지요? if CrossDown(c,var1*(1-Per/100)) and countif(c >=o,3) == 3 Then buy(); 감사합니다.
프로필 이미지
huhboo99
2013-11-15
196
글번호 69534
시스템
답변완료

청산 ?

안녕하세요 매수포지션. 에서 1.5p. 손해나면. 추가 매수1개약 매도 포지션. 에서. . 1.5p. 손해나면. 추가 매도. 1개약 감사^^
프로필 이미지
회원
2013-11-15
191
글번호 69531
시스템
답변완료

질문입니다.

사용자함수 min에서 안에 들어가는 a,b,c,d,e..의 변수 개수가 정해져 있나요? 예를들어 3개까지만 가능?... MIN(a,b,c,d,e,f,g,h...)
프로필 이미지
회원
2013-11-15
162
글번호 69522
지표