커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

문의드립니다

특정조건 만족시 매수후 매수한 가격보다 1.5% 이상 상승시 매도,혹은(or) -3%하락시 매도하는 시스템 수식을 구현하고 싶습니다 특정조건은 rsi(기간14)가 30이하일시 매수로 예시 수식 부탁드립니다..
프로필 이미지
kns
2023-05-11
1292
글번호 168872
시스템
답변완료

부탁드립니다.

1번 전략 1. 금요일 22시에 매수 진입, 월요일 22시에 매수 청산 2번 전략 1. 하루에 한번만 진입 2. 진입 시간을 한국시간으로 22시부터 새벽 3시까지만 매수 진입 고맙습니다
프로필 이미지
소드노
2023-05-11
1058
글번호 168871
시스템
답변완료

수식 부탁드립니다.

수고하십니다.. 진입후부터 최고가 최저가를 구하고 싶습니다. DAYHIGH,DAYLOW 는 당일 최고,최저라 ,진입후 최고 최저를 구하고 싶습니다.
프로필 이미지
구름달
2023-05-11
1202
글번호 168867
시스템
답변완료

알림창 크기 위치

알림창 크기와 위치를 옮길수 없나요 WIn10 알림들이 그자리에 생기는 것들이 많아서.... 안보이고, 못보고, 겹치고 헷갈리네요. 안되겠죠?
프로필 이미지
와글이
2023-05-11
1321
글번호 168866
시스템
답변완료

수고많으십니다. 수식수정부탁드립니다.

수고 많으십니다. 전략실행챠트를 분할하여 하나의 챠트에는 영국파운드를 매도하고 같은 시간에 다른챠트에는 호주달러를 매수하는 시스템식을 시험적용하였습니다. 영국파운드마이크로 if Date==20230511 and Time==050000 Then { Sell("매도",AtMarket); } 호주달러마이크로 if Date==20230511 and Time==050000 Then { Buy("매수",AtMarket); } 매수도 매도도 체결되지 않았습니다. 수식수정부탁드립니다. }
프로필 이미지
멋진감자
2023-05-11
1589
글번호 168865
시스템
답변완료

문의 드립니다.

indicator("SuperBollingerTrend (Expo)","",true,max_labels_count = 500) //~~ Inputs { int prd = input.int(12,"Period",minval=1,inline="setting") float mult = input.float(2.0,"Mult",minval=0.1,step=.1,inline="setting", tooltip = "Set the Bollinger Band period. ₩n₩nSet the multiplier.") bool showZigZag = input.bool(true,"ZigZag",inline="zigzag") string signal = input.string("Signal","",["Signal","Peak Distance"],inline="zigzag") string dev = input.string("ZigZag","",["ZigZag","High/Low","Close"],inline="zigzag", tooltip = "Enable the ZigZag Bollinger Signals. ₩n₩nSele;ct if you only want to display the signals or the Peak Signal Distance between each signal. ₩n₩nThe Signal Distance can be calculated using the ZigZag, High/Low, or Close.") bool showTable = input.bool(false,"Average/Median Distance",inline="", tooltip = "Enable the Table that displays the Average or Median ZigZag move.") bool showTP = input.bool(false,"Take Profit",inline="tp") string Tp = input.string("Median","",["Median","Average"],inline="tp", tooltip = "Enable the Take-Profit line. ₩n₩nSele;ct if the TP should be based on the Average or Median move.") //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~} //~~ Types & Variables { //Types type ZigZag int [] x1 float [] y1 float [] diff type SuperBollingerTrend float s color c type Alerts bool Long = false bool Short = false bool LongTp = false bool ShortTp = false var zz = ZigZag.new(array.new<int>(),array.new<float>(),array.new<float>()) var sbt = SuperBollingerTrend.new(0.0,na) alerted = Alerts.new() //Variables int b = bar_index float bbup = ta.sma(high,prd)+ta.stdev(high,prd)*mult float bbdn = ta.sma(low,prd)-ta.stdev(low,prd)*mult //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~} //~~ Methods{ //ZigZag method zigzag(ZigZag z,c,p,l)=> y2 = dev=="ZigZag"?sbt.s: dev=="High/Low"?p: close if z.x1.size()>0 x1 = z.x1.get(0) y1 = z.y1.get(0) z.diff.unshift(math.abs(y2-y1)) line.new(x1,y1,b,y2,color=color.new(color.gray,0),style=line.style_dashed) style = signal=="Signal"?(l?label.style_triangleup:label.style_triangledown) : (l?label.style_label_up:label.style_label_down) txt = signal=="Signal"?na : str.tostring(y2-y1,format.mintick)+"p" label.new(b,sbt.s,txt,color=c,size=size.small,style=style,textcolor=chart.bg_color) z.x1.unshift(b) z.y1.unshift(y2) //SuperBollingerTrend Calculation method SBT(SuperBollingerTrend s,cond,val,col,p,l)=> s.s := na(bbdn) or na(bbup)?0.0 : close>sbt.s?math.max(sbt.s,bbdn) : close<sbt.s?math.min(sbt.s,bbup) : 0.0 if cond s.s := val s.c := col if showZigZag zz.zigzag(col,p,l) alerted.Long := l?true:false alerted.Short := l?false:true //Run Methods sbt.SBT(ta.crossover(close,sbt.s),bbdn,color.lime,low,true) sbt.SBT(ta.crossunder(close,sbt.s),bbup,color.red,high,false) //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~} //~~ Plot & Table { //Plot plot(sbt.s,"SuperBollingerTrend",sbt.c) //TP Line var tp = line.new(na,na,na,na,color=color.lime) var ltp = label.new(na,na,"TP",color=color(na),style=label.style_label_left,textcolor=chart.fg_color,size=size.normal) dist = Tp=="Median"?zz.diff.median():zz.diff.avg() if showTP and zz.y1.size()>0 pos = close>sbt.s?true:false x = zz.x1.get(0) y = pos?zz.y1.get(0)+dist:zz.y1.get(0)-dist tp.set_xy1(x,y) tp.set_xy2(b+10,y) ltp.set_xy(b+10,y) alerted.LongTp := pos?high>=y and high[1]<y:false alerted.ShortTp := pos?false:low<=y and low[1]>y //Table var table tbl = na if barstate.islast and showZigZag and showTable tbl := table.new(position.top_right, 1, 1, chart.bg_color, frame_color=color.new(color.gray,50), frame_width=3, border_width=1) tbl.cell(0,0,Tp=="Median"?"Median ZigZag Distance: "+str.tostring(dist,format.mintick)+"p":"Avg ZigZag Distance: "+str.tostring(dist,format.mintick)+"p",text_color=chart.fg_color) //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~} //~~ Alerts { alertcondition(alerted.Long,"Long Alert","Long Signal") alertcondition(alerted.Short,"Short Alert","Short Signal") alertcondition(alerted.LongTp,"Long TP Alert","Long TP") alertcondition(alerted.ShortTp,"Short TP Alert","Short TP") //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~} 트레이딩뷰 지표입니다. 예스로 전환이 될까요? 된다면 라인선만 예스로 바꿔주세요. nSele;ct에서 ; 빼야 됩니다.
프로필 이미지
신대륙발견
2023-05-11
1465
글번호 168864
지표
답변완료

수식 작성 부탁드립니다

마찬가지로 트뷰입니다. 예스랭귀지도 dmi는 내장되어 있지만 변형해서 쓰다보니 따로 개인함수가 필요합니다. 미리 감사드립니다. 작성해주신 것 보면서 많이 배우고 있습니다 STR_dmi_len = input.int(defval=29, title="DMI Length") STR_adx_len = input.int(defval=18, title="ADX period") F_STR(dmi_len, adx_len)=> up = ta.change(high) down = -ta.change(low) truerange = ta.rma(ta.tr, dmi_len) plus = fixnan(100 * ta.rma(up > down and up > 0 ? up : 0, dmi_len) / truerange) minus = fixnan(100 * ta.rma(down > up and down > 0 ? down : 0, dmi_len) / truerange) sum = plus + minus adx = 100 * ta.rma(math.abs(plus - minus) / (sum == 0 ? 1 : sum), adx_len) strength = (adx-1)*12 [strength, adx, plus, minus] [Strength, STR_adx, STR_plus, STR_minus] = F_STR(STR_dmi_len, STR_adx_len)
프로필 이미지
sdw0920
2023-05-10
1201
글번호 168863
지표
답변완료

문의 드립니다.~~~~

수고하십니다. 아래식으로 cme종목과 항생지수를 거래할 때 정해진 시간대에서만 진입하도록 하려면 어떻게 해야 하나요? (예를들어 10시~13시 그리고 23시~1시에만 진입허용) input : N(9),N1(30); var : ET(0); if ET > 0 and sDate != sDate[1] Then SetStopEndofday(ET); if Bdate != Bdate[1] Then { SetStopEndofday(0); if stime >= 80000 Then ET = 060000; else ET = 050000; } if Bdate == Bdate[n-1] and CountIf(C>O,3) == 3 and c >= L[N-1]+PriceScale*n1 //and c >= DayHigh Then Buy(); if Bdate == Bdate[n-1] and CountIf(C<O,3) == 3 and c[n-1] >= L+PriceScale*n1 //and DayLow >= c Then Sell();
프로필 이미지
예스요
2023-05-10
1331
글번호 168862
시스템
답변완료

부탁드립니다.

안녕하세요. 이평선을 일목균형표와 같이사용 하고자합니다. 변경부탁드립니다 수식1:BBandsup(20,2) 수식2:BBandsdown(20,2) 수식3:Eavg(C,40) 수식4:Eavg(C,15) 수식5:Eavg(C,50) 역방향 수식1:BBandsup(20,2) 수식2:BBandsdown(20,2) 수식3:Eavg(C,15) 수식4:Eavg(C,40) 수식5:Eavg(C,50) 수식4.수식5는 사이애 색상을(일목균형표)와 같이 사용하고싶습니다.
프로필 이미지
렉스턴
2023-05-10
1518
글번호 168861
지표
답변완료

문의드립니다.

안녕하세요. 수고하심에 언제나 감사드립니다. 매수 조건: 무포지션에서 60일 이동평균선가격A 를 기준으로 60일 이동평균선가격A 상방에서 음봉이 하나 발생하고 첫 양봉이 생기고 둘째 양봉이 생기면 즉 음봉후 양봉이 연속으로 2개 생길 때 1 상승 대양봉 이라 합니다. 이 때 1 상승 대양봉 시가 = 첫 양봉의 시가 1 상승 대양봉 중간 시가 = 둘째 양봉 시가 1 상승 대양봉 종가 = 둘째 양봉의 종가 정의합니다. 그 후에 다시 음봉이 생기고 첫 양봉이 생기고 둘째 양봉이 생기면 즉 음봉후 양봉이 연속으로 2개 생길 때 2 상승 대양봉 이라 합니다. 이 때 2 상승 대양봉 시가 = 첫 양봉의 시가 2 상승 대양봉 중간 시가 = 둘째 양봉 시가 2 상승 대양봉 종가 = 둘째 양봉의 종가 정의합니다. 조건: 음봉의 종가 또는 양봉의 시가 중 어느 하나라도 60일 이동평균선가격A 를 하방으로 깨면 상승 대양봉들의 조건은 모두 취소가 되어서 처음부터 다시 시작햐여 합니다. 매수: 조건들을 만족하고 1상승 대양봉 시가 < 2 상승 대양봉 시가 이면 매수합니다. 청산::::: 손절청산: 매수후에 손절가격 = 2 상승 대양봉 시가(첫 양봉의 시가)를 손절가격으로 정하고 종가가 아닌 현재가가 하방으로 깨면 손절합니다. 매수후에 매수가격< 양봉이 하나 생기면 손절가격 = 2 상승 대양봉 중간 시가( 둘째 양봉 시가) 를 손절가격으로 정하고 종가가 아닌 현재가가 하방으로 깨면 손절합니다. 본절 청산: 매수후에 매수후 매수가격< 첫 양봉 종가 < 양봉 종가를 만족하는 양봉이 2개가 생기면 본절가격 = 매수가격 이라 정의 하고 현재가가 본절가격에 오면 본절 청산합니다. 이익청산: 매수후에 이익이 나면 처음 음봉종가 > 둘재 음봉 종가 > 3번째 음봉 연속으로 3개가 음봉이 나면 이익 청산합니다. 매도: 반대논리로 매도 수식도 부탁드립니다.
프로필 이미지
종호
2023-05-10
2058
글번호 168857
시스템