커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

수식수정요청

수고 많습니다 이베스트때 가입 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
353
글번호 188435
지표

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

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

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

프로필 이미지
한아나
2025-02-21
0
글번호 188433
지표
답변완료

수식 변환 부탁드립니다.

안녕하세요 아침저녁으로 일교차가 크네요. 감기 조심하시구요. 예스랭귀지 수식으로 변환 부탁드립니다. A=LinearRegressionvalue(C,20,0) + LinearRegressionSlope(C,20); B=ma(C,5); A(2)>=A(1) && A(1)<A 즐거운 주말 보내세요~
프로필 이미지
스톰82
2025-02-21
316
글번호 188431
종목검색
답변완료

수식

다음의 사용자함수 변환을 부탁드립니다 감사합니다 제목 : 이평상승(n) if(n>n(1),1,0)
프로필 이미지
김승빈
2025-02-21
300
글번호 188414
사용자 함수
답변완료

검색식

검색식 부탁합니다 n일전 거래금액 높은 순으로 정렬
프로필 이미지
jsi
2025-02-21
310
글번호 188407
검색
답변완료

호가잔량

안녕하세요 선물 시가 호가잔량+1000이상이면매수진입 잔량 0 이되면청산 다시+.-1000이면그방향대로진입계속반복되는수식부탁합니다
프로필 이미지
질갱이
2025-02-21
327
글번호 188406
시스템
답변완료

시그널메이커 소스 변환 부탁드립니다.

시그널메이커 소스인데 변환 부탁드립니다. Params : Profit_Target( 200 ), // 익절 ( 단위 : 틱 ) Stop_Loss( 200 ); // 손절 ( 단위 : 틱 ) Var : Ma_80(0), Ma_50(0), TickSize( 0 ); Ma_80 = Ma(C , 80) ; Ma_50 = Ma(C , 50) ; TickSize = OneTick * PriceScale; // 호가 단위 If CrossUp( C , Ma_80 ) Then v11 = O ; If CrossDown( C , Ma_50 ) Then v22 = O ; If CrossUp( C , v11 + 100 * Ticksize ) Then Buy("B" , DEF , DEF , 2); If CrossDown( C , v22 - 100 * Ticksize ) Then Sell("S" , DEF , DEF , 2); If CurrentContracts <> 0 Then Begin SetStopProfitTarget( Profit_Target * TickSize * CurrentContracts ); End Else SetStopProfitTarget(0); If CurrentContracts <> 0 Then Begin SetStopLoss( Stop_Loss * TickSize * CurrentContracts ); End Else SetStopProfitTarget(0);
프로필 이미지
codeblue
2025-02-21
313
글번호 188405
시스템

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

프로필 이미지
trust
2025-02-21
37
글번호 188404
종목검색

심홍 님에 의해서 삭제되었습니다.

프로필 이미지
심홍
2025-02-21
313
글번호 188402
검색