커뮤니티
예스랭귀지 Q&A
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1345
글번호 230811
답변완료
수식문의 드립니다.
문의 드립니다.
1. 아래처럼 단순하게 cci(50)선이 기준선(0)을 이탈하였다가 기준선을 재돌파 할때마다 n번 분할매수 후 일괄매도(2% 수익후)
하려고 합니다. 일괄매도 수식이 필요합니다.
1-1.분할 매수시 앞전 매수시점 가격보다 낮으면 매입수량이 2배씩 증가하는 수식도 부탁드립니다.
(예를들어 앞전 매수시점 가격보다 현 매수가가 낮으면 앞전 2배매수, 높으면 1배매수 이렇게 가능할까요? 매수가가 낮아 질수록 1배 2배 4배 이렇게 (n회)이내 이렇게요 가능하면 꼭 좀 부탁드립니다.
2.
if MarketPosition == 1 Then
{
ExitLong("Bp",AtLimit,AvgEntryPrice*(1+percent/100));
}
위 매도수식을 다른 일반 조건 매도 부분에 대체하니 결과값이 안나옵니다. 왜 그런지요?
아래1번
Input : Period1(50),Period2(9);
var : CCIv(0),CCIsig(0),count(0);
CCIv = CCI(Period1);
CCIsig = ema(CCIv,Period2);
if CrossDown(cciv,0)Then
count = 0;
if CrossUp(cciv,0) Then
{
count = count+1;
if count == 1 Then
Buy("b1");
if count == 2 Then
Buy("b2");
if count == 3 Then
Buy("b3");
if count == 4 Then
Buy("b4");
}
1. **분할 매수후 일괄매도 수식 자리
2024-12-27
600
글번호 186672
답변완료
수식요청
안녕하세요 늘 도움 감사합니다
현재 진행 캔들의 시간을 표시 할 수 있으면 부탁드립니다.
캔들이 3분 차트이면 현재 진행 봉의 표시...그림처럼
2024-12-27
585
글번호 186671
답변완료
문의드립니다
10틱차트에서
최근 5분간 누적 봉갯수
10틱차트에서
최근 5분간 누적 거래대금
두 지표
문의드립니다
2024-12-27
617
글번호 186670
답변완료
수식 부탁드립니다
수고하십니다
아래수식은 30분봉기준으로 5분봉에서 30분봉시스템 신호가 나올수
있도록 수식부탁 드립니다.
input : 익절(300),손절(36),k(100),k1(100),s(20),s1(20);
Buy("b",AtStop,h[s]+PriceScale*k);
Sell("s",AtStop,l[s1]-PriceScale*k1);
SetStopProfittarget(익절,PointStop);
SetStopLoss(손절,PointStop);
감사합니다
2024-12-27
605
글번호 186669
답변완료
수고하십니다
올해도 수고 많으셨습니다
새해에복많이 받으시고 행복한 한해 되세요
변환 부탁드려요 길면 채널만이라도 부탁드립니다
indicator("Future Trend Channel [ChartPrime]", overlay = true, max_lines_count = 500)
// --------------------------------------------------------------------------------------------------------------------}
// 𝙐𝙎𝙀𝙍 𝙄𝙉𝙋𝙐𝙏𝙎
// --------------------------------------------------------------------------------------------------------------------{
int length = input.int(100, "Trend Length")
float multi = input.float(3, "Channel Width", step = 0.1)
int extend = input.int(50, "Index of future price")
color color_up = input.color(#16d897, "Up", inline = "Colors")
color color_dn = input.color(#da853f, "Dn", inline = "Colors")
float atr = ta.highest(ta.atr(200), 100)
// UDT ------------------------------>>
type channel
line line_mid1 = na
line line_mid2 = na
line line_top1 = na
line line_top2 = na
line line_low1 = na
line line_low2 = na
var c = channel.new(line(na), line(na), line(na), line(na), line(na), line(na))
// --------------------------------------------------------------------------------------------------------------------}
// 𝙄𝙉𝘿𝙄𝘾𝘼𝙏𝙊𝙍 𝘾𝘼𝙇𝘾𝙐𝙇𝘼𝙏𝙄𝙊𝙉𝙎
// --------------------------------------------------------------------------------------------------------------------{
future_price(x1,x2,y1,y2,index)=>
float slope = (y2-y1)/(x2-x1)
float future_price = y1 + slope * (index - x1)
style = switch
y1 > y2 =>label.style_label_lower_left
=>label.style_label_upper_left
label.new(index, future_price,
text = str.tostring(future_price, "Future Price: ₩n #.#"),
color = color.new(chart.fg_color, 80),
textcolor = chart.fg_color,
style = style)
trend(length)=>
var trend = bool(na)
float sma = ta.sma(close, length)
float upper = sma + atr
float lower = sma - atr
bool signal_up = ta.crossover(close, upper)
bool signal_dn = ta.crossunder(close, lower)
if signal_up
trend := true
if signal_dn
trend := false
trend
bool trend = trend(length)
remove_lines(trend)=>
if trend and not trend[1]
c.line_mid2 := line(na)
c.line_top2 := line(na)
c.line_low2 := line(na)
if not trend and trend[1]
c.line_mid1 := line(na)
c.line_top1 := line(na)
c.line_low1 := line(na)
color_lines(line_m, line_t, line_l, color, label)=>
var color_lines = color
if color == color_up ? line_m.get_y1() <= line_m.get_y2() : line_m.get_y1() >= line_m.get_y2()
color_lines := color
line_m.set_color(color_lines)
line_l.set_color(color_lines)
line_t.set_color(color_lines)
line_m.set_style(line.style_solid)
line_t.set_style(line.style_solid)
line_l.set_style(line.style_solid)
label.set_color(label, color_lines)
if color == color_up ? line_m.get_y1() >= line_m.get_y2() : line_m.get_y1() <= line_m.get_y2()
color_lines := chart.fg_color
line_m.set_color(color_lines)
line_t.set_color(color_lines)
line_l.set_color(color_lines)
line_m.set_style(line.style_dashed)
line_t.set_style(line.style_dashed)
line_l.set_style(line.style_dashed)
label.set_color(label, color.new(color_lines, 100))
label.set_size(label, size.tiny)
linefill.new(line_l, line_t, color.new(color_lines, 90))
draw_channel(trend)=>
var label_up = label(na)
var label_dn = label(na)
var label_m = label(na)
series float src = hl2
series float low_src = src - atr * multi
series float high_src = src + atr * multi
// -> New Lines
if trend and not trend[1]
label_up := label.new(bar_index, low_src, style = label.style_diamond)
c.line_mid1 := line.new(bar_index, src, bar_index, src)
c.line_top1 := line.new(bar_index, high_src, bar_index, high_src)
c.line_low1 := line.new(bar_index, low_src, bar_index, low_src)
c.line_mid2.set_xy2(bar_index, src)
c.line_top2.set_xy2(bar_index, high_src)
c.line_low2.set_xy2(bar_index, low_src)
if not trend and trend[1]
label_dn := label.new(bar_index, high_src, style = label.style_diamond)
c.line_mid2 := line.new(bar_index, src, bar_index+2, src)
c.line_top2 := line.new(bar_index, high_src, bar_index, high_src)
c.line_low2 := line.new(bar_index, low_src, bar_index, low_src)
c.line_mid1.set_xy2(bar_index, src)
c.line_top1.set_xy2(bar_index, high_src)
c.line_low1.set_xy2(bar_index, low_src)
// Extend
if trend
label.delete(label_m)
c.line_mid2.set_extend(extend.none)
c.line_top2.set_extend(extend.none)
c.line_low2.set_extend(extend.none)
c.line_mid1.set_extend(extend.right)
c.line_top1.set_extend(extend.right)
c.line_low1.set_extend(extend.right)
c.line_mid1.set_xy2(bar_index, ta.sma(src, 20))
c.line_top1.set_xy2(bar_index, ta.sma(high_src, 20))
c.line_low1.set_xy2(bar_index, ta.sma(low_src, 20))
label_m := future_price(c.line_mid1.get_x1(), c.line_mid1.get_x2(), c.line_mid1.get_y1(), c.line_mid1.get_y2(), bar_index+extend)
if not trend
label.delete(label_m)
c.line_mid1.set_extend(extend.none)
c.line_top1.set_extend(extend.none)
c.line_low1.set_extend(extend.none)
c.line_mid2.set_extend(extend.right)
c.line_top2.set_extend(extend.right)
c.line_low2.set_extend(extend.right)
c.line_mid2.set_xy2(bar_index, ta.sma(src, 20))
c.line_top2.set_xy2(bar_index, ta.sma(high_src, 20))
c.line_low2.set_xy2(bar_index, ta.sma(low_src, 20))
label_m := future_price(c.line_mid2.get_x1(), c.line_mid2.get_x2(), c.line_mid2.get_y1(), c.line_mid2.get_y2(), bar_index+extend)
color_lines(c.line_mid1, c.line_top1, c.line_low1, color_up, label_up)
color_lines(c.line_mid2, c.line_top2, c.line_low2, color_dn, label_dn)
remove_lines(trend)
// --------------------------------------------------------------------------------------------------------------------}
// 𝙑𝙄𝙎𝙐𝘼𝙇𝙄𝙕𝘼𝙏𝙄𝙊𝙉
// --------------------------------------------------------------------------------------------------------------------{
draw_channel(trend)
// --------------------------------------------------------------------------------------------------------------------}
2024-12-27
700
글번호 186664
답변완료
수식 부탁드립니다
날이추운데 감기조심하십시요.
종목검색식 부탁드리겠습니다. 선생님
S1 = eavg((C-C(Period))/C(Period)*100, maPeriod);
R=RSI(9);
CrossUP(S1, 0) && R>30
Period 60
maPeriod 120
항상 감사드립니다.
2024-12-27
682
글번호 186663
살빼고싶다 님에 의해서 삭제되었습니다.
2024-12-27
66
글번호 186662
답변완료
문의드립니다.
안녕하세요.
선물 1분봉 차트에서
위 그림의 조건 만족하면
1. 반등고점 빨강선을 100봉 동안 출력
2. 조정저점 파랑선을 100봉 동안 출력
수고하세요.
2024-12-27
548
글번호 186661
답변완료
종목 검색 부탁드립니다.
지수 5 이평이
Envelope(20,6) Period(20),Percent(6) 상한선를 돌파
종목 검색식 부탁 드립니다
2024-12-26
647
글번호 186660