커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

1분봉 dema200 이평을 100틱챠트에 표시하기

항상 감사드립니다 아래식을 dema 이평으로 바꾸고 싶습니다 A: 1분봉에서 dema 이평 200선을 100틱챠트에 표시하기... input : P(10); var : Cma(0,data2),Hma(0,data2),Lma(0,data2); Cma = data2(ma(c,P)); Hma = data2(ma(H,P)); Lma = data2(ma(L,P)); plot1(Cma); plot2(Hma); plot3(Lma); B: 100틱봉에서 30분봉 10이평선 표시하기 input : P(10); var : TF(0),cnt(0),Csum(0),Hsum(0),Lsum(0),Cma(0),Hma(0),Lma(0); Array : CC[100](0),HH[100](0),LL[100](0); TF = TimeToMinutes(stime); if dayindex == 0 or (TF > TF[1]) Then{ HH[0] = H; LL[0] = L; for cnt = 1 to 99{ CC[cnt] = CC[cnt-1][1]; HH[cnt] = HH[cnt-1][1]; LL[cnt] = LL[cnt-1][1]; } } if H > HH[0] Then HH[0] = H; if L < LL[0] Then LL[0] = L; Csum = 0; Hsum = 0; Lsum = 0; if CC[P] > 0 Then{ for cnt = 0 to P-1{ Csum = Csum+CC[cnt]; Hsum = Hsum+HH[cnt]; Lsum = Lsum+LL[cnt]; } Cma = Csum/P; Hma = Hsum/P; Lma = Lsum/P; plot1(Cma); plot2(Hma); plot3(Lma); } C: 100틱봉에서 30분봉 10이평을 상향돌파하면 매수, 100틱봉에서 30분봉 10이평을 하향돌파하면 매도, 감사합니다...
프로필 이미지
조민철
2015-06-08
197
글번호 86956
지표
답변완료

질문있습니다

수고가 많으십니다. 주식종목 10분봉 차트로 시뮬레이션을 돌려보고 있는데요. 생각한대로 잘 안되서 질문드립니다. 제가 작성한 수식은 다음과 같습니다. 수식1) if MarketPosition == 0 Then { buy("매수", AtLimit, DayClose(1)*0.95); } SetStopProfittarget(10); SetStopLoss(10); 이렇게 하면 현재가가 전일종가보다 5%이상 낮으면 무조건 매수해야 되는거 맞죠? 그런데, 매수안될때도 있던데 왜 그런가요? 테스트종목 : 고려포리머 검토대상 날짜 : 2005.03.08 ~ 09 설정조건 : 수정주가 적용, 일간갭보정 미적용, 10분봉차트 8일은 전날보다 -60% 가량 떨어졌고, 9일도 전날보다 -60%가량 떨어졌는데, 그러면 8일에도 매수발생, 9일에도 매수발생이 일어나야 되는거 아닌가요? 그런데, 8일에는 안일어나고 9일에만 일어납니다. 왜 그런지 답변부탁드리고요. 수식2) 이번 전략은 다음과 같습니다. (1)볼린저밴드 하단선보다 -2%이상 떨어진 경우 즉시 매수하되, (2)당일시가가 전날종가보다 -10%이상 하락하여 출발할 경우에는 매수금지 (3)하루중 맨 마지막봉과 맨처음봉에서는 매수가 발생하지 않음 제 생각대로라면 위 종목의 경우 8일과 9일 모두 매수가 일어나면 안되는데, 둘다 매수가 발생하네요. 이것도 왜 그런지 답변부탁드립니다. Input: 볼린저기간(10), 볼린저D(2); Variables: BBTop(0), BBMid(0), BBBot(0); BBTop = BollBandUp(볼린저기간,볼린저D); BBMid = ma(C,볼린저기간); BBBot = BollBandDown(볼린저기간,볼린저D); if MarketPosition == 0 and (DayOpen() > DayClose(1)*0.9) and time > 90500 and time < 144500 Then { buy("매수", AtLimit, BBBot*0.98); } SetStopProfittarget(10); SetStopLoss(10);
프로필 이미지
기똥찬
2015-06-08
185
글번호 86955
시스템

정상에서야 님에 의해서 삭제되었습니다.

프로필 이미지
정상에서야
2015-06-08
1
글번호 86954
시스템
답변완료

안녕하세요*

안녕하세요 아무리 해봐도 안되어서 부탁합니다 아래식은 Trix 조합변형한 것입니다 trix형태로 StochasticsK(36)(18)(9)를 같은형태로 좀 부탁합니다 감사합니다 Input : Period(12), sigPeriod(9); Var : value1(0),value2(0),OSC(0); value1 = TRIX(Period); value2 = ema(value1,sigPeriod); OSC = value1-ema(value1,Period); if OSC > 0 then//막대 그래프 plot1(OSC,"OSC",YELLOW); else Plot1(OSC,"OSC",GREEN); PlotBaseLine1(0, "기준선1"); PlotBaseLine2(0.005, "기준선1"); PlotBaseLine3(-0.005, "기준선1");
프로필 이미지
회원
2016-12-11
182
글번호 86953
지표

생선가시 님에 의해서 삭제되었습니다.

프로필 이미지
생선가시
2015-06-08
0
글번호 86952
시스템
답변완료

질문이요

ntime, examday, futmangi 가 사용이안되는데 예스트레이더는 뭐로 바꿔서 사용하면 되나요? 자꾸 선언되지 않은 이름이라고 나오네요.
프로필 이미지
생선가시
2015-06-08
177
글번호 86951
시스템
답변완료

수식

안녕하세요. 아래수식은 메타4지표인데요 이걸 사용할수있게 바꿔줄수 있나요? 메타로 보니 좋은데 수식은 머가먼지 하나도 모르겟네요. 시간이 걸린다면 마지박 세번째라도 부탁합니다. 첫번째 #property indicator_separate_window #property indicator_buffers 6 #property indicator_color1 Black #property indicator_color2 Lime #property indicator_color3 Red #property indicator_color4 Yellow #property indicator_color5 Lime #property indicator_color6 Red extern bool ALERTS = TRUE; extern bool SoundAlerts = TRUE; extern string SoundAlertFile = "alert.wave"; extern bool eMailAlerts = TRUE; int G_bars_96; int Gi_100 = 21; double G_ibuf_104[]; double G_ibuf_108[]; double G_ibuf_112[]; double G_ibuf_116[]; double G_ibuf_120[]; double G_ibuf_124[]; // E37F0136AA3FFAF149B351F6A4C948E9 int init() { SetIndexStyle(0, DRAW_NONE); SetIndexStyle(1, DRAW_LINE, EMPTY, 3); SetIndexStyle(2, DRAW_LINE, EMPTY, 3); SetIndexStyle(3, DRAW_LINE, EMPTY, 3); SetIndexStyle(4, DRAW_ARROW, EMPTY, 2); SetIndexArrow(4, 225); SetIndexStyle(5, DRAW_ARROW, EMPTY, 2); SetIndexArrow(5, 226); IndicatorDigits(Digits + 0); SetIndexBuffer(0, G_ibuf_104); SetIndexBuffer(1, G_ibuf_108); SetIndexBuffer(2, G_ibuf_112); SetIndexBuffer(3, G_ibuf_116); SetIndexBuffer(4, G_ibuf_120); SetIndexBuffer(5, G_ibuf_124); IndicatorShortName("MEGAFXPROFIT ?www.megafxprofit.com"); SetIndexLabel(0, NULL); SetIndexLabel(1, NULL); SetIndexLabel(2, NULL); SetIndexLabel(3, NULL); SetIndexLabel(4, NULL); return (0); } // EA2B2676C28C0DB26D39331A336C6B92 int start() { double Ld_0; double Ld_8; double Ld_16; string Ls_104; string Ls_112; string Ls_120; int Li_24 = IndicatorCounted(); double Ld_28 = 0; double Ld_36 = 0; double Ld_unused_44 = 0; double Ld_unused_52 = 0; double Ld_60 = 0; double Ld_unused_68 = 0; double low_76 = 0; double high_84 = 0; if (Li_24 > 0) Li_24--; int Li_92 = Bars - Li_24; for (int Li_96 = 0; Li_96 < Li_92; Li_96++) { high_84 = High[iHighest(NULL, 0, MODE_HIGH, Gi_100, Li_96)]; low_76 = Low[iLowest(NULL, 0, MODE_LOW, Gi_100, Li_96)]; Ld_16 = (High[Li_96] + Low[Li_96]) / 2.0; Ld_28 = 0.66 * ((Ld_16 - low_76) / (high_84 - low_76) - 0.5) + 0.67 * Ld_36; Ld_28 = MathMin(MathMax(Ld_28, -0.999), 0.999); G_ibuf_104[Li_96] = MathLog((Ld_28 + 1.0) / (1 - Ld_28)) / 2.0 + Ld_60 / 2.0; Ld_36 = Ld_28; Ld_60 = G_ibuf_104[Li_96]; } bool Li_100 = TRUE; for (Li_96 = Li_92 - 2; Li_96 >= 0; Li_96--) { G_ibuf_116[Li_96] = 0; Ld_8 = G_ibuf_104[Li_96 + 1]; Ld_0 = G_ibuf_104[Li_96 + 2]; if ((Ld_8 < 0.0 && Ld_0 > 0.0) || Ld_8 < 0.0) { Li_100 = FALSE; if (Ld_8 < 0.0 && Ld_0 > 0.0) { Ls_104 = Symbol() + ", TF:" + f0_0(Period()); Ls_112 = Ls_104 + ", MEGAFXPROFIT SELL SIGNAL for Level: " + Ld_8; Ls_120 = Ls_112 + " @ " + TimeToStr(TimeLocal(), TIME_SECONDS); if (Bars > G_bars_96) { G_bars_96 = Bars; f0_1(Ls_120, Ls_112); } } } if ((Ld_8 > 0.0 && Ld_0 < 0.0) || Ld_8 > 0.0) { Li_100 = TRUE; if (Ld_8 > 0.0 && Ld_0 < 0.0) { Ls_104 = Symbol() + ", TF:" + f0_0(Period()); Ls_112 = Ls_104 + ", MEGAFXPROFIT BUY SIGNAL for Level: " + Ld_8; Ls_120 = Ls_112 + " @ " + TimeToStr(TimeLocal(), TIME_SECONDS); if (Bars > G_bars_96) { G_bars_96 = Bars; f0_1(Ls_120, Ls_112); } } } if (!Li_100) { G_ibuf_112[Li_96] = Ld_8; G_ibuf_108[Li_96] = 0.0; } else { G_ibuf_108[Li_96] = Ld_8; G_ibuf_112[Li_96] = 0.0; } } for (Li_96 = 0; Li_96 < Li_92; Li_96++) { if (G_ibuf_108[Li_96] > 0.0 && G_ibuf_108[Li_96 + 1] == 0.0) G_ibuf_120[Li_96] = G_ibuf_108[Li_96]; if (G_ibuf_112[Li_96] < 0.0 && G_ibuf_112[Li_96 + 1] == 0.0) G_ibuf_124[Li_96] = G_ibuf_112[Li_96]; } return (0); } // FF3DED0DF4360E36577F1A7C4D36796A void f0_1(string As_0, string As_8) { if (ALERTS) Alert(As_0); if (SoundAlerts) PlaySound(SoundAlertFile); if (eMailAlerts) SendMail(As_8, As_0); } // A9BA851E539886467D4ECFDDCA93F414 string f0_0(int Ai_0) { switch (Ai_0) { case 1: return ("M1"); case 5: return ("M5"); case 15: return ("M15"); case 30: return ("M30"); case 60: return ("H1"); case 240: return ("H4"); case 1440: return ("D1"); case 10080: return ("W1"); case 43200: return ("MN1"); } WindowRedraw(); return (Period()); } 두번째 #property indicator_separate_window #property indicator_buffers 3 #property indicator_color2 Aqua #property indicator_color3 Red #property indicator_style2 STYLE_SOLID #property indicator_style3 STYLE_SOLID #property indicator_width2 2 #property indicator_width3 2 //------------------------------------------------------------------- extern int period=8; extern bool alarm=true; extern bool EhlersFormula = true; //------------------------------------------------------------------- double ExtBuffer0[]; double ExtBuffer1[]; double ExtBuffer2[]; double alertBar; double last; int init() { SetIndexStyle(0,DRAW_NONE); SetIndexStyle(1,DRAW_HISTOGRAM); SetIndexStyle(2,DRAW_HISTOGRAM); IndicatorDigits(Digits+1); SetIndexBuffer(0,ExtBuffer0); SetIndexBuffer(1,ExtBuffer1); SetIndexBuffer(2,ExtBuffer2); IndicatorShortName("smFisherTransform3" +" ("+period+")"); SetIndexLabel(1,NULL); SetIndexLabel(2,NULL); return(0); } int start() { int limit; int counted_bars=IndicatorCounted(); double prev,current,old; double Value=0,Value1=0,Value2=0,Fish=0,Fish1=0,Fish2=0; double price; double MinL=0; double MaxH=0; if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; //for(int i=0; i<Bars; i++) for(int i=0; i<limit; i++) { MaxH = High[Highest(NULL,0,MODE_HIGH,period,i)]; MinL = Low[Lowest(NULL,0,MODE_LOW,period,i)]; price = (High[i]+Low[i])/2; if (EhlersFormula == false) { if(MaxH-MinL == 0) Value = 0.33*2*(0-0.5) + 0.67*Value1; else Value = 0.33*2*((price-MinL)/(MaxH-MinL)-0.5) + 0.67*Value1; } else { if(MaxH-MinL == 0) Value = 0.5*2*(0-0.5) + 0.5*Value1; else Value = 0.25*2*((price-MinL)/(MaxH-MinL)-0.5) + 0.75*Value1; //else Value = 0.5*2*((price-MinL)/(MaxH-MinL)-0.5) + 0.5*Value1; //original Ehlers } if (EhlersFormula == false) Value=MathMin(MathMax(Value,-0.999),0.999); else if (EhlersFormula == true) { if (Value > 0.9999) Value = 0.9999; if (Value < -0.9999) Value = -0.9999; } if (EhlersFormula == false) { if(1-Value == 0) ExtBuffer0[i]=0.5+0.5*Fish1; else ExtBuffer0[i]=0.5*MathLog((1+Value)/(1-Value))+0.5*Fish1; } else { if(1-Value == 0) ExtBuffer0[i]=0.25+0.75*Fish1; else ExtBuffer0[i]=0.25*MathLog((1+Value)/(1-Value))+0.75*Fish1; //original Ehlers is 0.25/0.5...? } Value1=Value; Fish1=ExtBuffer0[i]; } bool up=true; //for(i=Bars; i>=0; i--) { for(i=limit; i>=0; i--) { current=ExtBuffer0[i]; prev=ExtBuffer0[i+1]; if (((current<0)&&(prev>0))||(current<0)) up= false; if (((current>0)&&(prev<0))||(current>0)) up= true; if(!up) { ExtBuffer2[i]=current; ExtBuffer1[i]=0.0; if (alarm == true) { if (i==0 && prev != 2 && ExtBuffer1[i] == 0 && Bars>alertBar) { Alert("ForexTrend Changing Down on ",Period()," ",Symbol()); alertBar = Bars; last = 2; } } } else { ExtBuffer1[i]=current; ExtBuffer2[i]=0.0; if (alarm == true) { if (i==0 && last != 1 && ExtBuffer2[i] == 0 && Bars>alertBar) { Alert("ForexTrend Changing Up on ",Period()," ",Symbol()); alertBar = Bars; last = 1; } } } } return(0); } 세번째 #property copyright "Alksnis Gatis" #property link "2xpoint@gmail.com" //---- #property indicator_separate_window #property indicator_buffers 3 #property indicator_color1 Blue #property indicator_color2 Red #property indicator_color3 White #property indicator_width2 2 //---- input parameters extern int RangePeriod=25; extern int SmoothPeriod=3; extern int SmoothMode=MODE_SMA; extern int Per=5; //---- buffers double ExtMapBuffer0[]; double ExtMapBuffer1[]; double ExtMapBuffer2[]; double ExtMapBuffer3[]; double ExtMapBuffer4[]; //double ExtMapBuffer5[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators IndicatorBuffers(5); SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,ExtMapBuffer1); SetIndexDrawBegin(0,SmoothPeriod); SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(1,ExtMapBuffer2); SetIndexDrawBegin(1,SmoothPeriod); SetIndexBuffer(2,ExtMapBuffer0); SetIndexBuffer(3,ExtMapBuffer3); SetIndexBuffer(4,ExtMapBuffer4); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); //---- int limit,limit1,cnt,n_max,n_min; if (counted_bars==0) { limit=Bars-RangePeriod; limit1=limit-SmoothPeriod; } if (counted_bars>0) { limit=Bars-counted_bars; limit1=limit; } limit--; limit1--; for(cnt=limit; cnt>=0;cnt--) { ExtMapBuffer0[cnt]=iCustom(NULL,0,"METRO",1,cnt); } for(cnt=limit; cnt>=0;cnt--) { n_max=ArrayMaximum(ExtMapBuffer0,RangePeriod,cnt); n_min=ArrayMinimum(ExtMapBuffer0,RangePeriod,cnt); ExtMapBuffer3[cnt]=ExtMapBuffer0[n_max]; ExtMapBuffer4[cnt]=ExtMapBuffer0[n_min]; } for(cnt=limit1; cnt>=0;cnt--) { ExtMapBuffer1[cnt]=iMAOnArray(ExtMapBuffer3,0,SmoothPeriod,0,SmoothMode,cnt); ExtMapBuffer2[cnt]=iMAOnArray(ExtMapBuffer4,0,SmoothPeriod,0,SmoothMode,cnt); } //---- return(0); } //+---------------------------------------------------- 수고하십시요.
프로필 이미지
바닥차기
2015-06-08
1199
글번호 86950
지표
답변완료

검색식 관련 문의

검색식 현상태가 매수신호인 종목만 검색하고 싶은데 매수유지종목도 같이 나오네요 조치사항좀 부탁드립니다.
프로필 이미지
필승0701
2015-06-08
166
글번호 86949
검색
답변완료

매수한번 매도한번 진입시스템 부탁드립니다..

더우신데 수고많으십니다 ^^ 매수진입조건1 매도진입조건1 이렇게 해서 하루에 매수조건과 매도조건이 한번씩 진입되어 청산은 (6틱 수익 청산, 6틱 손절 청산) 하루에 매수조건만 나오면 그 매수조건 1번만 진입하고 청산조건(6틱수익,6틱손절) 만족하면 매매종료 되는 식을 부탁드립니다. 즉, 하루에 매수조건 한번 매도조건 한번이요. 청산은 6틱수익, 6틱손절
프로필 이미지
골드삭스
2015-06-08
188
글번호 86946
시스템