커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
6297
글번호 230811
답변완료
답변해주신거에 대한 재문의
안녕하세요 전일 아래와 같이 답변주셨는데, "Dayclose를 사용하지 않고" 최고최저종가를
저장하는 방법을 다시 부탁드립니다. (close와 for문 Array를 이용하여)
input : N(20);
var : cnt(0),hc(0),lc(0);
if DayClose(N-1) > 0 Then
{
hc = 0;
lc = 0;
For cnt = 0 to N-1
{
if hc == 0 or (hc > 0 and DayClose(cnt) > hc) Then
hc = DayClose(cnt);
if lc == 0 or (lc > 0 and DayClose(cnt) < lc) Then
lc = DayClose(cnt);
}
Plot1(hc);
plot2(lc);
}
즐거운 하루되세요
> oni 님이 쓴 글입니다.
> 제목 : 수식 부탁드립니다.
> 안녕하세요.
가격박스를 만들고 싶은데요.
N일간의 최고종가와 최저종가를 지표로 표현하고 싶은데,
당일 최고와 최저의 종가가 갱신되면 값이 변경되고 갱신되지 않으면 유지 되는
지표를 그리고 싶습니다.
dayclose를 사용하는 경우와 그렇지 않고 array와 for문을 이용하여 close만 사용하여
구하는 경우 2가지를 부탁드립니다.
2022-11-16
950
글번호 163845
답변완료
수정부탁드립니다
삼각형내부 색상 입히기 수정부탁드립니다.
Input:lengthk(12);
Var:처리순서(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0),TtL1(0),TtL2(0),TtL3(0),
Text1(0),처리구분(""),T(0);
Array:고점[10,2](0),저점[10,2](0); //가격,위치
처리구분 = "";
If Highest(H,lengthk) == H and lastHiVal <> H and
Lowest(L,lengthk) == L and lastLoVal <> L Then
{
If 저점[1,1] > L Then 처리구분 = "저점처리";
If 고점[1,1] < H Then 처리구분 = "고점처리";
}
Else If Highest(H,lengthk) == H and lastHiVal <> H Then
처리구분 = "고점처리";
Else If Lowest(L,lengthk) == L and lastLoVal <> L Then
처리구분 = "저점처리";
If 처리구분 == "고점처리" Then
{
lastHiVal = H;
If 고점[1,2] < 저점[1,2] Then
{
For 처리순서 = 10 DownTo 2
{
고점[처리순서,1] = 고점[처리순서-1,1];
고점[처리순서,2] = 고점[처리순서-1,2];
}
}
If 고점[1,2] < 저점[1,2] or 고점[1,1] < H Then
{
고점[1,1] = H;
고점[1,2] = Index;
sBar = Index - 저점[1,2];
eBar = 0;
If TL_GetBeginDate(TtL1) == sDate[sBar] and
TL_GetBeginTime(TtL1) == sTime[sBar] Then
{
TL_Delete(TtL1);
TL_Delete(TtL2);
TL_Delete(TtL3);
Text_Delete(Text1);
}
TtL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]);
TtL2 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],저점[1,1]);
TtL3 = TL_New(sDate[eBar],sTime[eBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]);
Text1 = Text_New(sDate[eBar],sTime[eBar],고점[1,1], NumToStr(고점[1,1],2));
Text_SetStyle(Text1, 2, 1);
TL_SetSize(TtL1,2);
TL_SetColor(TtL1,red);
TL_SetSize(TtL2,2);
TL_SetColor(TtL2,red);
TL_SetSize(TtL3,2);
TL_SetColor(TtL3,BLACK);
}
}
If 처리구분 == "저점처리" Then
{
lastLoVal = L;
If 저점[1,2] < 고점[1,2] then
{
For 처리순서 = 10 DownTo 2
{
저점[처리순서,1] = 저점[처리순서-1,1];
저점[처리순서,2] = 저점[처리순서-1,2];
}
}
If 저점[1,2] < 고점[1,2] or 저점[1,1] > L then
{
저점[1,1] = L;
저점[1,2] = Index;
sBar = Index - 고점[1,2];
eBar = 0;
If TL_GetBeginDate(TtL1) == sDate[sBar] and
TL_GetBeginTime(TtL1) == sTime[sBar] Then
{
TL_Delete(TtL1);
TL_Delete(TtL2);
TL_Delete(TtL3);
Text_Delete(Text1);
}
TtL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]);
TtL2 = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],고점[1,1]);
TtL3 = TL_New(sDate[eBar],sTime[eBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]);
Text1 = Text_New(sDate[eBar],sTime[eBar],저점[1,1],NumToStr(저점[1,1],2));
Text_SetStyle(Text1, 2, 0);
TL_SetSize(TtL1,2);
TL_SetColor(TtL1,blue);
TL_SetSize(TtL2,2);
TL_SetColor(TtL2,blue);
TL_SetSize(TtL3,2);
TL_SetColor(TtL3,BLACK);
}
}
2022-11-16
1036
글번호 163844
답변완료
거래대금 수식 문의 드려요
1분봉 차트에서 과거 10개봉(10분동안) 거래대금 합계를 구하고 싶어요
수식부탁드려요
2022-11-16
1064
글번호 163842
답변완료
문의 드립니다
input:length(5),a틱(10),b틱(10),c틱(5);
Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0),TL1(0),Text1(0),process(0),T(0);
Array:HH[10,2](0),LL[10,2](0);
process = 0;
If Highest(H,length) == H and lastHiVal <> H and Lowest(L,length) == L and lastLoVal <> L Then
{
If LL[1,1] > L Then process = -1;
If HH[1,1] < H Then process = 1;
}
Else If Highest(H,length) == H and lastHiVal <> H Then process = 1;
Else If Lowest(L,length) == L and lastLoVal <> L Then process = -1;
If process == 1 Then
{
T = 1;
lastHiVal = H;
If HH[1,2] < LL[1,2] Then
{
For j = 10 DownTo 2
{
HH[j,1] = HH[j-1,1];
HH[j,2] = HH[j-1,2];
}
}
If HH[1,2] < LL[1,2] or HH[1,1] < H Then
{
HH[1,1] = H;
HH[1,2] = Index;
sBar = Index - LL[1,2];
eBar = 0;
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
TL_Delete(TL1);
Text_Delete(Text1);
}
if LL[1,1] > 0 Then
{
TL1 = TL_New(sDate[sBar],sTime[sBar],LL[1,1],sDate[eBar],sTime[eBar],HH[1,1]);
Text1 = Text_New(sDate[eBar],sTime[eBar],HH[1,1],"+"+NumToStr(abs(HH[1,1]-LL[1,1])/PriceScale,0));
Text_SetStyle(Text1, 2, 1);
}
Else
{
Text_Delete(text1);
Text1 = Text_New(sDate[eBar],sTime[eBar],HH[1,1],"+"+NumToStr(abs(HH[1,1]-LL[1,1])/PriceScale,2));
Text_SetStyle(Text1, 2, 1);
}
Text_SetStyle(Text1, 2, 1);
}
if MarketPosition <= 0 and
HH[2,1] >= LL[2,1]+PriceScale*a틱 and
LL[1,1] <= HH[2,1]-PriceScale*b틱 Then
Buy("b",AtStop,HH[2,1]+PriceScale*c틱);
}
If process == -1 Then
{
T = -1;
lastLoVal = L;
If LL[1,2] < HH[1,2] Then
{
For j = 10 DownTo 2
{
LL[j,1] = LL[j-1,1];
LL[j,2] = LL[j-1,2];
}
}
If LL[1,2] < HH[1,2] or LL[1,1] > L Then
{
LL[1,1] = L;
LL[1,2] = Index;
sBar = Index - HH[1,2];
eBar = 0;
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
TL_Delete(TL1);
Text_Delete(Text1);
}
if HH[1,1] > 0 Then
{
TL1 = TL_New(sDate[sBar],sTime[sBar],HH[1,1],sDate[eBar],sTime[eBar],LL[1,1]);
Text1 = Text_New(sDate[eBar],sTime[eBar],LL[1,1],"-"+NumToStr(abs(HH[1,1]-LL[1,1])/PriceScale,0));
Text_SetStyle(Text1, 2, 0);
}
Else
{
Text_Delete(text1);
Text1 = Text_New(sDate[eBar],sTime[eBar],LL[1,1],"-"+NumToStr(abs(HH[1,1]-LL[1,1])/PriceScale,0));
Text_SetStyle(Text1, 2, 0);
}
}
if MarketPosition >= 0 and
LL[2,1] <= HH[2,1]-PriceScale*a틱 and
HH[1,1] >= LL[2,1]+PriceScale*b틱 Then
Sell("s",AtStop,LL[2,1]-PriceScale*c틱);
}
추세선은 매매시간 넣으니 오류가 자꾸 나네요
해외선물 매매시간 좀 넣어주세요 ~
15:00~ 익일 06:00 , 익일 06 :00는 오버없는 자동청산입니다
----------------
input : 익절틱수(0),손절틱수(0);
if NextBarSdate != sDate Then
{
if NextBarOpen > C Then
{
Buy("b",AtStop,NextBarOpen+PriceScale*10);
Sell("s",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen < C Then
{
ExitLong("bx",AtStop,NextBarOpen-PriceScale*10);
ExitShort("sx",AtStop,NextBarOpen+PriceScale*10);
}
}
if MarketPosition > 1 Then
Sell("ss",AtStop,EntryPrice-10);
if MarketPosition < -1 Then
Buy("ss1",AtStop,EntryPrice+10);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
if NextBarSdate != sDate Then
{
if NextBarOpen > C Then
{
Buy("b2",AtStop,NextBarOpen+PriceScale*10);
Sell("s2",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen < C Then
{
ExitLong("bx2",AtStop,NextBarOpen-PriceScale*10);
ExitShort ("sx2",AtStop,NextBarOpen+PriceScale*10);
}
}
if MarketPosition > 1 Then
Sell("sss",AtStop,EntryPrice-10);
if MarketPosition < -1 Then
Buy("sss1",AtStop,EntryPrice+10);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
if NextBarSdate != sDate Then
{
if NextBarOpen < C Then
{
Buy("b8",AtStop,NextBarOpen+PriceScale*10);
Sell("s8",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen > C Then
{
ExitLong("bx8",AtStop,NextBarOpen-PriceScale*10);
ExitShort("sx8",AtStop,NextBarOpen+PriceScale*10);
}
}
if MarketPosition > 1 Then
Sell("bb",AtStop,EntryPrice-10);
if MarketPosition < -1 Then
Buy("bb1",AtStop,EntryPrice+10);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
if NextBarSdate != sDate Then
{
if NextBarOpen < C Then
{
Buy("b9",AtStop,NextBarOpen+PriceScale*10);
Sell("s9",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen > C Then
{
ExitLong("bx9",AtStop,NextBarOpen-PriceScale*10);
ExitShort("sx9",AtStop,NextBarOpen+PriceScale*10);
}
}
if MarketPosition > 1 Then
Sell("bbb",AtStop,EntryPrice-10);
if MarketPosition < -1 Then
Buy("bbb1",AtStop,EntryPrice+10);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
------------------
해외선물 매매시간 08 :00 ~ 익일 06 :00 자동청산
2회까지 진입신호후 아침 06시 자동청산의 수식어 추가를 부탁드립니다.
2022-11-16
1415
글번호 163841
답변완료
분챠트 수식문의
분챠트 또는 틱챠트에서 5일이동평균선 수식부탁드립니다
2022-11-16
1377
글번호 163839
답변완료
수식
안녕하세요.
고생이 많으십니다.
틱봉에 1분봉의 5개(즉, 9시부터 9시5분까지) 고가, 저가를 적용할수 있도록 부탁드립니다.
감사합니다.
2022-11-16
1748
글번호 163835
심홍 님에 의해서 삭제되었습니다.
2022-11-16
0
글번호 163832
답변완료
수식 문의드립니다
안녕하세요
종목검색 문의드립니다
일봉상 종가기준 10% 급등한 종목이 종가상으로
10일선을 데드크로스한 시점에서 종목검색을 할 수 있도록
종목검색식과 지표식을 부탁드립니다
2022-11-16
1250
글번호 163831
답변완료
문의드립니다.
안녕하세요.
시스템 트레이딩 초보입니다.
유튜브도 보고 했는데 막상 프로그램을 작성 하려니 너무 막막하네요.
일단 만들고 싶은 기준은 있는데 시작을 못하고 있어서 도움 부탁드립니다.
내용은,
1. 5분봉 차트에서 MACD가 기준선 상향 돌파일 때 매수하고, RSI 과열 구간이 나오면 매도.
2. 5분봉 차트에서 MACD가 기준선 하향 톨파일 때 매도 하고, RSI 침체 구간이 나오면 매수
이거랑.
3. 5분봉 차트에서 MACD가 기준선 상향 돌파 후, 10분 봉 차트에서 MACD가 기준선 하향 돌파하면 매도.
이렇게 하려면 어떻게 작성 해야 하나요?
2022-11-16
1413
글번호 163830