커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
8107
글번호 230811
답변완료
시스템식에 지표 적용 문의 드립니다.
항상 많은 도움 감사드립니다. 그리고 담당자 및 관계가 분들 새해 복 많이 받으십시오.
트레이딩뷰에 있는 지표식을 예스트레이더 변환을 하였는데요..제가 변환한것은 아니고 유튜브 구독중에 있는 채널 운영자분이 변환해 주신 식 입니다.
지표식은 문제없이 작동이 되는데 이 지표식을 시스템 식에 가져와서 buy 신호를 발생시키는데 발생이 될때도 있고 안될때도 있어서 문의 드립니다.
지표식
input : toggleBreaks(true),leftBars(15),rightBars(12),volumeThresh(0);
var : SH(0),SL(0),highUsePivot(0),lowUsePivot(0),tx1(0),tx2(0);
if SwingHigh(1,h,leftBars,rightBars,leftBars+rightBars+1) != -1 Then
SH = H[rightBars];
highUsePivot = SH[1];
if SwingLow(1,l,leftBars,rightBars,leftBars+rightBars+1) != -1 Then
SL = L[rightBars];
lowUsePivot = SL[1];
if highUsePivot > 0 Then
plot1(highUsePivot,"Resistance",RED);
if lowUsePivot > 0 Then
plot2(lowUsePivot, "Support",BLUE);
var : short(0),long(0),osc(0);
short = ema(volume, 5);
long = ema(volume, 10);
osc = 100 * (short - long) / long;
if toggleBreaks and CrossDown(close,lowUsePivot) and !(open - close < high - open) and osc > volumeThresh Then
{
tx1 = Text_New(sDate,sTime,L,"dnBreak");
Text_SetStyle(tx1,2,0);
}
if toggleBreaks and CrossUp(close,highUsePivot ) and !(open - low > close - open) and osc > volumeThresh Then
{
tx1 = Text_New(sDate,sTime,H,"upBreak");
Text_SetStyle(tx1,2,1);
}
//For bull / bear wicks
if toggleBreaks and CrossUp(close,highUsePivot ) and open - low > close - open Then
{
tx2 = Text_New(sDate,sTime,H,"Bull Wick");
Text_SetStyle(tx2,2,1);
}
if toggleBreaks and CrossDown(close,lowUsePivot) and open - close < high - open Then
{
tx2 = Text_New(sDate,sTime,L,"Bear Wick");
Text_SetStyle(tx2,2,0);
}
위의 지표식을 시스템식에 가져와서 "upBreak" 텍스트가 나오는 자리에 시스템식의 "buy" 신호를 발생시키고 싶은데요.. 막상 작업을 해보니 "buy"신호가 발생이 될때도 있고 안될때도 있어서요..
아무래도 제가 toggleBreaks의 설정이유와 사용방법을 잘 몰라서 그러는 것 같은데 위의 지표식을 사용해서 시스템식에서 사용하는 방법을 문의 드립니다. 아래와 같은 포맷으로 정리해 주시면 감사드리겠습니다.
////////////////////////////////////////////////////////////////////////////////
지표식에서 시스템식으로 가져와야 할 것들
////////////////////////////////////////////////////////////////////////////////
if MarketPosition == 0 &&
"upBreak" 자리에 "buy"신호를 내기 위한 조건들
TheN
Buy ("매수",atmarket,def,1);
/////////////////////////////////////////////////////////////////////////////////
2024-01-01
1141
글번호 175327
답변완료
부탁드립니다.
DMI에서 D+와 D- 차이를 비율로 표시하여
D+가 D-보다 20%이상 크다면 작은 양의 막대를 35%이상이면
큰 막대로 50%이상이면 더 큰 막대로 색깔은 빨강으로 표현하게 해 주세요.(사진대로)
D-가 D+보다 20%이상 크다면 작은 양의 막대를 35%이상이면
큰 막대로 50%이상이면 더 큰 막대로 표현 색깔은 파란색으로 표현하게 해 주세요.
그리고 이 비율도 조정할수 있게 해 주세요.
감사합니다.
2024-01-01
947
글번호 175326
답변완료
부탁드립니다.
적용 가능하도록 변형 부탁 드립니다
a = input(10, "Percent K Length")
b = input(3, "Percent D Length")
ob = input(40, "Overbought")
os = input(-40, "Oversold")
// Range Calculation
ll = lowest (low, a)
hh = highest (high, a)
diff = hh - ll
rdiff = close - (hh+ll)/2
avgrel = ema(ema(rdiff,b),b)
avgdiff = ema(ema(diff,b),b)
// SMI calculations
SMI = avgdiff != 0 ? (avgrel/(avgdiff/2)*100) : 0
SMIsignal = ema(SMI,b)
emasignal = ema(SMI, 10)
h0 = hline(40)
h1 = hline(-40)
//Color Definition for Stochastic Line
//col = SMI >= 40 ? green : SMI <= -40 ? red : black
plot(SMIsignal, title="Stochastic", style=line, color=black)
plot(emasignal, title="EMA", style=line, color=red)
level_40 = 40
level_40smi = SMIsignal > level_40 ? SMIsignal : level_40
level_m40 = -40
level_m40smi = SMIsignal < level_m40 ? SMIsignal : level_m40
p1 = plot(level_40)
p2 = plot(level_40smi)
p3 = plot(level_m40)
p4 = plot(level_m40smi)
fill(p1, p2, color=red, transp=40, title='OverSold')
fill(p3, p4, color=green, transp=40, title='OverBought')
2023-12-31
1009
글번호 175325
234fsdae 님에 의해서 삭제되었습니다.
2023-12-31
361
글번호 175324
234fsdae 님에 의해서 삭제되었습니다.
2023-12-31
434
글번호 175323
234fsdae 님에 의해서 삭제되었습니다.
2023-12-31
413
글번호 175322
답변완료
macd box 지표쪽
Input : shortPeriod(36), longPeriod(78), Period(15),val(-0.08);
Var : MACDv(0), MACDsig(0),T(0),TL(0),Box(0);
MACDv = MACD(shortPeriod, longPeriod);
MACDsig = ma(MACDv,Period);
if macdsig > macdsig [1] Then
T = 1;
if macdsig < macdsig [1] Then
T = -1;
Plot1 (macdsig ,"macdsig",IFF(T == 1,Red,Blue));
plot2 (-0.08);
if T == 1 and T != T[1] and MACDsig <= val Then
{
TL = TL_New_Self(sDate,sTime,-0.08,sDate,sTime,999);
TL_SetColor(TL,Red);
TL_SetSize(TL,0.5);
}
Condition1 = macdsig <= val;
if Condition1 == true Then
{
if Condition1[1] == False Then
{
box = Box_New_Self(sDate,sTime,H,NextBarSdate,NextBarStime,L);
Box_SetColor(box,Yellow);
Box_SetFill(box,true,70);
Box_SetExtFill(box,true);
TL = TL_New_Self(sDate,sTime,-0.08,sDate,sTime,999);
TL_SetColor(TL,Lime);
TL_SetSize(TL,3);
}
Else
Box_SetEnd(Box,NextBarSdate,NextBarStime,L);
}
전체 박스에서 차트 쪽은 지우고 지표 쪽만 박스 표시. 감사합니다.
2024-01-02
1322
글번호 175321
2wnwn 님에 의해서 삭제되었습니다.
2024-01-01
13
글번호 175320
답변완료
문의 드립니다
input : StartTime(0000),EndTime(0000);
input : 익절틱수(0),손절틱수(0);
var : Tcond(False),entry(0);
Variables: Mom(0);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
Tcond = true;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
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 L ==lowest(L,1) and highest(H,3) >= lowest(L,2)+PriceScale*1 Then
{
Buy("b",AtStop,(highest(H,3)+lowest(L,1))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 9 Then
Sell();
}
if H == highest(H,1) and lowest(L,3) <= highest(H,2)+PriceScale*1 Then
{
Sell("s",AtStop,(lowest(L,3)+highest(H,1))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 9 Then
Buy();
if L ==lowest(L,1) and highest(H,3) >= lowest(L,2)+PriceScale*10 Then
{
Buy("b1",AtStop,(highest(H,3)+lowest(L,1))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 9 Then
Sell();
if H == highest(H,1) and lowest(L,3) <= highest(H,2)+PriceScale*10 Then
{
Sell("s1",AtStop,(lowest(L,3)+highest(H,1))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 9 Then
Buy();
if L ==lowest(L,1) and highest(H,3) >= lowest(L,2)+PriceScale*10 Then
{
Buy("b2",AtStop,(highest(H,3)+lowest(L,1))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 9 Then
Sell();
if H == highest(H,1) and lowest(L,3) <= highest(H,2)+PriceScale*10 Then
{
Sell("s2",AtStop,(lowest(L,3)+highest(H,1))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 9 Then
Buy();
if L ==lowest(L,1) and highest(H,3) >= lowest(L,2)+PriceScale*1 Then
{
Buy("b3",AtStop,(highest(H,3)+lowest(L,1))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 9 Then
Sell();
if H == highest(H,1) and lowest(L,3) <= highest(H,2)+PriceScale*1 Then
{
Sell("s3",AtStop,(lowest(L,3)+highest(H,1))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 9 Then
Buy();
if L ==lowest(L,1) and highest(H,3) >= lowest(L,2)+PriceScale*10 Then
{
Buy("b4",AtStop,(highest(H,3)+lowest(L,1))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 9 Then
Sell();
if H == highest(H,1) and lowest(L,3) <= highest(H,2)+PriceScale*10 Then
{
Sell("s4",AtStop,(lowest(L,3)+highest(H,1))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 9 Then
Buy();
if L ==lowest(L,1) and highest(H,3) >= lowest(L,2)+PriceScale*10 Then
{
Buy("b5",AtStop,(highest(H,3)+lowest(L,1))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 9 Then
Sell();
if H == highest(H,1) and lowest(L,3) <= highest(H,2)+PriceScale*10 Then
{
Sell("s5",AtStop,(lowest(L,3)+highest(H,1))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 9 Then
Buy();
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
-----------------
위 수식어의 결과값을 첨부파일로 보면 참 만족스러운데 일봉매매의 특성상 현실적으로
전일잔고 미인식으로 귀사가 말씀하셨듯이 수식어의 일봉매매는 별 의미가 없습니다.
해서 장중 매매 신호발생시 미니 매수, 매도창에 2회클릭으로 체결이 되는 방법이 수식어
수정으로 가능한지 문의 해 봅니다.
이것이 불가하다면 매매신호의 음성인식후 마우스의 수동 조작이 된다면
어쩔수 없는 선택지로 받아 드리겠습니다.
2023-12-30
1466
글번호 175319