커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1541
글번호 230811
와우리 님에 의해서 삭제되었습니다.
2025-06-16
54
글번호 191748
답변완료
수식 부탁드립니다
수고하십니다
2개의 다른 이격도 단기(5개봉), 장기(20개봉)으로
단기가 장기를 크로스업이면 매수 크로스 다운이면 매도하는
수식을 부탁드립니다.
2025-06-16
276
글번호 191744
이글루 님에 의해서 삭제되었습니다.
2025-06-16
0
글번호 191742
답변완료
검색식 부탁드립니다
전에 n일간 최고 거래대금인 날에 분홍색 볼이 뜨는 검색식을 부탁드려서
아래와 같은 검색식을 짜주셨는데요
아주 잘쓰고 있습니다 감사합니다
input: Length(20);
if M > Highest(M, Length)[1] then begin
Plot1( High, "BrkoutHi" ) ;
end ;
여기서 거래대금 최고와 두번째 거래대금인 봉까지 검색되게
짜주시면 감사하겠습니다
두번째 거래대금 봉은 다른색깔로 변경할수있게 해주시면
감사하겠습니다
2025-06-16
285
글번호 191741
답변완료
수식질문
아래와 같은 함수 수식이 있다고 했을 때
TTL값을 구하는 For문 형태의 수식을 부탁 드립니다.
EN(n) = if(Sum(C-C(1),n) > 0, Sum(C-C(1),n)*(100)/ Sum(if(C>C(1), C-C(1),0),n),Sum(C-C(1),n)*(-100)/Sum(if(C < C(1), C-C(1),0),n));
TTL=EN(1)+EN(2)+EN(3)+EN(4)+EN(5);
2025-06-16
286
글번호 191740
사공하늘 님에 의해서 삭제되었습니다.
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
285
글번호 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
340
글번호 191736