커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1590
글번호 230811
답변완료
수식 부탁드립니다.
단순 sum 함수같은거 있나요?
현재봉포함 최근 10개 종가의 합
간단하게 구현 가능한지 궁금합니다.
average 함수 쓰면 시뮬 속도가 2배 느려져서 그렇습니다.
감사합니다.
2022-12-28
1167
글번호 164936
답변완료
문의 드립니다
input : 익절틱수(00),손절틱수(20);
input : StartTime(10000),EndTime(140000);
var : Tcond(false);
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
Tcond = true;
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
Tcond = False;
if Tcond == true Then
{
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (sdate != sdate[1] and stime >= endtime) or
(sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then
{
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
if NextBarSdate != sDate Then
{
if NextBarOpen != C Then
{
Buy("b",AtStop,NextBarOpen+PriceScale*10);
}
}
ExitLong("bx",AtMarket);
if NextBarOpen != C Then
{
Sell("s",AtStop,NextBarOpen-PriceScale*10);
}
ExitShort("sx",AtMarket);
if NextBarSdate == sDate Then
{
if NextBarOpen == C Then
{
Buy("b1",AtStop,NextBarOpen+PriceScale*10);
}
}
ExitLong("bx1",AtMarket);
if NextBarOpen == C Then
{
Sell("s1",AtStop,NextBarOpen-PriceScale*10);
}
ExitShort("sx1",AtMarket);
if NextBarSdate == sDate Then
{
if NextBarOpen != C Then
{
Buy("b2",AtStop,NextBarOpen+PriceScale*10);
}
}
ExitLong("bx2",AtMarket);
if NextBarOpen != C Then
{
Sell("s2",AtStop,NextBarOpen-PriceScale*10);
}
ExitShort("sx2",AtMarket);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop); }
상품명 (china A50) 매매시간을 10시부터 14시까지 설정했는데
새벽 3시부터 연결되어서 신호가 나옵니다.
수정이 가능 한지 문의 드립니다.
2022-12-28
1182
글번호 164934
답변완료
수식 부탁드립니다
#,안녕하세요
분봉차트에서 당일 첫봉의 거래량이 1만 이상일때 그봉의 중심선을 Y축 까지
우측 추세선 그리기로 부탁드립니다.(거래량을 변수 조절할수 있으면 좋겠습니다)
도움 주심에 항상 감사합니다.
2022-12-28
1285
글번호 164933
답변완료
트렌드 쓰리바닥
inputs: ATRLength(15), Strength(18), 폭(0.25);
input : 쌍바닥상1(2),쌍바닥상2(0),쌍바닥하1(1),쌍바닥하2(2);
input : 쌍봉상1(2),쌍봉상2(1),쌍봉하1(0),쌍봉하2(2);
var : STrend(0),ATRv(0), avgv(0), dnv(0), upv(0), trend(1), flag(0), flagh(0), ST(0),hl(0);
var : idx(0),hh(0),ll(0),EP1(0),EP2(0);
var : ema1(0),ema2(0),ema3(0),h1(0),h2(0),h3(0),h4(0),L1(0),l2(0),l3(0),l4(0);
var :tx(0),tl(0),tx1(0),tx2(0),tx11(0),tx12(0),tx3(0);
Ep1 = 2/(ATRLength+1);
Ep2 = 2/(Strength+1);
idx = idx+1;
if idx < ATRLength Then
{
hh = DayHigh;
ll = daylow;
}
Else
{
hh = Highest(High, ATRLength);
ll = Lowest(Low, ATRLength);
}
if idx < Strength Then
{
h1 = DayHigh;
l1 = daylow;
}
Else
{
h1 = Highest(High, Strength);
l1 = Lowest(Low, Strength);
}
hl = hh-ll;
if idx == 1 Then
{
ema1 = hl;
ema2 = h;
ema3 = l;
}
Else
{
ema1 = hl * EP1 + ema1 * (1-EP1);
ema2 = h * EP2 + ema2 * (1-EP2);
ema3 = l * EP2 + ema3 * (1-EP2);
}
atrv = ema1;
avgv = (ema2+ema3)/2;
upv = avgv + ATRv;
dnv = avgv - ATRv;
if idx >= 2 then
{
if c > upv[1] and c > h1[1] then trend = 1;
else if c < dnv[1] and c < l1[1] then trend = -1;
if trend < 0 and trend[1] > 0 then flag=1; else flag=0;
if trend > 0 and trend[1] < 0 then flagh = 1; else flagh = 0;
if trend > 0 and dnv < dnv[1] then dnv=dnv[1];
if trend < 0 and upv > upv[1] then upv=upv[1];
if flag == 1 then upv = avgv + ATRv;
if flagh == 1 then dnv = avgv - ATRv;
if trend == 1 then ST = dnv; else ST = upv;
STrend = trend;
}
Plot1(st,"SuperTrend",iff(strend == 1,red,blue));
if Trend != Trend[1] Then
{
if Trend == 1 Then
{
var1 = h;
var2 = var1[1];
TL = TL_New_Self(sDate,sTime,var1,sDate,sTime,99999999);
TL_SetColor(TL,Red);
TL_SetSize(TL,0.5);
tx = Text_New_Self(sDate,sTime, st-PriceScale*0,"●");
Text_SetColor(tx,Red);
Text_SetSize(tx,20);
Text_SetStyle(tx,2,2);
if Var4 > 0 and var3 <= Var4+PriceScale*쌍바닥상1 and var3 >= Var4+PriceScale*쌍바닥상2 Then
{
tx11 = Text_New_Self(sDate,sTime, st-PriceScale*0,"●");
Text_SetColor(tx11,Magenta);
Text_SetSize(tx11,30);
Text_SetStyle(tx11,2,2);
}
if Var4 > 0 and var3 <= Var4-PriceScale*쌍바닥하1 and var3 >= Var4-PriceScale*쌍바닥하2 Then
{
tx11 = Text_New_Self(sDate,sTime, st-PriceScale*0,"●");
Text_SetColor(tx11,Lime);
Text_SetSize(tx11,30);
Text_SetStyle(tx11,2,2);
}
}
Else
{
Var3 = l;
Var4 = Var3[1];
tx = Text_New_Self(sDate,sTime, st+PriceScale*0,"●");
Text_SetColor(tx,Blue);
Text_SetSize(tx,20);
Text_SetStyle(tx,2,2);
if Var2 > 0 and var1 <= Var2+PriceScale*쌍봉상1 and var1 >= Var2+PriceScale*쌍봉상2 Then
{
tx12 = Text_New_Self(sDate,sTime, st+PriceScale*0,"●");
Text_SetColor(tx12,Cyan);
Text_SetSize(tx12,30);
Text_SetStyle(tx12,2,2);
}
if Var2 > 0 and var1 <= Var2-PriceScale*쌍봉하1 and var1 >= Var2-PriceScale*쌍봉하2 Then
{
tx12 = Text_New_Self(sDate,sTime, st+PriceScale*0,"●");
Text_SetColor(tx12,Green);
Text_SetSize(tx12,30);
Text_SetStyle(tx12,2,2);
}
}
}
Else
{
if Trend == 1 Then
{
if h > var1 Then
var1 = h;
}
if Trend == -1 Then
{
if l < var3 Then
var3 = l;
}
}
if Trend != Trend[1] Then
{
if Trend == 1 Then
{
h2 = h;
h3 = h2[1];
h4 = h3[1];
if L4 > 0 and
max(L2,l3,l4) <= min(L2,l3,l4)+폭 Then
{
tx1 = Text_New_Self(sDate,sTime, st-PriceScale*0,"●");
Text_SetColor(tx1,Black);
Text_SetSize(tx1,20);
Text_SetStyle(tx1,2,2);
}
}
Else
{
L2 = l;
l3 = l2[1];
l4 = l3[1];
}
}
Else
{
if Trend == 1 Then
{
if h > h2 Then
h2 = h;
}
if Trend == -1 Then
{
if l < L2 Then
L2 = l;
}
}
Condition1 = False;
if max(l3,l4) <= min(l3,l4)+0.25 Then
{
Condition1 = true;
tx3 = Text_New_Self(sDate,sTime, st+PriceScale*0,"●");
Text_SetColor(tx3,Orange);
Text_SetSize(tx3,10);
Text_SetStyle(tx3,2,2);
}
if Condition1 == true and l2 < max(L3,l4)-0.25 Then
{
Condition1 = False;
Text_Delete(tx3);
}
Else
{
if Trend == 1 Then
{
if h > h2 Then
h2 = h;
}
if Trend == -1 Then
{
if l < L2 Then
{
L2 = l;
if Condition1 == true and l2 < max(L3,l4)-0.25 Then
{
Condition1 = False;
Text_Delete(tx3);
}
}
}
}
0.25p 내에서 쓰리바닥을 형성하는지 실시간으로 보기위한 수식을 190줄 아래에 추가했는데 오류가 나오네요. 수정 부탁합니다.
1.트렌드 선이 음전환될 때, 직전저점과 전전저점의 차이가 상하 무관하게 0.25p 이내이면 트렌드 음선 상단에 동그라미 표시.두 저점 차이가 0.25p 이상이면 무표시.
2.동그라미 삭제 시점:직전저점과 전전저점중에 높은 저점을 기준으로 하여
a.아래로 0.25p 도달하기 전에 양전환시.
b.계속 하락하여 -0.25p를 하향 붕괴할 때. 늘 감사합니다.
2022-12-28
1321
글번호 164931
답변완료
시스템
안녕하세요
가령 선물 2개약 동시 매수 진입시 1개약은 수익 50틱 청산
나머지 1개약은 100틱 청산 되는 수식 부탁드립니다
수고하세요
2022-12-28
1066
글번호 164921
회원 님에 의해서 삭제되었습니다.
2022-12-28
13
글번호 164917
파워 님에 의해서 삭제되었습니다.
2022-12-28
1311
글번호 164916
답변완료
문의드립니다
안녕하세요?
매도조건에 캔들의고점이 TCHAN1 라인에 일치하여 닿고
매수조건에 캔들의저점이 BCHAIN1 라인에 일치하여 닿으면 이란 조건문을 알려주세요
감사합니다
2022-12-28
1237
글번호 164915
답변완료
수식 수정 부탁드립니다.
아래 수식은 당월 평균가입니다.
var : 월(0),sumi(0),sumO(0),sumC(0);
월=FLOOR(DATE/100);
if 월 != 월[1] Then
{
sumO = 0;
sumC = 0;
sumi = 0;
}
sumO = sumO + O;
sumC = sumC + C;
sumi = sumi + 1;
Plot1(sumO/sumi);
Plot2(sumC/sumi);
전월의 평균가 수식 부탁드립니다.
감사합니다.
2022-12-28
1386
글번호 164913