커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
4366
글번호 230811
답변완료
"틱" 글자 변경
var : RR(0),tx1(0),tx2(0);
if MarketPosition == 1 Then{
rr = (C-EntryPrice)/PriceScale;
Text_Delete(tx1);
tx1 = Text_New(sdate,stime,H+PriceScale*1,NumToStr(RR,0)+"틱");
Text_SetStyle(tx1,2,2);
}
if MarketPosition == -1 Then{
rr = (EntryPrice-C)/PriceScale;
Text_Delete(tx2);
tx2 = Text_New(sdate,stime,L-PriceScale*1,NumToStr(RR,0)+"틱");
Text_SetStyle(tx2,2,2);
}
-------------------------------------------->
상기수식에서---"틱"===>"틱"---->"틱"글자를 굵게 크게할려면
어떤 수식을 추가해야 되나요
2018-03-27
290
글번호 117724
답변완료
문의드립니다
1.
Tema 10선이 우상향이면 빨강색 우하향 이면 파랜색 지표 부탁드립니다
2.
Tema 10선이 우상향이면 매수신호 우하향 이면 매도신호 시스템 부탁드립니다
진입 신호나오고 화면에 10틱 단위씩 나오게도 해주세요
2018-03-27
274
글번호 117723
답변완료
안녕하세세요
아래식에서 하루손절익절후 매매매정지식인데 계속 진입합니다 잘못된 부분 수정부탁합니다
첫번째식
Input : shortPeriod(100), longPeriod(200);
Input : 당일손실틱수(800),당일수익틱수(800);
value1 = ma(C, shortPeriod);
value2 =ma(C, longPeriod);
var : DH(0),DL(0);
var : HH(0),LL(0),T1(0),entry(0);
var : cnt(0),count(0),dayPl(0),당일손실(0),당일수익(0);
당일수익 = PriceScale*당일수익틱수;
당일손실 = PriceScale*당일손실틱수;
if (sdate != sdate[1] and stime >= 100000) or
(sdate == sdate[1] and stime >= 100000 and stime[1] < 100000) Then{
Condition1 = true;
DH = H;
DL = L;
}
if Condition1 == true then{
if H > DH Then
DH = H;
if L < DL Then
DL = L;
}
if stime == 101500 or (stime > 101500 and stime[1] < 101500) Then
{
HH = H;
LL = L;
T1 = TotalTrades;
}
if MarketPosition == 0 Then
entry = TotalTrades-T1;
Else
entry = TotalTrades-T1+1;
if stime >= 104500 and stime < 113000 then{
if H > HH Then
HH = H;
if L < LL Then
LL = L;
if HH >= LL+PriceScale*10 and entry < 20 then
{
if DL > 0 and C < DL+PriceScale*300 and crossup(value1,value2) Then
buy();
if DH > 0 and C > DH-PriceScale*300 and CrossDown(value1,value2) Then
sell();
}
}
SetStopLoss(PriceScale*30,PointStop);
SetStopProfittarget(PriceScale*60,PointStop);
if MarketPosition == 1
Then{
HH = highest(H,BarsSinceEntry);
if HH >= EntryPrice+PriceScale*39 and HH < EntryPrice+PriceScale*44 Then
ExitLong("수청0",AtStop,EntryPrice+PriceScale*0);
if HH >= EntryPrice+PriceScale*50 and HH < EntryPrice+PriceScale*55 Then
ExitLong("수청1",AtStop,EntryPrice+PriceScale*15);
if HH >= EntryPrice+PriceScale*44 and HH < EntryPrice+PriceScale*50 Then
ExitLong("수청2",AtStop,EntryPrice+PriceScale*7);
if HH >= EntryPrice+PriceScale*55 and HH < EntryPrice+PriceScale*60 Then
ExitLong("수청3",AtStop,EntryPrice+PriceScale*25);
if HH >= EntryPrice+PriceScale*60 and HH < EntryPrice+PriceScale*70 Then
ExitLong("수청4",AtStop,EntryPrice+PriceScale*40);
if HH >= EntryPrice+PriceScale*70 and HH < EntryPrice+PriceScale*80 Then
ExitLong("수청5",AtStop,EntryPrice+PriceScale*50);
if HH >= EntryPrice+PriceScale*80 and HH < EntryPrice+PriceScale*90 Then
ExitLong("수청6",AtStop,EntryPrice+PriceScale*60);
if HH >= EntryPrice+PriceScale*90 and HH < EntryPrice+PriceScale*1200 Then
ExitLong("수청7",AtStop,EntryPrice+PriceScale*70);
}
if MarketPosition == -1 Then{
LL = lowest(L,BarsSinceEntry);
if LL <= EntryPrice-PriceScale*39 and LL > EntryPrice-PriceScale*44 Then
Exitshort("도청0",AtStop,EntryPrice-PriceScale*0);
LL = lowest(L,BarsSinceEntry);
if LL <= EntryPrice-PriceScale*50 and LL > EntryPrice-PriceScale*55 Then
Exitshort("도청1",AtStop,EntryPrice-PriceScale*15);
LL = lowest(L,BarsSinceEntry);
if LL <= EntryPrice-PriceScale*44 and LL > EntryPrice-PriceScale*50 Then
Exitshort("도청2",AtStop,EntryPrice-PriceScale* 7);
if LL <= EntryPrice-PriceScale*55 and LL > EntryPrice-PriceScale*90 Then
Exitshort("도청3",AtStop,EntryPrice-PriceScale* 25);
if LL <= EntryPrice-PriceScale*60 and LL > EntryPrice-PriceScale*70 Then
Exitshort("도청4",AtStop,EntryPrice-PriceScale* 40);
if LL <= EntryPrice-PriceScale*70 and LL > EntryPrice-PriceScale*80 Then
Exitshort("도청5",AtStop,EntryPrice-PriceScale* 50);
if LL <= EntryPrice-PriceScale*80 and LL > EntryPrice-PriceScale*90 Then
Exitshort("도청6",AtStop,EntryPrice-PriceScale* 60);
if LL <= EntryPrice-PriceScale*90 and LL > EntryPrice-PriceScale*1000 Then
Exitshort("도청7",AtStop,EntryPrice-PriceScale* 70);
}
if MarketPosition == 10 then{
ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts));
ExitLong("dbl",AtStop,EntryPrice-((당일손실+daypl)/CurrentContracts));
}
if MarketPosition == -1 then{
ExitShort("dsp",atlimit,EntryPrice-((당일수익-daypl)/CurrentContracts));
ExitShort("dsl",AtStop,EntryPrice+((당일손실+daypl)/CurrentContracts));
}
두번째식
Inputs: Length(5), Consec(3);
Input : 당일손실틱수(500),당일수익틱수(500);
var : DH(0),DL(0);
var : HH(0),LL(0),T1(0),entry(0);
var : cnt(0),count(0),dayPl(0),당일손실(0),당일수익(0);
당일수익 = PriceScale*당일수익틱수;
당일손실 = PriceScale*당일손실틱수;
if (sdate != sdate[1] and stime >= 100000) or
(sdate == sdate[1] and stime >= 100000 and stime[1] < 100000) Then{
Condition1 = true;
DH = H;
DL = L;
}
if Condition1 == true then{
if H > DH Then
DH = H;
if L < DL Then
DL = L;
}
If DL > 0 and C < DL+PriceScale*300 and stime > 104000 and stime < 115000 and CountIf(Close > Highest(High, Length)[1], Consec) == Consec Then
Buy ("매수");
If DH > 0 and C > DH-PriceScale*300 and stime > 104000 and stime < 115000 and CountIf(Close < Lowest(Low, Length)[1], Consec) == Consec Then
Sell ("매도");
SetStopLoss(PriceScale*60,PointStop);
SetStopProfittarget(PriceScale*110,PointStop);
if MarketPosition == 1 Then{
HH = highest(H,BarsSinceEntry);
if HH >= EntryPrice+PriceScale*70 and HH < EntryPrice+PriceScale*80 Then
ExitLong("bx1",AtStop,EntryPrice+PriceScale*20);
if HH >= EntryPrice+PriceScale*80 and HH < EntryPrice+PriceScale*100 Then
ExitLong("bx2",AtStop,EntryPrice+PriceScale*40);
if HH >= EntryPrice+PriceScale*100 and HH < EntryPrice+PriceScale*200 Then
ExitLong("bx3",AtStop,EntryPrice+PriceScale*60);
}
if MarketPosition == -1 Then{
LL = lowest(L,BarsSinceEntry);
if LL <= EntryPrice-PriceScale*70 and LL > EntryPrice-PriceScale*80 Then
Exitshort("sx1",AtStop,EntryPrice-PriceScale*20);
if LL <= EntryPrice-PriceScale*80 and LL > EntryPrice-PriceScale*100 Then
Exitshort("sx2",AtStop,EntryPrice-PriceScale*40);
if LL <= EntryPrice-PriceScale*100 and LL > EntryPrice-PriceScale*200 Then
Exitshort("sx3",AtStop,EntryPrice-PriceScale*60);
}
if MarketPosition == 1 then{
ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts));
ExitLong("dbl",AtStop,EntryPrice-((당일손실+daypl)/CurrentContracts));
}
if MarketPosition == -1 then{
ExitShort("dsp",atlimit,EntryPrice-((당일수익-daypl)/CurrentContracts));
ExitShort("dsl",AtStop,EntryPrice+((당일손실+daypl)/CurrentContracts));
}
2018-03-27
273
글번호 117722
답변완료
문의드립니다.
도움주시는 덕분에 도전하고 있습니다. 매번 감사합니다.
1. 기타
진입후 진입 방향과 같은 방향으로 n이상 크기의 캔들이 발생했을 때 청산
가령 매수진입이면 n이상 크기의 양봉이 발생했다면 매수청산. 매도는 반대
2. 기타
1번과 같은 조건일 때(매수면 매수 방향으로 n크기 이상의 봉이 나타났을 때) 해당 봉을 50% 이상(그 봉의 50%) 되돌리면 매수청산. 매도는 반대
2018-03-27
261
글번호 117720
답변완료
수식 요청 드립니다.
안녕하세요.
연결선물 당일청산 시스템에서 진입수식1 연결선물 틱봉차트 적용하고, 진입수식2 연결선물
참조데이타2 분봉차트 적용되도록 수정요청 드립니다.
Stime 10:25:00 시간 적용을 당일 장시작부터 85분 까지로 수정요청 드립니다.
감사합니다.
//-------------------------------------------------------------------------------------------------------
#진입수식1(예제)-연결선물 틱봉차트 적용
Input : Period(12), sigPeriod(9);
value1 = TRIX(Period);
value2 = EMA(value1, sigPeriod);
If CrossUP(value1, value2) Then{
Buy();
}
If CrossDown(value1, value2) Then{
Sell();
}
#진입수식2(예제)-연결선물 참조데이타2 분봉차트 당일 장시작부터 시간적용 수정요청
input: AMTM(102500);
if date != date[1] then{
var1 = 0;
var2 = 0;
}
if stime < AMTM then{
if C > O then
var1 = var1 + 1;
if C < O then
var2 = var2 + 1;
}
if (Stime >= AMTM and Stime[1] < AMTM) and var1 > var2 and C > DayOpen then
buy();
if (Stime >= AMTM and Stime[1] < AMTM) and var1 < var2 and C < DayOpen then
sell();
SetStopEndofday(150000);
//-------------------------------------------------------------------------------------------------------
2018-03-27
272
글번호 117719
답변완료
부탁 드립니다.
도움 주심에 감사 드립니다.
1)매주초(월요일 해선 시작 시간)를 표시하는 수직선
2)매월초(매월 1일에 해선시간)을 표시하는 수직선 을 표시하는 수식 부탁 드립니다.
2018-03-27
263
글번호 117711
dhfmfl 님에 의해서 삭제되었습니다.
2018-03-27
6
글번호 117707
답변완료
문의드립니다
if (SellFill == 1)
{
SID = a1.OrderSell (order1.code , 1 , 0 , 1 ) ;
Main.MessageLog("매도진입") ;
position = -1 ;
SellFill =0 ;
cnt = 2 ;
}
스팟식을 사용하여 나온 메시지(그림)를 보면 매도진입은 제대로 표시되고 있지만 주문오류가 발생되는데요 이유가 뭔지요 ?
2018-03-26
295
글번호 117706
답변완료
수식부탁 드립니다.
* 항상 많은 도움에 고맙 습니다.
질문1: 1차 조건 만족후 바로 매수 하는것이 아니고
가격이 직전 저점에 오면 매수 할려고 하는데 수식 좀 작성 요청 드립니다.
* 기본 수식(5분봉 사용)
if c > ma(c,5) Then buy();
여기서 바로 매수 하는것이 아니라
그림 처럼 직전 저점 가격에서 매수 하고 싶습니다.
질문2 : 당일 최고가 대비 3프로 이하는 매수 금지 식좀 알려주세요.
이게아닌가요? → c > DayHigh*0.3
질문3: if c > ma(c,5) Then buy();
if MarketPosition == 1 and C > EntryPrice*1.03 Then
sell();
이조건으로 매도 되었을 경우
매도 가격 기준 2프로 밑에서 재매수 하는식 좀 부탁 드립니다.
고맙습니다.
2018-03-27
290
글번호 117705