커뮤니티

예스랭귀지 Q&A

글쓰기

파워 님에 의해서 삭제되었습니다.

프로필 이미지
파워
2025-02-22
434
글번호 188445
지표
답변완료

질문

안녕하세요... 조건검색시 Ema(C,240)과 같은 1년이나 2년 이동평균 등을 사용해 수식을 작성하고 있습니다. 혹은, 일목균형표의 기간을 기존보다 늘려서 사용하고 있습니다. 검색에 필요한 최소기간은 500봉으로 설정했습니다. 그러면, 클로봇, RF시스템즈, 닷밀 같이 최근에 상장한 종목들이 검색에서 제외되는 것 같습니다. 혹시 이런 종목들을 기존 종목들과 함께 검색되게 하려면 어떻게 하면 될까요? 가능하면 condtion=~ 의 수식을 사용했으면 하는데 가능할런지요? 늘 감사합니다. 좋은 하루보내세요.
프로필 이미지
이루나라
2025-02-23
455
글번호 188444
종목검색
답변완료

시스템 트레이딩 수식 변환 부탁드립니다

지난번에 문의를 드렸지만 제대로 구현이 되지 않아서 전략을 설명하는 이미지와 전략을 구현한 파인스크립트 소스를 첨부드립니다. 또한 덧붙인 추가적인 예외 상황까지 참고하시어 예스랭기지로 변환 부탁드리겠습니다. ①롱 진입 : 100일 이평선을 상향 돌파 마감한 캔들의 시초가를 기준점으로 설정, 다음 캔들부터 +100틱에서 롱 포지션 진입.(그림1) ②숏 진입 : 200일 이평선을 하향 돌파 마감한 캔들의 시초가를 기준점으로 설정, 다음 캔들부터 -100틱에서 숏 포지션 진입.(그림2) ③기존 포지션이 있을 경우, 진입 조건을 만족해도 추가로 진입하지 않음. ④익절과 손절은 각각 100틱 ⑤나스닥 100 선물 1계약 [추가 상황] 기준 이평선 돌파 캔들(X)의 시가와 종가의 갭이 +-100틱을 넘어설 경우, X 캔들의 다음 캔들(X+1)부터 X 캔들의 시초가 +-100틱 지점을 지정가로 포지션 진입. -롱 : A 캔들이 100일 이평 상향 돌파 마감. A캔들 시초가 10,000, 종가 10,100 가정했을 때, A+1 캔들부터 +100틱인 10,025에서 지정가로 포지션 진입(그림3) -숏 : B 캔들이 200일 이평 하향 돌파 마감. B캔들 시초가 10,000, 종가 9,000 가정했을 때, B+1 캔들부터 -100틱인 9,975에서 지정가로 포지션 진입(그림4) //@version=5 strategy("Auto Trading", overlay=true) // 설정 변수 lengthLong = 100 lengthShort = 200 tickSize = syminfo.mintick tickOffset = 100 * tickSize tp_sl_ticks = 100 * tickSize // 이동평균선 계산 ma100 = ta.sma(close, lengthLong) ma200 = ta.sma(close, lengthShort) // 캔들 정보 prevOpen = ta.valuewhen(close > ma100 and ta.crossover(close, ma100), open, 0) shortPrevOpen = ta.valuewhen(close < ma200 and ta.crossunder(close, ma200), open, 0) // 진입 가격 계산 longEntryPrice = prevOpen + tickOffset shortEntryPrice = shortPrevOpen - tickOffset // 포지션 보유 여부 확인 hasPosition = strategy.position_size != 0 // 롱 진입 조건 (기존 포지션 없고, 조건 충족 시) longCondition = not hasPosition and ta.crossover(close, ma100) if (longCondition) strategy.entry("Long", strategy.long, qty=1, stop=longEntryPrice) strategy.exit("Long TP/SL", from_entry="Long", limit=longEntryPrice + tp_sl_ticks, stop=longEntryPrice - tp_sl_ticks) // 숏 진입 조건 (기존 포지션 없고, 조건 충족 시) shortCondition = not hasPosition and ta.crossunder(close, ma200) if (shortCondition) strategy.entry("Short", strategy.short, qty=1, stop=shortEntryPrice) strategy.exit("Short TP/SL", from_entry="Short", limit=shortEntryPrice - tp_sl_ticks, stop=shortEntryPrice + tp_sl_ticks)
프로필 이미지
codeblue
2025-02-24
482
글번호 188443
시스템
답변완료

수식부탁드립니다.

1. 첨부파일처럼 진입지연주문을 설정하였으나 무포지션일 경우는 진입지연없이 바로 주문 나갈 수 있게 수식을 만들 수 있나요?
프로필 이미지
산수유
2025-02-22
441
글번호 188442
시스템

우유 님에 의해서 삭제되었습니다.

프로필 이미지
우유
2025-02-22
55
글번호 188441
시스템
답변완료

종목 검색식 관련 문의 드립니다.

안녕하세요 항상 빠른 답변 감사 드립니다. 검색시간에 대한 식을 문의 드립니다. 1. 장 마감 이후에 검색을 할때(당일 113000 이후에) 당일 113000 이전을 검색 시간으로 설정을 하려면 어떤 식을 작성 해야 하는지요 2. 30분에서 30분봉 당일 첫분봉의 저가 보다 0봉의 종가가 높다 위식의 작성식을 요청 드립니다. 그럼 좋은 하루 되세요
프로필 이미지
느와르
2025-02-22
351
글번호 188440
종목검색

관리자에 의해 예스스팟 QnA로 이동되었습니다

프로필 이미지
님이랑
2025-02-24
32
글번호 188439
종목검색

신의천기사 님에 의해서 삭제되었습니다.

프로필 이미지
신의천기사
2025-02-21
7
글번호 188436
종목검색
답변완료

수식수정요청

수고 많습니다 이베스트때 가입 LS증권에 사용 하고자 합니다 트레이딩뷰 지표입니다 indicator("오실레이터", max_labels_count = 500, max_lines_count = 500) // ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{ int &#160; length &#160; = input.int(50, minval=1, title="Filter Length") bool &#160;disp_lvl = input.bool(true, "Levels") color up_color = input.color(color.rgb(70, 236, 200), "", inline = "color") color dn_color = input.color(#fc6c37, "", inline = "color") var buy_line = line(na) var sell_line = line(na) // } // ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{ float sma1 &#160; = ta.sma(close, 25) float sma_n1 = ((close - sma1) - ta.sma(close - sma1, 25)) / ta.stdev(close - sma1, 25) float area &#160; = ta.sma(high-low, 100) // Two-pole smooth filter function f_two_pole_filter(source, length) => &#160; &#160; var float smooth1 = na &#160; &#160; var float smooth2 = na &#160; &#160; alpha = 2.0 / (length + 1) &#160; &#160; if na(smooth1) &#160; &#160; &#160; &#160; smooth1 := source &#160; &#160; else &#160; &#160; &#160; &#160; smooth1 := (1 - alpha) * smooth1 + alpha * source &#160; &#160; if na(smooth2) &#160; &#160; &#160; &#160; smooth2 := smooth1 &#160; &#160; else &#160; &#160; &#160; &#160; smooth2 := (1 - alpha) * smooth2 + alpha * smooth1 // Osc two_p = f_two_pole_filter(sma_n1, length) two_pp = two_p[4] // Colors color buy_col1 &#160;= color.from_gradient(two_p, -1, 0.5, up_color, na) color buy_col2 &#160;= color.from_gradient(two_p, -1, 0.5, color.new(up_color, 50), na) color sell_col1 = color.from_gradient(two_p, -0.5, 1, na, dn_color) color sell_col2 = color.from_gradient(two_p, -0.5, 1, na, color.new(dn_color, 50)) color color &#160; &#160; = two_p > two_pp &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; ? color.from_gradient(two_p, -1,1, up_color, color.new(up_color, 0)) &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; : color.from_gradient(two_p, -1,1,color.new(dn_color, 0), dn_color) // Signals bool buy &#160;= ta.crossover(two_p, two_pp) and two_p < 0 and barstate.isconfirmed bool sell = ta.crossunder(two_p, two_pp) and two_p > 0 and barstate.isconfirmed // } //――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{ if buy //and two_p < -0.5 &#160; &#160; sell_line := line(na) &#160; &#160; if disp_lvl &#160; &#160; &#160; &#160; buy_line := line.new( &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;bar_index-1 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;, low[1] - area &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;, bar_index &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;, low[1] - area &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;, force_overlay = true &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;, color = buy_col1 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;, style = line.style_dashed &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;) &#160; &#160; label.new(bar_index-1, low[1] - area &#160; &#160; &#160; &#160; &#160; &#160; &#160;, color = buy_col1, style = label.style_label_up, force_overlay = true, size = size.tiny) if ta.crossunder(low, buy_line.get_y1()) and barstate.isconfirmed &#160; &#160; label.new( &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;bar_index-1 &#160; &#160; &#160; &#160; &#160; &#160; &#160;, buy_line.get_y1() &#160; &#160; &#160; &#160; &#160; &#160; &#160;, color = color.new(up_color, 100) &#160; &#160; &#160; &#160; &#160; &#160; &#160;, style = label.style_label_center &#160; &#160; &#160; &#160; &#160; &#160; &#160;, force_overlay = true &#160; &#160; &#160; &#160; &#160; &#160; &#160;, size = size.large &#160; &#160; &#160; &#160; &#160; &#160; &#160;, text = "&#10006;" &#160; &#160; &#160; &#160; &#160; &#160; &#160;, textcolor = up_color &#160; &#160; &#160; &#160; &#160; &#160; &#160;) &#160; &#160; buy_line := line(na) if sell //and two_p > 0.5 &#160; &#160; buy_line := line(na) &#160; &#160; if disp_lvl &#160; &#160; &#160; &#160; sell_line := line.new( &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;bar_index-1 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;, high[1] + area &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;, bar_index &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;, high[1] + area &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;, force_overlay = true &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;, color = sell_col1 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;, style = line.style_dashed &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;) &#160; &#160; label.new(bar_index-1, high[1] + area &#160; &#160; &#160; &#160; &#160; &#160; &#160;, color = sell_col1, style = label.style_label_down, force_overlay = true, size = size.tiny) if ta.crossover(high, sell_line.get_y1()) and barstate.isconfirmed &#160; &#160; label.new( &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;bar_index-1 &#160; &#160; &#160; &#160; &#160; &#160; &#160;, sell_line.get_y1() &#160; &#160; &#160; &#160; &#160; &#160; &#160;, color = color.new(dn_color, 100) &#160; &#160; &#160; &#160; &#160; &#160; &#160;, style = label.style_label_center &#160; &#160; &#160; &#160; &#160; &#160; &#160;, force_overlay = true &#160; &#160; &#160; &#160; &#160; &#160; &#160;, size = size.large &#160; &#160; &#160; &#160; &#160; &#160; &#160;, text = "&#10006;" &#160; &#160; &#160; &#160; &#160; &#160; &#160;, textcolor = dn_color &#160; &#160; &#160; &#160; &#160; &#160; &#160;) &#160; &#160; sell_line := line(na) switch &#160; &#160; not na(buy_line) &#160;=> buy_line. set_x2(bar_index) &#160; &#160; not na(sell_line) => sell_line.set_x2(bar_index) plotshape(buy ? two_p[1] : na, "Buy", shape.circle, location.absolute, buy_col2, -1, size = size.small) plotshape(buy ? two_p[1] : na, "Buy", shape.circle, location.absolute, buy_col1, -1, size = size.tiny) plotshape(sell ? two_p[1] : na, "Sell", shape.circle, location.absolute, sell_col2, -1, size = size.small) plotshape(sell ? two_p[1] : na, "Sell", shape.circle, location.absolute, sell_col1, -1, size = size.tiny) p11 = plot(1, color = color.new(chart.fg_color, 80)) plot(0.5, color = color.white) p00 = plot(0, color = color.new(bar_index % 2 == 0 ? chart.fg_color : na, 0)) plot(-0.5, color = color.white) p_1 = plot(-1, color = color.new(chart.fg_color, 80)) fill(p11, p00, 2, -1, color.new(chart.fg_color, 80), na) fill(p_1, p00, 1, -2, na, color.new(chart.fg_color, 80)) p1 = plot(two_p, color = color, linewidth = 1) p2 = plot(two_pp, display = display.none) fill(p1, p2, two_p, two_pp, color, na) // }
프로필 이미지
한아나
2025-02-21
399
글번호 188435
지표

한아나 님에 의해서 삭제되었습니다.

프로필 이미지
한아나
2025-02-21
0
글번호 188434
지표