커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
3489
글번호 230811
사공하늘 님에 의해서 삭제되었습니다.
2025-06-15
79
글번호 191739
사공하늘 님에 의해서 삭제되었습니다.
2025-06-15
85
글번호 191738
답변완료
수식 작성 문의
input : Price(52300),진입횟수(1);
var : entry(0);
if Bdate != Bdate[1] Then
entry = 0;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if (NextBarSdate != sDate and NextBarSdate == CurrentDate and NextBarOpen < Price) or
(NextBarSdate == sDate and CurrentDate == sDate and
H < price and entry < 진입횟수 and DayOpen < Price) Then
Buy("b",AtStop,price);
------------------------------------------------------------------------------------
09:00에 시초가가 52,300원보다 높은 가격에서 시작하였으나,
장중 가격이 내려와서 52,300원 하회 후 재차 52,300원을 돌파하는 경우에는 매수할 수 있도록 수식 조정 부탁드립니다.
늘 노고에 감사드립니다.
2025-06-15
312
글번호 191737
답변완료
수식 부탁드립니다
지표식 부탁드립니다.
//@version=5
indicator("Parabolic SAR MARSI, Adaptive MACD [Loxx]", shorttitle ="PSAR_MARSI_A_MACD [Loxx]", overlay = false, timeframe="", timeframe_gaps=true)
_maRSI(src, price, rsiperiod, speed) =>
tprice = ta.sma(src, 1)
workMaRsi = 0.0
rsi = ta.rsi(src, rsiperiod)
if bar_index < rsiperiod
workMaRsi := tprice
else
workMaRsi := workMaRsi[1] + (speed * math.abs(rsi/100.0-0.5)) * (tprice-workMaRsi[1])
workMaRsi
variant(type, src, len) =>
sig = 0.0
if type == "SMA"
sig := ta.sma(src, len)
else if type == "EMA"
sig := ta.ema(src, len)
else if type == "DEMA"
sig := 2 * ta.ema(src, len) - ta.ema(ta.ema(src, len), len)
else if type == "TEMA"
sig := 3 * (ta.ema(src, len) - ta.ema(ta.ema(src, len), len)) + ta.ema(ta.ema(ta.ema(src, len), len), len)
else if type == "WMA"
sig := ta.wma(src, len)
else if type == "TRIMA"
sig := ta.sma(ta.sma(src, math.ceil(len / 2)), math.floor(len / 2) + 1)
else if type == "RMA"
sig := ta.rma(src, len)
else if type == "VWMA"
sig := ta.vwma(src, len)
sig
rsiSource = input.source(close, "RSI Source", group = "MARSI MACD")
rsiPeriod1 = input.int(14, "Fast RSI Period", minval = 0, group = "MARSI MACD")
speed1 = input.float(1.2, "Fast MARSI Speed", minval = 0.0, group = "MARSI MACD")
rsiPeriod2 = input.int(34, "Slow RSI Period", minval = 0, group = "MARSI MACD")
speed2 = input.float(0.8, "Slow MARSI Speed", minval = 0.0, group = "MARSI MACD")
start = input.float(0.01, "Start", minval = 0.0, group = "Parabolic SAR")
accel = input.float(0.01, "Acceleration", minval = 0.0, group = "Parabolic SAR")
finish = input.float(0.1, "Maximum", minval = 0.0, group = "Parabolic SAR")
signal_ma = input.string("EMA", title='Signal MA Type', options=["DEMA", "EMA", "RMA", "SMA", "TEMA", "TRIMA", "VWMA", "WMA"], group='MACD')
signalPer = input.int(9,"Signal Period", minval = 0, group = "MACD")
greencolor = #2DD204
redcolor = #D2042D
lightgreencolor = #96E881
lightredcolor = #DF4F6C
darkGreenColor = #1B7E02
darkRedColor = #93021F
psarUp = input(greencolor, "PSAR Uptrend  ", group="Color Settings", inline="MACD")
psarDown = input(redcolor, "PSAR Downtrend  ", group="Color Settings", inline="MACD")
col_signal = input(color.white, "Signal Line  ", group="Color Settings", inline="Signal")
col_grow_above = input(color.new(lightgreencolor, 60), "Above   Grow", group="Histogram of MACD", inline="Above")
col_fall_above = input(color.new(darkGreenColor, 60), "Fall", group="Histogram of MACD", inline="Above")
col_grow_below = input(color.new(darkRedColor, 60), "Below Grow", group="Histogram of MACD", inline="Below")
col_fall_below = input(color.new(lightredcolor, 60), "Fall", group="Histogram of MACD", inline="Below")
macdHi = _maRSI(rsiSource, high, rsiPeriod1, speed1) - _maRSI(rsiSource, high, rsiPeriod2, speed2)
macdLo = _maRSI(rsiSource, low, rsiPeriod1, speed1) - _maRSI(rsiSource, low, rsiPeriod2, speed2)
macdMid = (macdHi + macdLo) * 0.5
macd = _maRSI(rsiSource, macdMid, rsiPeriod1, speed1) - _maRSI(rsiSource, macdMid, rsiPeriod2, speed2)
signal= variant(signal_ma, macd, signalPer)
pine_sar(start, inc, max, cutoff, _high, _low, _close) =>
var float result = na
var float maxMin = na
var float acceleration = na
var bool isBelow = na
bool isFirstTrendBar = false
if bar_index < cutoff + cutoff * 0.2
if _close > _close[1]
isBelow := true
maxMin := _high
result := _low[1]
else
isBelow := false
maxMin := _low
result := 0
isFirstTrendBar := true
acceleration := start
result := result + acceleration * (maxMin - result)
if isBelow
if result > _low
isFirstTrendBar := true
isBelow := false
result := math.max(_high, maxMin)
maxMin := _low
acceleration := start
else
if result < _high
isFirstTrendBar := true
isBelow := true
result := math.min(_low, maxMin)
maxMin := _high
acceleration := start
if not isFirstTrendBar
if isBelow
if _high > maxMin
maxMin := _high
acceleration := math.min(acceleration + inc, max)
else
if _low < maxMin
maxMin := _low
acceleration := math.min(acceleration + inc, max)
if isBelow
result := math.min(result, _low[1])
if bar_index > 1
result := math.min(result, _low[2])
else
result := math.max(result, _high[1])
if bar_index > 1
result := math.max(result, _high[2])
result
sar = pine_sar(start, accel, finish, math.max(rsiPeriod2, rsiPeriod1), macdHi, macdLo, macd)
plot(0, "Zero line", style = plot.style_circles, color = color.gray)
plot(macd, "Historgram of MACD", style=plot.style_columns, color=(macd>=0 ? (macd[1] < macd ? col_grow_above : col_fall_above) : (macd[1] < macd ? col_grow_below : col_fall_below)))
plot(sar, "PSAR", style=plot.style_cross, linewidth=1, color = sar > signal ? psarDown : psarUp)
plot(signal,"Signal", linewidth=1, color = col_signal)
plotshape(sar < signal and sar[1] > signal ? sar : na, title='PSAR Long Start', location=location.absolute, style=shape.circle, size=size.tiny, color=greencolor)
plotshape(sar > signal and sar[1] < signal ? sar : na, title='PSAR Long Start', location=location.absolute, style=shape.circle, size=size.tiny, color=redcolor)
2025-06-15
370
글번호 191736
회원 님에 의해서 삭제되었습니다.
2025-06-15
38
글번호 191735
onlypsn 님에 의해서 삭제되었습니다.
2025-06-15
1
글번호 191734
답변완료
문의 드립니다.
안녕하세요
현재 종가가 아래의 2 조건을 돌파 또는 우상향 하는 종목 검색식 부탁 드립니다.
1. A라인 ;
S = sar(af,maxAf);
조건 = CrossUp(C, S);
시작가 = Valuewhen(1, 조건, O);
bs = BarsSince(조건);
라인2 = if(조건, 시작가, 시작가 + 시작가 * (비율2 / 100) * bs);
if(S < C && S < 라인2, 라인2, S)
지표조건
af 0.01
maxAf 0.2
비율2 1
2. B라인 ;
A=avg(c,17);
ATR=avg(max(max(h-L,abs(c(1)-h)),abs(c(1)-L)),17);
B=ATR*2;
D=A+B;
E=Bbandsup(17,2);
e1=crossup(E,D);
e2=crossdown(E,D);
e3=crossdown(c,E);
valuewhen(1,e1 or e2 or e3,o)
감사합니다.
2025-06-15
318
글번호 191733
답변완료
수식 문의 드립니다
항상 감사 드리니다.
아래 수식작성 요청식이 즉시 매수나 즉시매도식이 불가능할 시에는 봉 완성후 매입 매도 하는식으로 부탁 드립니다.
1. 일반식
1). Input : Period(5) ;
var : DMIv(0),DP(0),DM(0);
DMIv = DMI(Period);
DP = DIPlus(Period);
DM = DIMinus(Period);
2). volumn ratio(10)
1) 매수: DMIv가 20 이상 이고 volume ratio가 90 상향시 에서 즉시 매수
2) 매수: volume ratio가 90 이상 이고 DMIv가 20 상향시 즉시 매수
2) 매도: Volume ratio가 90 이하로 하락시 즉시매도
3) 매도: DMIv가 20 이하로 하락시 즉시 매도
2 data2를 이용항식
1). Input : Period(5) ;
var : DMIv(0),DP(0),DM(0);
DMIv = DMI(Period);
DP = DIPlus(Period);
DM = DIMinus(Period);
2). volumn ratio(10)
1) 매수: data2(DMIv)가 20 이상이고 DMIv가 20 이상 이고 volume ratio가 90 상향시 에서 즉시 매수
2) 매수: data2(Volume Ratio)가 20 이상이고, volume ratio가 90 이상 이고 DMIv가 20 상향시 즉시 매수
2) 매도: Volume ratio가 90 이하로 하락시 즉시매도
3) 매도: DMIv가 20 이하로 하락시 즉시 매도
2025-06-15
299
글번호 191732
답변완료
전환부탁드립니다.
수식전환부탁드립니다
수식1
m1=ma(C,이평기간);
m2=Highest(M1,봉수);
m3=Lowest(M1,봉수);
EU=M1;
EC=(M2+M3)/2;
ED=M3;
EH=EC(2)<=EC(1) &&EC(1)>EC;
EL=EC(2)>=EC(1) &&EC(1)<EC;
EU;
Valuewhen(1,M2>M2(1),M2);
이평기간 20/ 봉수 20
수식2
a=bbandsup(period1,d1);
b=bbandsup(period2,d2);
(a+b)/2;
period1/20 d1/2 period2/30 d2/2
수식3
m1=ma(C,이평기간);
m2=Highest(M1,봉수);
m3=Lowest(M1,봉수);
EU=M1;
EC=(M2+M3)/2;
ED=M3;
EH=EC(2)<=EC(1) &&EC(1)>EC;
EL=EC(2)>=EC(1) &&EC(1)<EC;
ED;
이평기간 20/ 봉수 20
수식4
(highest(high,period1)+lowest(low,period1))/2;
period1/20
2025-06-15
291
글번호 191731