커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
5449
글번호 230811
답변완료
수식부탁드립니다
안녕하세요 수식 부탁드립니다
선물지수,10분봉적용
일목균형표 기준선을 종가로 0.6포인트 이상이면 매수하고
매수가격에서 종가로 0.5포인트 마이너스면 손절,
그 반대의 경우엔 매도,매도손절
이런 수식 부탁드립니다
수고하세요
2020-01-29
233
글번호 135463
답변완료
지표수식 전환부탁
다음 수식을 시스템트레이딩 수식전환부탁드립니다.
//Begin
study("Didi Index Exponencial")
short = 3, mid = 8, long = 20
DidiLonga = ema(close, long) - ema(close, mid)
DidiCurta = ema(close, short) - ema(close, mid)
plot(DidiLonga, color=#ff0000)
plot(DidiCurta, color=#009900)
plot(0)
//End
2020-01-29
321
글번호 135462
답변완료
예스트레이더 수식으로 전환 문의드립니다.
study("T3 MTF", overlay=true)
res = input(title="Time Frame", type=resolution, defval="D")
T3FiboLine = input(false, title="Show T3 Fibonacci Ratio Line?")
length1 = input(8, "T3 Length")
a1 = input(0.7, "Volume Factor")
e1=ema((high + low + 2*close)/4, length1)
e2=ema(e1,length1)
e3=ema(e2,length1)
e4=ema(e3,length1)
e5=ema(e4,length1)
e6=ema(e5,length1)
c1=-a1*a1*a1
c2=3*a1*a1+3*a1*a1*a1
c3=-6*a1*a1-3*a1-3*a1*a1*a1
c4=1+3*a1+a1*a1*a1+3*a1*a1
T3=c1*e6+c2*e5+c3*e4+c4*e3
T3k = security(tickerid, res, T3)
plot(T3k, color=red, linewidth=3, title="T3")
length12 = input(5, "T3 Length fibo")
a12 = input(0.618, "Volume Factor fibo")
e12=ema((high + low + 2*close)/4, length12)
e22=ema(e12,length12)
e32=ema(e22,length12)
e42=ema(e32,length12)
e52=ema(e42,length12)
e62=ema(e52,length12)
c12=-a12*a12*a12
c22=3*a12*a12+3*a12*a12*a12
c32=-6*a12*a12-3*a12-3*a12*a12*a12
c42=1+3*a12+a12*a12*a12+3*a12*a12
T32=c12*e62+c22*e52+c32*e42+c42*e32
T32k = security(tickerid, res, T32)
plot(T3FiboLine and T32k ? T32k : na, color=blue, linewidth=2, title="T3fibo")
multi timeframe으로 가능할지 문의드립니다.
좋은 하루되세요
감사합니다.
2020-01-29
294
글번호 135461
답변완료
65783번 재문의드렸습니다(냉무)
한번만더 봐주시기바랍니다
2020-01-29
212
글번호 135458
답변완료
질문드립니다.
명절 잘 보내셨는지요..
항상 도움주셔서 감사드리며 질문드립니다.
하나. 분봉에서 countif(condition5,20)로 조건삽입하면 전일에 이어서
결과가 나옵니다. coundition5를 초기화 해도 안돼네요.. 초기화 방법좀 부탁합니다.
둘. 분봉에서 오늘일짜를 (조건만족시)저장해서 몇일후 불러서 사용하는 방법.
예) 삼일전 조건만족 && 조건A && ...
셋. SetStopLoss,SetStopEndofDay, SetStopTrailing...등 주문함수를
조건별로 아래와 같은 형식의 결과값을 원하면 가능한 함수가 어떤함수가 있나요..(주
문함수중에) 아니면 모든함수를 풀어서 사용해야 되나요..
if 조건 then{
SetStopLoss(3,Percent);
SetStopTrailing((30,10);
}
Else if 조건 then{
SetStopLoss(5,Percent);
SetStopTrailing((30,15);
}
2020-01-29
247
글번호 135455
byheekim 님에 의해서 삭제되었습니다.
2020-01-28
0
글번호 135454
답변완료
시스템식 부탁드립니다.
항상 도움 주셔서 감사합니다.
아래의 Easy Language Code 코드를 예스랭귀지로 변환 부탁드립니다.
감사합니다.
#----------------
# 요청 시스템1
#----------------
Inputs:
TradeUnit(100),
Band1(0), // Should be between 0 and 1
Band2(0), // Should be between 0 and 1
ExitBand(0); // Should be between 0 and .5
Variables:
Support(0), Resistance(0);
If CurrentBar = 1 then Begin
Support = C;
Resistance = C;
End;
If time >= 930 and time <= 1000 then begin
If Close > Resistance then begin
Resistance = Close;
End;
If Close < Support then begin
Support = Close;
End;
End;
#-----------
If time > 1000 and time < 1500 then begin
#-----------
{ Long Entry }
If Close <= (Resistance + Band1) and Close >= (Resistance - Band2) and Close > Close[1] and marketposition = 0 then begin
Buy TradeUnit shares next bar market;
End;
{ Long Exit }
If marketposition = 1 and marketposition = marketposition(1) then begin
Sell TradeUnit shares next bar at (Close - ExitBand) stop;
End;
{ Long Money Management }
If marketposition = 1 and (Close - EntryPrice)*TradeUnit <= -75 then begin
Sell TradeUnit shares next bar market;
End;
{ Short Entry }
If Close <= (Support + Band2) and Close >= (Support - Band1) and Close < Close[1] and marketposition = 0 then begin
Sell short TradeUnit shares next bar market;
End;
{ Short Exit }
If marketposition = -1 and marketposition = marketposition(1) then begin
Buy to cover TradeUnit shares next bar at (Close + ExitBand) stop;
End;
{ Short Money Management }
If marketposition = -1 and (EntryPrice - Close)*TradeUnit <= -75 then begin
Buy to Cover TradeUnit shares next bar market;
End;
#-----------
End;
#-----------
If time >= 1530 then begin
If marketposition = 1 then begin
Sell TradeUnit shares next bar market;
End;
If marketposition = -1 then begin
Buy to Cover TradeUnit shares next bar market;
End;
End;
#----------------
# 요청 시스템2
# Long-Only Strategy
#----------------
Input:
InitialBalance(100000), // The account size at start of trading
NDay(20) // How many days long is this systems basis (20 or 55 day) ;
Variables:
N(0), // Underlying volatility of the stock
DPP(Close), // Dollar per price of the stock
StopLoss(0), // Stop loss value
DollarRisk(0), // Dollar risk value T
radeUnit(100), // How much to trade based on idea that 1N
represents 1% of account equity
UnitsHeld(0), // How many units are currently held NotationalAccount(10000), // Notational Account, hard coded for testing purposes LastAccount(0), // Last account size to reevaluate drawdown Stop_On(False), // Stop loss boolean
Fast_Ave ( 0 ) , // Fast moving average value
Slow_Ave ( 0 ) , // Slow moving average value
Cross_Over (False); // Simple cross-over filter ;
{ Set-up }
Cross_Over = False;
Fast_Ave = Xaverage ( Close , 50 ) ;
Slow_Ave = Xaverage ( Close , 200 ) ;
If Fast_Ave > Slow_Ave and Slow_Ave > Slow_Ave [ 1 ] Then
Cross_Over = True;
{ Position Sizing }
N = VolatilityStdDev(NDay);
DPP = Close; // Price of the stock is equal to its close
DollarRisk = NotationalAccount * 0.01;
TradeUnit = IntPortion(DollarRisk/(N*DPP));
StopLoss = 2 * N;
// Decrease the size of the notational account if 10% drawdown
If NotationalAccount < (LastAccount * 0.9) Then Begin
NotationalAccount = NotationalAccount * 0.8;
Print(File("c: urtle_notational.txt"), NotationalAccount);
End
Else Begin
LastAccount = NotationalAccount;
End;
{ Entry }
// Do not even consider a trade if too many units are on the line
If UnitsHeld < 12 then Begin
// Enter if price exceeds by a single tick high of the preceding NDays)
If Close > HighD(NDay) and Cross_Over then Begin
If marketposition = 0 then begin
Buy ("Long") TradeUnit shares next bar market;
UnitsHeld = UnitsHeld + TradeUnit;
End;
If marketposition = 1 then begin
Buy ("Long more") (TradeUnit / 2) shares next bar market;
UnitsHeld = UnitsHeld + (TradeUnit / 2);
End;
End;
End;
{ Stop }
if ( Close - EntryPrice ) > StopLoss then begin
Stop_On = True;
End
Else begin
Stop_On = False;
End;
{ Exit}
If Close < LowD(NDay/2) and Stop_On then begin
Sell ("Long Exit") currentshares shares next bar market;
UnitsHeld = 0;
End;
#----------------
# 요청 시스템2
# Long-Only Strategy
#----------------
Input:
InitialBalance(100000), // The account size at start of trading
NDay(20) // How many days long is this systems basis (20 or 55 day) ;
Variables:
N(0), // Underlying volatility of the stock
DPP(Close), // Dollar per price of the stock
StopLoss(0), // Stop loss value
DollarRisk(0), // Dollar risk value
TradeUnit(100), // How much to trade based on idea that 1N represents 1% of account equity
UnitsHeld(0), // How many units are currently held NotationalAccount(10000), // Notational Account, hard coded for testing purposes LastAccount(0), // Last account size to reevaluate drawdown Stop_On(False), // Stop loss boolean
Fast_Ave ( 0 ) , // Fast moving average value
Slow_Ave ( 0 ) , // Slow moving average value
Cross_Over (False); // Simple cross-over filter ;
{ Set-up }
Cross_Over = False;
Fast_Ave = Xaverage ( Close , 50 ) ;
Slow_Ave = Xaverage ( Close , 200 ) ;
If Fast_Ave < Slow_Ave and Slow_Ave < Slow_Ave [ 1 ] Then
Cross_Over = True;
{ Position Sizing }
N = VolatilityStdDev(NDay);
DPP = Close; // Price of the stock is equal to its close
DollarRisk = NotationalAccount * 0.01;
TradeUnit = IntPortion(DollarRisk/(N*DPP));
StopLoss = 2 * N;
// Decrease the size of the notational account if 10% drawdown
If NotationalAccount < (LastAccount * 0.9) Then Begin
NotationalAccount = NotationalAccount * 0.8;
Print(File("c: urtle_short_notational.txt"), NotationalAccount);
End
Else Begin
LastAccount = NotationalAccount;
End;
{ Entry }
// Do not even consider a trade if too many units are on the line
#*
If UnitsHeld < 12 then Begin
#*
// Enter if price exceeds by a single tick high of the preceding NDays)
If Close < LowD(NDay) and Cross_Over then Begin
SellShort ("Short") N shares next bar market;
UnitsHeld = UnitsHeld + TradeUnit;
End;
If marketposition = -1 then begin
SellShort ("Short more") (N / 2) shares next bar market;
UnitsHeld = UnitsHeld + (TradeUnit / 2);
End;
End;
#*
End;
#*
{ Stop }
if ( Close - EntryPrice ) < StopLoss then begin
Stop_On = True;
End
Else begin
Stop_On = False;
End;
{ Exit}
If Close > HighD(NDay/2) and Stop_On then begin
BuyToCover ("Short Exit") currentshares shares next bar market;
UnitsHeld = 0;
End;
2020-01-28
805
글번호 135453
참새사냥꾼 님에 의해서 삭제되었습니다.
2020-01-28
2
글번호 135452
답변완료
타주기 이평 부탁드립니다.
아래는 이전에 받은 틱봉을 타주기로 바꾸는 지표입니다.
종가 이평선을 나타낼 수 있도록 부탁드리겠습니다.
감사합니다.
input : n(3);
var : TF(0),S1(0),D1(0),TM(0),cnt(0),idx(0);
Array : OO[10](0), HH[10](0),LL[10](0),CC[10](0);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
idx = 0;
}
Else
idx = idx+1;
if D1 > 0 then
{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TF = idx%n;
if Bdate != Bdate[1] or (Bdate == Bdate[1] and TF < TF[1]) Then
{
OO[0] = O;
HH[0] = H;
LL[0] = L;
for cnt = 1 to 9
{
OO[cnt] = OO[cnt-1][1];
HH[cnt] = HH[cnt-1][1];
LL[cnt] = LL[cnt-1][1];
CC[cnt] = CC[cnt-1][1];
}
}
if H > HH[0] Then
HH[0] = H;
if L < LL[0] Then
LL[0] = L;
CC[0] = C;
plot1(OO[0],"시가");
plot2(HH[0],"고가");
plot3(LL[0],"저가");
plot4(CC[0],"종가");
}
2020-01-28
265
글번호 135450