커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
7689
글번호 230811
답변완료
수식부탁요!
당일 매수 진입후 진입가격에서 1% -일경우 매도식
당일 매도 진입후 1%- 매수식
매수매도 진입을 당일것만인식해 나갈수 있게요!!
새해 복 많이 받으세요!!
2011-12-30
435
글번호 46169
답변완료
기본 차트 설정과 관련하여 문의 드립니다.
항상 수고 많으십니다.
또한 항상 빠른 답변을 주시어 감사 드립니다.
차트에서 기본 종목을 처음으로 불러올 때, 항상 이평선과 거래량 지표가 기본으로 설정이 되는데요.
이것을 다른 지표가 항상 동반되도록 세팅이 가능한지요?
감사합니다.
새해 복 많이 받으세요!! Happy New Year!!
2011-12-30
476
글번호 46168
답변완료
트레일링스탑 질문있습니다.
안녕하세요.
트레일링스탑을 SetStopTrailing(4,10,PercentStop,0);로 설정하고 만약 오늘 트레일링스탑이 실행되었을 때 그 날은 매수를 못하게 할려면 식을 어떻게 작성해야 되는지 궁금합니다.
즐거운 하루 되세요.
2011-12-29
469
글번호 46165
답변완료
다음식좀 부탁합니다
5분봉 에서 2봉이내에서 캔들종가 가 240분봉을 상향 돌파 하는종목 검색식
부탁합니다
그리고 5분봉에서 캔들이 240분봉을 상향돌파하고 다음봉 시가가 240분봉 위에서 시작할때
매수진입
위내용으로하는 시스템식 부탁합니다
2011-12-29
405
글번호 46164
답변완료
봉 간의 시간차
5봉간의 시간차를 구하기 위해서 아래와 같이 수식을 작성하였습니다.
dT = time - time[5];
봉간의 시간은 일정할 것으로 기대하며, 디버깅을 해봤더니...
dT가 일정하지 않네요.
확인 부탁드립니다.
2011-12-29
456
글번호 46162
답변완료
재질문입니다
for cnt=0 to 10
if a < b[cnt] and b[cnt] < a then -----------1
c[cnt]=c[cnt]+d; -----------2
이런배열이 있다면 1 번째 줄 cnt가 3 일때 참이라면 2번째 줄 cnt에 3이 할당 되는것입니까 아니면 0부터 10까지 순차적으로 다시 할당되는 것입니까.
질문을 잘못읽고 답변을 해주신거 같아서 다시 올립니다. 1번줄이 참일때 2번줄에 0-10까지 순차적으로 들어가는것인지 -1
아니면 참이되게 한 값이 들어가는 것인지 -2
를 물었씁니다...그럼 좋은하루되세요
2011-12-29
479
글번호 46156
답변완료
시스템식
현재는 매수든 매도든,
하루에 먼저되는쪽 한번만 진입가능한데,
이후에는 매수/매도 하루에 각 한번씩만 진입가능하도록 수정요청드립니다.
if stime <= 150000 Then
if MarketPosition == 0 and date <> EntryDate(1) then {
if crossup(c,dayopen). Then
buy();
if CrossDown(c,dayopen) then
sell();
}
If marketposition<>0 Then {
exitlong("청산1",Atstop,highest(high,barsSinceEntry+1)-atr(20)*atrmult);
exitshort("청산2",Atstop,lowest(low,barsSinceEntry+1)+atr(20)*atrmult);
}
2011-12-29
454
글번호 46154
답변완료
문의 드립니다.
혹시 waddah attar explosion 지표를 예스 트레이더에 맞게끔
작성이 가능한지요?
아래는 다른 언어로 개발된 소스인데, 혹시 참고하시기 바랍니다.
//----
#property indicator_separate_window
#property indicator_buffers 4
#property indicator_color1 Green
#property indicator_color2 Red
#property indicator_color3 Sienna
#property indicator_color4 Blue
#property indicator_minimum 0.0
//----
extern int Sensetive = 150;
extern int DeadZonePip = 30;
extern int ExplosionPower = 15;
extern int TrendPower = 15;
extern bool AlertWindow = true;
extern int AlertCount = 500;
extern bool AlertLong = true;
extern bool AlertShort = true;
extern bool AlertExitLong = true;
extern bool AlertExitShort = true;
//----
double ind_buffer1[];
double ind_buffer2[];
double ind_buffer3[];
double ind_buffer4[];
//----
int LastTime1 = 1;
int LastTime2 = 1;
int LastTime3 = 1;
int LastTime4 = 1;
int Status = 0, PrevStatus = -1;
double bask, bbid;
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int init()
{
SetIndexStyle(0, DRAW_HISTOGRAM, STYLE_SOLID, 2);
SetIndexStyle(1, DRAW_HISTOGRAM, STYLE_SOLID, 2);
SetIndexStyle(2, DRAW_LINE, STYLE_SOLID, 2);
SetIndexStyle(3, DRAW_LINE, STYLE_DOT, 1);
//----
SetIndexBuffer(0, ind_buffer1);
SetIndexBuffer(1, ind_buffer2);
SetIndexBuffer(2, ind_buffer3);
SetIndexBuffer(3, ind_buffer4);
//----
IndicatorShortName("Waddah Attar Explosion: [S(" + Sensetive +
") - DZ(" + DeadZonePip + ") - EP(" + ExplosionPower +
") - TP(" + TrendPower + ")]");
Comment("copyright waddahwttar@hotmail.com");
return(0);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int start()
{
double Trend1, Trend2, Explo1, Explo2, Dead;
double pwrt, pwre;
int limit, i, counted_bars = IndicatorCounted();
//----
if(counted_bars < 0)
return(-1);
//----
if(counted_bars > 0)
counted_bars--;
limit = Bars - counted_bars;
//----
for(i = limit - 1; i >= 0; i--)
{
Trend1 = (iMACD(NULL, 0, 20, 40, 9, PRICE_CLOSE, MODE_MAIN, i) -
iMACD(NULL, 0, 20, 40, 9, PRICE_CLOSE, MODE_MAIN, i + 1))*Sensetive;
Trend2 = (iMACD(NULL, 0, 20, 40, 9, PRICE_CLOSE, MODE_MAIN, i + 2) -
iMACD(NULL, 0, 20, 40, 9, PRICE_CLOSE, MODE_MAIN, i + 3))*Sensetive;
Explo1 = (iBands(NULL, 0, 20, 2, 0, PRICE_CLOSE, MODE_UPPER, i) -
iBands(NULL, 0, 20, 2, 0, PRICE_CLOSE, MODE_LOWER, i));
Explo2 = (iBands(NULL, 0, 20, 2, 0, PRICE_CLOSE, MODE_UPPER, i + 1) -
iBands(NULL, 0, 20, 2, 0, PRICE_CLOSE, MODE_LOWER, i + 1));
Dead = Point * DeadZonePip;
ind_buffer1[i] = 0;
ind_buffer2[i] = 0;
ind_buffer3[i] = 0;
ind_buffer4[i] = 0;
if(Trend1 >= 0)
ind_buffer1[i] = Trend1;
if(Trend1 < 0)
ind_buffer2[i] = (-1*Trend1);
ind_buffer3[i] = Explo1;
ind_buffer4[i] = Dead;
if(i == 0)
{
if(Trend1 > 0 && Trend1 > Explo1 && Trend1 > Dead &&
Explo1 > Dead && Explo1 > Explo2 && Trend1 > Trend2 &&
LastTime1 < AlertCount && AlertLong == true && Ask != bask)
{
pwrt = 100*(Trend1 - Trend2) / Trend1;
pwre = 100*(Explo1 - Explo2) / Explo1;
bask = Ask;
if(pwre >= ExplosionPower && pwrt >= TrendPower)
{
if(AlertWindow == true)
{
Alert(LastTime1, "- ", Symbol(), " - BUY ", " (",
DoubleToStr(bask, Digits) , ") Trend PWR " ,
DoubleToStr(pwrt,0), " - Exp PWR ", DoubleToStr(pwre, 0));
}
else
{
Print(LastTime1, "- ", Symbol(), " - BUY ", " (",
DoubleToStr(bask, Digits), ") Trend PWR ",
DoubleToStr(pwrt, 0), " - Exp PWR ", DoubleToStr(pwre, 0));
}
LastTime1++;
}
Status = 1;
}
if(Trend1 < 0 && MathAbs(Trend1) > Explo1 && MathAbs(Trend1) > Dead &&
Explo1 > Dead && Explo1 > Explo2 && MathAbs(Trend1) > MathAbs(Trend2) &&
LastTime2 < AlertCount && AlertShort == true && Bid != bbid)
{
pwrt = 100*(MathAbs(Trend1) - MathAbs(Trend2)) / MathAbs(Trend1);
pwre = 100*(Explo1 - Explo2) / Explo1;
bbid = Bid;
if(pwre >= ExplosionPower && pwrt >= TrendPower)
{
if(AlertWindow == true)
{
Alert(LastTime2, "- ", Symbol(), " - SELL ", " (",
DoubleToStr(bbid, Digits), ") Trend PWR ",
DoubleToStr(pwrt,0), " - Exp PWR ", DoubleToStr(pwre, 0));
}
else
{
Print(LastTime2, "- ", Symbol(), " - SELL ", " (",
DoubleToStr(bbid, Digits), ") Trend PWR " ,
DoubleToStr(pwrt, 0), " - Exp PWR ", DoubleToStr(pwre, 0));
}
LastTime2++;
}
Status = 2;
}
if(Trend1 > 0 && Trend1 < Explo1 && Trend1 < Trend2 && Trend2 > Explo2 &&
Trend1 > Dead && Explo1 > Dead && LastTime3 <= AlertCount &&
AlertExitLong == true && Bid != bbid)
{
bbid = Bid;
if(AlertWindow == true)
{
Alert(LastTime3, "- ", Symbol(), " - Exit BUY ", " ",
DoubleToStr(bbid, Digits));
}
else
{
Print(LastTime3, "- ", Symbol(), " - Exit BUY ", " ",
DoubleToStr(bbid, Digits));
}
Status = 3;
LastTime3++;
}
if(Trend1 < 0 && MathAbs(Trend1) < Explo1 &&
MathAbs(Trend1) < MathAbs(Trend2) && MathAbs(Trend2) > Explo2 &&
Trend1 > Dead && Explo1 > Dead && LastTime4 <= AlertCount &&
AlertExitShort == true && Ask != bask)
{
bask = Ask;
if(AlertWindow == true)
{
Alert(LastTime4, "- ", Symbol(), " - Exit SELL ", " ",
DoubleToStr(bask, Digits));
}
else
{
Print(LastTime4, "- ", Symbol(), " - Exit SELL ", " ",
DoubleToStr(bask, Digits));
}
Status = 4;
LastTime4++;
}
PrevStatus = Status;
}
if(Status != PrevStatus)
{
LastTime1 = 1;
LastTime2 = 1;
LastTime3 = 1;
LastTime4 = 1;
}
}
return(0);
}
//+------------------------------------------------------------------+
2011-12-29
601
글번호 46151
답변완료
수식 문의 드립니다. ( 22168항목 질의내용 다시 )
안녕하세요 수식 문의 드립니다.
( 22168항목 질의내용 다시 )
의도하는 식은
((단기 골든 데드크로스 or 중기 골든 데드크로스) and (StochasticsK_D))
입니다.
다시 한번 부탁드립니다.
감사합니다.
2011-12-29
457
글번호 46150