커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
6185
글번호 230811
답변완료
선좀부탁 드립니다.
* 항상 많은 도움에 고맙습니다.
* 아래 수식에서 중심선 좀 부탁 드립니다.
즉 박스가 그려지면서 중심선 나오게 좀 요청드립니다.(박스가 끝나도 남아 있어야 합니다.)
1. 박스의 중심선 : TL_SetColor(RSId, lgreen) ;
2. 모든선 선두께 2 지정: TL_SetSize(RSId,2);
→ (연습 중인데 어디에 어떻게 삽입 해야 하는지 잘 모르겟네요...)
* 아래 수식
inputs : ShowAll(true);
var : BoxTop(0), BoxBtm(0), Ctr(0), BBD(0), BBT(0), EBD(0), EBT(0), UpBand(0), DnBand(0), CurrState(1),
TextId(-1), TopId(-1), TopIdP(-1), BtmId(-1), BtmIdP(-1), LSId(-1), LSIdP(-1), RSId(-1), RSIdP(-1),
HiFirst(true), LoFirst(false), State1(false), State2(false), State3(false), State4(false), State5(false),
DrawBox(false), ValidBox(false), HadBreak(false), NewBox(false);
if index == 1 then begin
BoxTop = high;
BoxBtm = low;
State1 = true;
BBD = date;
BBT = time;
end;
if NewBox and high > UpBand then begin
BBD = date;
BBT = time;
TL_SetEnd(TopId, BBD, BBT, UpBand);
TL_SetEnd(BtmId, BBD, BBt, DnBand);
RSIdP = RSId ;
RSId = TL_New(BBD, BBT, DnBand, BBD, BBT, UpBand);
if ShowAll == false and RSIdP <> -1 then TL_Delete( RSIdP ) ;
if HiFirst then
TL_SetColor(RSId, yellow);
else
TL_SetColor(RSId, magenta);
NewBox = false;
State1 = true;
LoFirst = false;
HiFirst = true;
end;
if NewBox and low < DnBand then begin
BBD = date;
BBT = time;
TL_SetEnd(TopId, BBD, BBT, UpBand);
TL_SetEnd(BtmId, BBD, BBt, DnBand);
RSIdP = RSId;
RSId = TL_New(BBD, BBT, DnBand, BBD, BBT, UpBand);
if ShowAll == false and RSIdP <> -1 then TL_Delete(RSIdP);
if HiFirst then
TL_SetColor(RSId, Black) ;
else
TL_SetColor(RSId, magenta);
NewBox = false;
State1 = true;
HiFirst = false;
LoFirst = true;
end;
if HiFirst then begin
if State4 then begin
if high > BoxTop then begin
BoxTop = high;
State1 = true;
State4 = false;
CurrState = 1;
end
else begin
if low < BoxBtm then begin
State4 = false;
State3 = true;
BoxBtm = low;
CurrState = 3;
end
else begin
State4 = false;
State5 = true;
CurrState = 5;
end;
end;
end;
if State3 then begin
if high > BoxTop then begin
BoxTop = high;
State1 = true;
State3 = false;
CurrState = 1;
end
else begin
if low < BoxBtm then begin
State3 = true;
BoxBtm = low;
CurrState = 3;
end
else begin
State3 = false;
State4 = true;
CurrState = 4;
end;
end;
end;
if State2 then begin
if high > BoxTop then begin
BoxTop = high;
State1 = true;
State2 = false;
CurrState = 1;
end
else begin
State2 = false;
State3 = true;
BoxBtm = low;
CurrState = 3;
end;
end;
if State1 then begin
if high > BoxTop then begin
BoxTop = high;
State1 = true;
CurrState = 1;
end
else begin
State1 = false;
State2 = true;
CurrState = 2;
end;
end;
end
else begin #{ Using LoFirst }
if State4 then begin
if low < BoxBtm then begin
BoxBtm = low;
State1 = true;
State4 = false;
CurrState = 1;
end
else begin
if high > BoxTop then begin
State3 = true;
State4 = false;
BoxTop = high;
CurrState = 3;
end
else begin
State4 = false;
State5 = true;
CurrState = 5;
end;
end;
end;
if State3 then begin
if low < BoxBtm then begin
BoxBtm = low;
State1 = true;
State3 = false;
CurrState = 1;
end
else begin
if high > BoxTop then begin
State3 = true;
BoxTop = high;
CurrState = 3;
end
else begin
State3 = false;
State4 = true;
CurrState = 4;
end;
end;
end;
if State2 then begin
if low < BoxBtm then begin
Boxbtm = low;
State1 = true;
State2 = false;
CurrState = 1;
end
else begin
State2 = false;
State3 = true;
BoxTop = high;
CurrState = 3;
end;
end;
if State1 then begin
if low < BoxBtm then begin
BoxBtm = low;
State1 = true;
CurrState = 1;
end
else begin
State1 = false;
State2 = true;
CurrState = 2;
end;
end;
end; #{ END IF HIFIRST OR LOFIRST }
if State5 then begin
DrawBox = true;
EBD = date;
EBT = time;
end;
if DrawBox then begin
TopIdP = TopId;
BtmIdP = BtmId;
LSIdP = LSId;
TopId = TL_New(BBD, BBT, BoxTop, EBD, EBT, BoxTop);
BtmId = TL_New(BBD, BBT, BoxBtm, EBD, EBT, BoxBtm);
LSId = TL_New(BBD, BBT, BoxBtm, BBD, BBT, BoxTop);
if ShowAll == false then begin
if TopIdP <> -1 then TL_Delete(TopIdP);
if BtmIdP <> -1 then TL_Delete(BtmIdP);
if LSIdP <> -1 then TL_Delete(LSidP);
end;
if HiFirst then begin
TL_SetColor(TopId, Black);
TL_SetColor(BtmId, Black);
TL_SetColor(LSId, Black);
end
else begin
TL_SetColor(TopId, magenta);
TL_SetColor(BtmId, magenta);
TL_SetColor(LSId, magenta);
end;
State1 = false;
State2 = false;
State3 = false;
State4 = false;
State5 = false;
DrawBox = false;
ValidBox = true;
end;
if ValidBox then begin
UpBand = BoxTop;
DnBand = BoxBtm;
ValidBox = false;
NewBox = true;
BoxTop = high;
BoxBtm = low;
end;
* 매번 고맙습니다. 수고하십시요.
2022-05-19
837
글번호 159020
답변완료
식추가
input : n(3),x(50);
if CountIf(C>O,n) == n and
H >= L[2]+PriceScale*x Then
Buy();
if CountIf(C<O,n) == n and
L <= H-PriceScale*x Then
sell();
안녕하세요.
수고많으십니다
위식에서 추가수식 부탁드립니다.
매수 조건추가
볼밴 중심선 위에서는 매수만 진입.
중심선 상향돌파시 첫봉에서만 진입.
매도
볼밴 중심선 아래서 매도만 진입
중심선 하향돌파시 첫봉에서만 진입.
손절 익절 1일누적 100틱
특정 시간대에서만 진입가능하도록 시간설정요망.
예) 09시 에서~익일 03시
2022-05-18
965
글번호 159019
회원 님에 의해서 삭제되었습니다.
2022-05-18
10
글번호 159009
답변완료
신호검색 재 질문입니다. 죄송!!
죄송합니다.
제가 초보라서 아래식을 신호검색에 수정을 못하겠습니다.
도움을 청합니다.
죄송합니다.
var : B(0),S(0),B1(0),S1(0);
if sdate != sdate[1] Then
{
B = 0;
S = 0;
B1 = B[1];
S1 = S[1];
}
if C > O Then
B = B+V;
if C < O Then
S = S+V;
if B1 > 0 and S1 > 0 and B1 < S1 and
CrossUp(B,S) Then
Find(1);
끝)
2022-05-18
644
글번호 159008
회원 님에 의해서 삭제되었습니다.
2022-05-18
14
글번호 158999
회원 님에 의해서 삭제되었습니다.
2022-05-18
94
글번호 158994
답변완료
청산 관련 시스템식 요청 드립니다.
현물 매도 청산 식을 작성하려고 합니다.
3%, 4% , 5%, 7%, 10% 분할로 매도식을 작성하려고 합니다.
ExitLong("3%익절",AtLimit,AVGEntryPrice*1.03,"",Floor(MaxContracts*0.20));
ExitLong("4%익절",AtLimit,AVGEntryPrice*1.04,"",Floor(MaxContracts*0.20));
ExitLong("5%익절",AtLimit,AVGEntryPrice*1.05,"",Floor(MaxContracts*0.20));
ExitLong("7%익절",AtLimit,AVGEntryPrice*1.06,"",Floor(MaxContracts*0.20));
ExitLong("10%익절",AtLimit,AVGEntryPrice*1.10);
이런식으로 작성을 했는데
여기서 추가되는 조건은
만약에 3%익절 하고 10분 뒤에.. 3% 익절한금액 (AVGEntryPrice*1.03) 보다 밑에 있으면 현재가 전량 매도
만약에 4%익절 하고 10분 뒤에.. 4% 익절한금액 (AVGEntryPrice*1.04) 보다 밑에 있으면 현재가 전량 매도
만약에 5%익절 하고 10분 뒤에.. 5% 익절한금액 (AVGEntryPrice*1.05) 보다 밑에 있으면 현재가 전량 매도
만약에 7%익절 하고 10분 뒤에.. 7% 익절한금액 (AVGEntryPrice*1.07) 보다 밑에 있으면 현재가 전량 매도
이런식으로 작성하려고 하는데 어떻게 작성해야 할지 궁금합니다.
2022-05-18
667
글번호 158990
회원 님에 의해서 삭제되었습니다.
2022-05-18
103
글번호 158986
답변완료
종목검색 조건에 다음 조건을 넣고싶습니다.
종목검색 검색결과에서 정렬방법을 당일 상승률 오름차순으로 나오게 할수 있나요?
2022-05-18
968
글번호 158981