커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

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

프로필 이미지
정상에서야
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
170
글번호 86953
지표

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

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

질문이요

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

검색식 관련 문의

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

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

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

NH 투자증권에서 제공하는 OPEN API에 대하여

안녕하세요. NH투자증권에서 제공하는 OPEN API를 이용하여 프로그램을 작성하고 있는데요. KOSPI200 선물 시세에서 실시간으로 계속해서 체결건수를 받고 싶은데 어떤 TR의 어떤 Output Field를 이용하여야 선물 체결건수를 알수가 있습니까? 빠른 답변 부탁드립니다. 감사합니다.
프로필 이미지
코바
2015-06-08
282
글번호 86945
검색
답변완료

부탁드립니다.

input : 익절틱수(100),당일수익(200);#틱수 input : 당일손실(150);#틱수 input : g(25),r(50),s(2); Input : period1(12); var : NP(0),PreNP(0),dayPL(0),Econd(false); var : SMIv(0),T(0); Var : sonarv(0); sonarv = SONAR(period1); SMIv = ema(ema(c-(highest(H,g) + lowest(L,g))*0.5, r),s) * 100 / (0.5 * ema(ema(highest(H,g)-lowest(L,g),r),s)) ; NP = NetProfit; if bdate != bdate[1] Then{ PreNP = NP[1]; Econd = false; } dayPL = NP-PreNP; if BarsSinceExit(1) == 1 and (IsExitName("bx1",1) or IsExitName("sx1",1)) Then Econd = true; if Econd == false Then{ if stime >= 090000 or stime < 020000 then{ if SMIv > SMIv[1] Then T = 1; if SMIv < SMIv[1] Then T = -1; If T == 1 and sonarv > sonarv[1] and C <= O Then buy(); If T == -1 and sonarv < sonarv[1] and C >= O Then sell(); } } if MarketPosition == 1 Then{ if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*50 Then{ ExitLong("bx",AtStop,EntryPrice+PriceScale*1); } ExitLong("bx1",AtLimit,EntryPrice+((당일수익*PriceScale)-daypl)); ExitLong("bx2",AtStop,EntryPrice-((당일손실*PriceScale)+daypl)); } if MarketPosition == -1 Then{ if Lowest(l,BarsSinceEntry) <= EntryPrice-PriceScale*50 Then{ ExitShort("sx",AtStop,EntryPrice-PriceScale*1); } ExitLong("sx1",AtLimit,EntryPrice-((당일수익*PriceScale)+daypl)); ExitLong("sx2",AtStop,EntryPrice+((당일손실*PriceScale)-daypl)); } SetStopProfittarget(PriceScale*익절틱수, PointStop); if stime == 050000 or (stime > 050000 and stime[1] < 050000) Then{ ExitLong(); ExitShort(); } 상기식이 제대로 실행이 안되어 다시 질문드립니다. 지금 sx1 에서 진입후 바로 청산이 되어버리면서 매매종료가 되어버리는듯합니다. 당일수익이 200틱 설정인데...몇틱수익이 아닌데도 sx1청산으로 매매종료되는것같네요. 검토후 수정부탁드립니다. 미리 감사드립니다.
프로필 이미지
vmfha
2015-06-08
192
글번호 86943
시스템