커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
6177
글번호 230811
답변완료
문의
주간장 선물차트에 야간 선물의 저가/고가/종가/시가를 선으로 나타내고 싶고
주간옵션 챠트에 보조챠트의 저가/고가/종가/시가를 선으로 나타내고 싶습니다
감사합니다
2025-06-10
330
글번호 191584
답변완료
키움 신호를 예스트레이더 검색식으로 부탁드립니다.
수고많으십니다. 키음 신호를 예스랭귀지로 구현하고 싶습니다. 부탁드립니다.
A=Macd(short,long)-eavg(Macd(short,long),signal);
Mc1=Valuewhen(1,crossup(A,0),O);
P=Mc1-A*증폭;
Mc2=Valuewhen(1,crossdown(A,0),C);
M=Mc2+A*(-증폭);
B=If(A>0,P,M);
crossdown(B,C)
지표변수
short 12
long 26
signal 9
증폭 10
2025-06-10
354
글번호 191580
답변완료
수식 부탁드립니다
아래의 식이 제가 주간장에서 90일간의 트루레인지(dATR)를 구하는 식인데
이식을 복합장 챠트에서 주간의 90일간의 트루레인지를 구하는 식으로 변환하고 싶습니다.
부탁드립니다.
var : dATR(0), maxATR90(0), hap90(0), n90(0) ;
hap90 = 0 ;
for n90 = 1 to 90 {
maxATR90 = max( dayhigh(n90)-daylow(n90) ,
dayclose(n90+1)-daylow(n90) ,
dayhigh(n90)-dayclose(n90+1) ) ;
hap90 = hap90 + maxATR90 ;
}
dATR = hap90 / 90 ;
2025-06-10
311
글번호 191579
답변완료
MACD 히스토그램 + RSI 요청
안녕하세요, 추가로 이 수식에
RSI 20 이하일 시 매수, RSI 70이상일 시 매도 수식을 추가해주실 수 있으실까요?
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : macd 히스토그램
>
안녕하세요
예스스탁입니다.
1. 시스템
input : short(12),long(26),sig(9),N(10);
var : osc(0),hh(0),ll(0);
osc = MACD_OSC(short,long,sig);
hh = highest(osc,N);
ll = lowest(osc,N);
if osc > hh[1] then
buy();
if osc < ll[1] then
sell();
2 강조
input : short(12),long(26),sig(9),N(10);
var : osc(0),hh(0),ll(0);
osc = MACD_OSC(short,long,sig);
hh = highest(osc,N);
ll = lowest(osc,N);
if osc > hh[1] then
PlotPaintBar(H,L,"강조",Magenta);
if osc < ll[1] then
PlotPaintBar(H,L,"강조",Cyan);
즐거운 하루되세요
> 부기곰 님이 쓴 글입니다.
> 제목 : macd 히스토그램
> 최근 10거래일 동안의 macd 히스토그램 막대차트의 max와 min을 구하여
진입, 청산하는 전략을 구현하고 싶습니다.
1. max, min을 화살표 혹은 바 색상을 다르게 표시하는법
2. max, min을 구하여 진입, 청산하는 수식
2가지 알려주시면 감사하겠습니다.
2025-06-10
324
글번호 191578
관리자에 의해 예스스팟 QnA로 이동되었습니다
2025-06-10
7
글번호 191576
사노소이 님에 의해서 삭제되었습니다.
2025-06-10
13
글번호 191575
답변완료
문의드립니다.
아래의 트레이딩뷰 수식을 변환부탁드립니다.
=====================
/ Input parameters
lookback = input.int(5, "Pivot Lookback", minval=1, step=1) // Swing high/low lookback period for Liquidity Swings
stopLossBuffer = input.float(0.5, "Stop Loss Buffer %", minval=0.1, step=0.1) // Buffer for initial stop loss
// --- Liquidity Swings Indicator (Simulated with Pivot High/Low) ---
pivotHigh1h = ta.pivothigh(high, lookback, lookback)
pivotLow1h = ta.pivotlow(low, lookback, lookback)
// Store latest support/resistance levels
var float resistance1h = na
var float support1h = na
if not na(pivotHigh1h)
resistance1h := pivotHigh1h
if not na(pivotLow1h)
support1h := pivotLow1h
// --- Entry Signals (Strictly at 1h Support/Resistance) ---
// Long: Price crosses above support (swing low) and is below resistance
// Short: Price crosses below resistance (swing high) and is above support
buySignal = ta.crossover(low, support1h) and close < resistance1h
sellSignal = ta.crossunder(high, resistance1h) and close > support1h
// --- Stop Loss and Take Profit ---
// Initial stop loss: Below support (for long) or above resistance (for short) with buffer
slLong = support1h * (1 - stopLossBuffer / 100)
slShort = resistance1h * (1 + stopLossBuffer / 100)
// --- Take Profit Logic (1:2 Risk-Reward) ---
var float entryPrice = na
var float initialStopLoss = na
var float takeProfitPrice = na
// Track entry and stop loss
if buySignal
entryPrice := close
initialStopLoss := slLong
takeProfitPrice := entryPrice + 2 * (entryPrice - initialStopLoss)
if sellSignal
entryPrice := close
initialStopLoss := slShort
takeProfitPrice := entryPrice - 2 * (initialStopLoss - entryPrice)
// --- Stop Loss on Support/Resistance Breakout ---
// Breakout: Price closes below support (for long) or above resistance (for short)
stopLong = close < support1h
stopShort = close > resistance1h
// --- Strategy ---
if (buySignal)
strategy.entry("Long", strategy.long)
strategy.exit("Exit Long", "Long", stop=stopLong ? support1h : slLong, limit=takeProfitPrice)
if (sellSignal)
strategy.entry("Short", strategy.short)
strategy.exit("Exit Short", "Short", stop=stopShort ? resistance1h : slShort, limit=takeProfitPrice)
// --- Visualization ---
plot(resistance1h, "1h Resistance", color=color.red, linewidth=1, offset=-lookback)
plot(support1h, "1h Support", color=color.green, linewidth=1, offset=-lookback)
plotshape(buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)
plotshape(sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)
===================
생성되는 라인은 차트에 표시되게 또는 안되게 선택할수 있고, 삼각형신호가 확실하게 표현되었으면 합니다. 위 지표를 지표수식과 시스템수식으로 각각 부탁드립니다. 지표값은 변경가능하게 부탁드립니다.
항상 감사드립니다. 수고하세요!!!
2025-06-10
572
글번호 191574
답변완료
문의드립니다
if date != date[1]
위 수식은 주간이나 야간 다 당일용으로 쓸수있는건가요?
2025-06-10
280
글번호 191573
답변완료
키움 수식을 변환부탁
안녕 하세요 하기 키움 수식을 변환부탁 드려도 될까요? 매번 감사 드립니다.
S=sum(1);
M5=ma(C,기간1,지수);
상전5=M5>M5(1) && M5(1)<M5(2);
M2=ma(C,기간2);
DC=Valuewhen(1,Crossdown(M5,M2),S);
상1=Valuewhen(1,상전5,S);
상2=Valuewhen(2,상전5,S);
상3=Valuewhen(3,상전5,S);
GC=Valuewhen(1,CrossUp(M5,M2),S);
조건W=상3<DC && DC<상2 && 상2<상1 && 상1<GC;
조건W && !조건W(1)
2025-06-10
336
글번호 191572