커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
3497
글번호 230811
답변완료
문의드립니다
var : tx(0);
Text_Delete(tx);
tx = Text_New(NextBarSdate,NextBarStime,NextBarOpen,NumToStr(NextBarOpen,2));
Text_SetStyle(tx,0,0);
====================
야간차트용으로 부탁드립니다
감사합니다
2025-06-10
293
글번호 191589
답변완료
오랜만에 인사드리네요 잘부탁 드립니다
input : uselow_bull(true);
input : usehigh_bear(true);
input : line_forward(8);
input : line_back(-200);
input : label_offset(8);
var : use_low_bull(0),use_high_bear(0);
var : bull_dir(False),bear_dir(False),red_bar(false),green_bar(False);
var : strong_bull_dir(False),strong_bear_dir(False),nuetral_bar(False);
var : line_price(naN),label_price(NaN);
var : is_bar_index(0),a(0),b(0),price(0);
var : bull_break(False),bear_break(False);
var : confirmed_bull_(False),bull_value(0);
var : confirmed_bear_(False),bear_value(0);
use_low_bull = IFf(uselow_bull,low,close);
use_high_bear = IFF(usehigh_bear,high,close);
bull_dir = close >= open[1];
bear_dir = close <= open[1];
red_bar = open < close;
green_bar = open > close;
strong_bull_dir = bull_dir and red_bar;
strong_bear_dir = bear_dir and red_bar;
nuetral_bar = strong_bear_dir == False and strong_bull_dir == False;
is_bar_index = index;
if is_bar_index>0 Then
{
TL_Delete(line_price);
Text_Delete(label_price);
a = close;
b = is_bar_index;
line_price = TL_new(sDate,sTime,a,NextBarSdate,NextBarStime,a);
TL_SetColor(line_price, IFf(strong_bull_dir , red ,IFf(strong_bear_dir , lime , IFf(nuetral_bar , orange, Black))));
TL_SetExtRight(line_price,true);
TL_SetExtLeft(line_price,true);
label_price = Text_new(NextBarSdate,NextBarStime,a, ntostr(a,2));
Text_SetColor(label_price,iFf(strong_bull_dir , red ,IFf(strong_bear_dir , lime , IFf(nuetral_bar , orange, Black))));
Text_SetSize(label_price,20);
}
//=================
//BEGIN Definitions
//=================
price = close;
bull_break = price > high[1]
and price > high[2]
and price > high[3]
and price > high[4]
and price > high[5]
and price > high[6]
and price > high[7]
and price > high[8]
and price > high[9]
and price > high[10]
and price > high[11]
and price > high[12]
and price > high[13]
and price > high[14];
//
confirmed_bull_ = bull_break[1] and bull_break == False;
if confirmed_bull_ == true Then
bull_value = high;
if bull_break == bull_break[1] Then
plot1(bull_value,"bull_value",iff(bull_break != bull_break[1],Black ,red));
Else
NoPlot(1);
bear_break = price < low[1]
and price < low[2]
and price < low[3]
and price < low[4]
and price < low[5]
and price < low[6]
and price < low[7]
and price < low[8]
and price < low[9]
and price < low[10]
and price < low[11]
and price < low[11]
and price < low[12]
and price < low[13]
and price < low[14];
//
confirmed_bear_ = bear_break[1] and bear_break == False;
if confirmed_bear_ == true Then
bear_value = low;
if bear_break == bear_break[1] Then
plot2(bear_value,"bear_value",iff(bear_break != bear_break[1],Black,green));
Else
NoPlot(2);
input : rsiLen(6);
input : rsiOverbought(85);
input : rsiOversold(15);
var : rsiValue(0),rsiisoverbt(False),rsiisoversld(False);
var : bear_signal(False),bull_signal(False);
var : bulllabel1(Nan),bulllabel2(nan),bullline(NaN);
var : bearlabel1(Nan),bearlabel2(nan),bearline(NaN);
rsiValue = rsi(rsiLen);
rsiisoverbt = rsiValue >= rsiOverbought;
rsiisoversld = rsiValue <= rsiOversold;
bear_signal = (bear_break[1] and bear_break == False);
bull_signal = (bull_break[1] and bull_break == False);
if bull_signal Then
{
Text_Delete(bulllabel1);
bulllabel1 = Text_New(sDate,sTime,H,"Potential bear Reversal"+NewLine+NewLine);
Text_SetColor(bulllabel1,Green);
Text_SetStyle(bulllabel1,2,1);
Text_Delete(bulllabel2);
bulllabel2 = Text_New(sDate,sTime,H,"▼");
Text_SetColor(bulllabel2,Green);
Text_SetStyle(bulllabel2,2,1);
Text_SetSize(bulllabel2,20);
}
if bull_break Then
{
TL_Delete(bullline);
bullline = TL_new(sDate,sTime,use_high_bear,NextBarSdate,NextBarStime,use_high_bear);
TL_SetExtRight(bullline,true);
TL_SetColor(bullline,Red);
}
if bear_signal then
{
Text_Delete(bearlabel1);
bearlabel1 = text_new(sDate,sTime,L,"▲");
Text_SetColor(bearlabel1,Red);
Text_SetStyle(bearlabel1,2,0);
Text_SetSize(bearlabel1,20);
Text_Delete(bearlabel2);
bearlabel2 = text_new(sDate,sTime,L,NewLine+NewLine+"Potential bull Reversal");
Text_SetColor(bearlabel2,Red);
Text_SetStyle(bearlabel2,2,0);
}
if bear_break Then
{
TL_Delete(bearline);
bearline = TL_new(sDate,sTime,use_low_bull,NextBarSdate,NextBarStime,use_low_bull);
TL_SetExtRight(bearline,true);
TL_SetColor(bearline,green);
}
var : Sell_signal(False),Buy_signal(False);
var : bull_function(False),bear_function(False),custom_signal(False);
Sell_Signal = bull_signal;
Buy_Signal = bear_signal;
bull_function = Buy_Signal;
bear_function = Sell_Signal;
custom_signal = (bull_function or bear_function);
//END CUSTOM FUNCTIONS====
// Plot BUY SELL markers
input : show_sell_signals(false);
input : show_buy_signals(false);
var : tx1(0),tx2(0);
if show_sell_signals == true and Sell_Signal == true Then
{
tx1 = text_new(sDate,sTime,H,"▼");
Text_SetColor(tx1,Red);
Text_SetStyle(tx1,2,1);
tx2 = text_new(sDate,sTime,H,"O-B"+NewLine);
Text_SetColor(tx2,Yellow);
Text_SetStyle(tx2,2,1);
}
if show_buy_signals == true and Buy_Signal == true Then
{
tx1 = text_new(sDate,sTime,L,"▲");
Text_SetColor(tx1,Lime);
Text_SetStyle(tx1,2,0);
tx2 = text_new(sDate,sTime,L,NewLine+"O-S");
Text_SetColor(tx2,Yellow);
Text_SetStyle(tx2,2,0);
}
1, 매수시스템으로 부탁드립니다
2,,, potential bull reversal 표시되는 봉에서는 강력매수 로표시부탁드려요
2025-06-10
365
글번호 191588
답변완료
문의
주간장 선물차트에 야간 선물의 저가/고가/종가/시가를 선으로 나타내고 싶고
주간옵션 챠트에 보조챠트의 저가/고가/종가/시가를 선으로 나타내고 싶습니다
감사합니다
2025-06-10
280
글번호 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
297
글번호 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
260
글번호 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
258
글번호 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
373
글번호 191574