커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1585
글번호 230811
답변완료
특정일의 특정시간
항상 감사합니다.
2일전 2시의 고가를 수식으로 표현하려면 어떻게 해야 하나요?
2023-01-19
493
글번호 165567
돈을잃자 님에 의해서 삭제되었습니다.
2023-01-19
15
글번호 165566
답변완료
골든크로스 당일 최소값 표현 문의
1.당일 20ma/60ma 골든크로스일때 골든크로스 값 기준(60ma)값이 당일 최소값으로
표현 부탁드립니다.
*골든 크로스 아닌 기간은 계속 직전 당일 최소값으로 유지 부탁드립니다.
2. data2(콜) data3(풋) 가격이 골든크로스 일 경우 (큰 값)기준으로 당일 최소값으로
표현 부탁드립니다.
*골든 크로스 아닌 기간은 계속 직전 당일 최소값으로 유지 부탁드립니다
새해 복 많이 받으시고 23년도 모두 부자되세요!!!
2023-01-19
925
글번호 165560
답변완료
함수요청
안녕하세요?
data1, 국내선물 1분봉으로 일중거래를 하고자 합니다.
data2는 특정 지수의 일봉을 놓고
- 매수 : 완성 익봉 시가 진입(1,2,3 and조건)
1. data1의 당일 시가가 data1의 전영업일 종가 대비 상승 출발
2. data2의 전일 등락률이 0보다 큼(전영업일에 상승 마감)
3. data1의 당일 시가가 data2의 종가의 값 보다 작음
- 매도 : 완성 익봉 시가 진입(1,2,3 and조건)
1. data1의 당일 시가가 data1의 전영업일 종가 대비 하락 출발
2. data2의 전일 등락률이 0보다 작음(전영업일에 하락 마감)
3. data1의 당일 시가가 data2의 종가의 값 보다 큼
- 매수청산 : 완성 익봉 시가 진입([1 and 2 and 3] or [1 and 2 and 4] 조건)
1. data1 현재가가 100ma 이탈시
2. data1 현재가가 150ma 이탈시
3. data2 전영업일 고점돌파시
4. data2 전영업일 저점이탈시
- 매도청산 : 완성 익봉 시가 진입([1 and 2 and 3] or [1 and 2 and 4] 조건)
1. data1 현재가가 100ma 돌파시
2. data1 현재가가 150ma 돌파시
3. data2 전영업일 고점돌파시
4. data2 전영업일 저점이탈시
- 강제청산 : 15시 20분
- 진입횟수 제어 : 매수든 매도든 진입기준 1회
상기의 논리상으로 스크립트 작성 부탁드립니다.
감사합니다.
2023-01-19
1055
글번호 165559
답변완료
코스피의 거래대금을 시간단위로 볼 수 있나요?
안녕하세요!
코스피의 거래대금을 시간단위로 볼 수 있는 지표나 수식이있나요? 창에서 일간 거래대금이랑 시간이하 단위의 거래량은 확인 가능하나, 코스피 코스닥은 거래대금이 개별종목과 달리 단순히 거래량과 금액을 곱한게 아닌것 같습니다.
감사합니다.
2023-01-19
1062
글번호 165558
답변완료
시스템 작성의뢰
수고 하십니다 !
eu mirco 1틱 차트에서 이평선이정배열 되고 1920 이평선과 3840 이평선의 간격이
20틱이상 벌어지고 pvi 지표가 100.20 이상이 되었을때 매도 체결을 하고 이평선 120선과
240선이 다운크로스 할때 청산을한다
eu mirco 1틱 차트에서 이평선이 역배열 되고 1920 이평선과 3840 이평선의 간격이
20틱이상 벌어지고 pvi 지표가 98.20 이하가 되었을때 매수 체결을 하고 이평선 120선과
240선이 업 크로스 할때 청산을한다
2023-01-19
891
글번호 165556
답변완료
수식 문의드립니다.
안녕하세요,
2023년 01월 25일 부터 주식시장 호가단위가 다음과 같이 변경된다고 하는데요.
2000 미만 : 1원
2000~5000 : 5원
5000~20000 : 10원
20000~50000 : 50원
50000~200000 : 100원
200000~500000 : 500원
500000 이상 : 1000원
(거래소/코스닥 동일)
위 사항을 적용하려면 이전에 알려주신 상한가 수식을 어떻게 변경해야 할까요?
--------------------------------------------------------------------
var : 상한가(0), UpLimit(0);
var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(0);
if date >= 19981207 then {
if date < 20050328 && CodeCategory() == 2 then
UpLimit = (BP[0] * 1.12);
Else if date >= 20050328 and date < 20150615 Then
UpLimit = (BP[0] * 1.15);
Else
UpLimit = (BP[0] * 1.30);
if CodeCategory() == 2 then
{
if date >= 20030721 then
{
up1 = int(UpLimit/100+0.00001)*100;
up2 = int(UpLimit/100+0.00001)*100;
up3 = int(UpLimit/100+0.00001)*100;
up4 = int(UpLimit/50+0.00001)*50;
up5 = int(UpLimit/10+0.00001)*10;
up6 = int(UpLimit/5+0.00001)*5;
up7 = int(UpLimit/1+0.00001)*1;
}
else
{
up1 = int(UpLimit/1000+0.00001)*1000;
up2 = int(UpLimit/500+0.00001)*500;
up3 = int(UpLimit/100+0.00001)*100;
up4 = int(UpLimit/50+0.00001)*50;
up5 = int(UpLimit/10+0.00001)*10;
up6 = int(UpLimit/10+0.00001)*10;
up7 = int(UpLimit/1+0.00001)*1;
}
}
Else
{
up1 = int(UpLimit/1000+0.00001)*1000;
up2 = int(UpLimit/500+0.00001)*500;
up3 = int(UpLimit/100+0.00001)*100;
up4 = int(UpLimit/50+0.00001)*50;
up5 = int(UpLimit/10+0.00001)*10;
up6 = int(UpLimit/5+0.00001)*5;
up7 = int(UpLimit/1+0.00001)*1;
}
if CodeCategory() == 1 || CodeCategory() == 2 then
{
if sdate < 20101004 Then
{
If BP >= 500000 Then
상한가 = up1;
Else If BP >= 100000 Then
상한가 = iff(up2>=500000, up1, up2);
Else If BP >= 50000 Then
상한가 = iff(up3>=100000, up2, up3);
Else If BP >= 10000 Then
상한가 = iff(up4>=50000, up3, up4);
Else If BP >= 5000 Then
상한가 = iff(up5>=10000, up4, up5);
Else If BP >= 1000 Then
상한가 = iff(up5>=5000, up5, up6);
Else
상한가 = iff(up6>=1000, up6, up6);
}
Else
{
If BP >= 500000 Then
상한가 = up1;
Else If BP >= 100000 Then
상한가 = iff(up2>=500000, up1, up2);
Else If BP >= 50000 Then
상한가 = iff(up3>=100000, up2, up3);
Else If BP >= 10000 Then
상한가 = iff(up4>=50000, up3, up4);
Else If BP >= 5000 Then
상한가 = iff(up5>=10000, up4, up5);
Else If BP >= 1000 Then
상한가 = iff(up5>=5000, up5, up6);
Else
상한가 = iff(up6>=1000, up6, up7);
}
}
else if CodeCategory() == 8 || CodeCategory() == 9 then { // ETF
상한가 = up6;
}
}
--------------------------------------------------------------------
답변 부탁드립니다.
감사합니다.
2023-01-19
958
글번호 165554
답변완료
Nadaraya-Watson Envelope
MT4 지표인데 예스로 변환 부탁드립니다.
//+------------------------------------------------------------------+
//| nd.mq5 |
//| Copyright 2022, MetaQuotes Ltd. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2022, Grasco."
#property version "1.00"
#property indicator_chart_window
#property indicator_buffers 3
#property indicator_plots 2
#property indicator_type1 DRAW_LINE
#property indicator_type2 DRAW_LINE
#property indicator_width1 2
#property indicator_width2 2
#property indicator_color1 Blue
#property indicator_color2 Red
#property indicator_applied_price PRICE_WEIGHTED
//--- input parameters
input int Length=500; // Bars Count
input int Bandwidth=17; // Bandwidth
input double Multiplayer=1.5;
// n = get the bar index
//--- indicator buffers
double ExtUpBuffer[];
double ExtDownBuffer[];
double ExtCABuffer[];
double y[]; // for calculation
int ExtBarsHandle;
int k = 2;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int OnInit(){
//--- indicator buffers mapping
SetIndexBuffer(0,ExtUpBuffer);
SetIndexBuffer(1,ExtDownBuffer);
SetIndexBuffer(2,y,INDICATOR_CALCULATIONS);
//---
IndicatorSetInteger(INDICATOR_DIGITS,_Digits+1);
//--- sets first bar from what index will be drawn
PlotIndexSetInteger(0,PLOT_DRAW_BEGIN,0);
PlotIndexGetInteger(1,PLOT_DRAW_BEGIN,0);
PlotIndexSetDouble(0, PLOT_EMPTY_VALUE, 0.0);
PlotIndexSetDouble(1, PLOT_EMPTY_VALUE, 0.0);
//--- name for DataWindow
string short_name=StringFormat("Nadraya",Length);
IndicatorSetString(INDICATOR_SHORTNAME,short_name);
PlotIndexSetString(0,PLOT_LABEL,short_name+" Upper");
PlotIndexSetString(1,PLOT_LABEL,short_name+" Lower");
ExtBarsHandle = iMA(_Symbol,_Period,Length,0,MODE_EMA,PRICE_WEIGHTED);
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
const int prev_calculated,
const int begin,
const double &price[])
{
//---
if(IsStopped()) return 0;
int calculated=BarsCalculated(ExtBarsHandle);
if(rates_total<calculated) return(0);
if(rates_total<Length)
return(0);
int copyBars = 0;
if (prev_calculated>rates_total || prev_calculated<=0){
copyBars = rates_total;
}
else{
copyBars = rates_total-prev_calculated;
if(prev_calculated>0) copyBars++;
}
int start=prev_calculated-1;
if(start<Length)
start=Length;
double sum_e = 0.0;
for(int i=rates_total-Length; i<rates_total && !IsStopped(); i++){
double sum = 0.0;
double sumw= 0.0;
for(int j = rates_total-Length;j<rates_total-1;j++){
double w = MathExp(-(MathPow(i-j,2)/(Bandwidth*Bandwidth*2)));
sum += price[j]*w;
sumw += w;
}
double y2 = sum/sumw;
sum_e += (MathAbs(price[i]-y2));
y[i] = y2;
}
double mae = sum_e/Length*Multiplayer;
for(int i=rates_total-Length+1; i<rates_total && !IsStopped(); i++){
double y2 = y[i];
double y1 = y[i-1];
ExtUpBuffer[i]=y2+mae;
ExtDownBuffer[i]=y2-mae;
//Print(mae);
//Print(y[i]);
}
//--- return value of prev_calculated for next call
return(rates_total);
}
//+------------------------------------------------------------------+
2023-01-19
1328
글번호 165552
답변완료
시스템식 문의
해외선물 분봉차트사용하면서
당일 첫 시초가가 최근 10일 일봉기준 첫시초가이동평균(당일시초가 포함)
값 보다 20포인트 낮게 시작할 경우
시초가에 매도하는 시스템매매식이 가능할까요
부탁드립니다
2023-01-19
685
글번호 165549