커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

청산수식 청산횟수 / 음봉비율 수정

질문1) input : exst(120000),exlock(140000),xdive(2.0); if stime>=exst and stime<exlock and c<Highd(0)-xdive Then ExitLong(); 하루 1회만 거래하는 수식에서 청산수식으로 사용한 내용입니다. 하루에 여러번 거래하는 수식에 사용하기 위해선 청산횟수를 제어하는 수식이 필요합니다. input : 청산횟수(1),exst(120000),exlock(140000),xdive(2.0); 이런식으로 제어할 수 있게 수정바랍니다. 질문2) 답변 수식 시뮬레이션 해보니 시간을 경과하지 않고 첫봉에 진입하는 경우가 많이 발생하고 있습니다.(첨부파일) 변수선언 var:t(0); 은 추가했습니다. 살펴주세요. ************************************************************************************ 안녕하세요 예스스탁입니다. input:시간1(093000); input:시간2(100000); if (sdate != sdate[1] and stime >= 시간1) or (sdate == sdate[1] and stime >= 시간1 and stime[1] < 시간1) Then { t = 1; var1 = 0; Var2 = 0; } if (sdate != sdate[1] and stime >= 시간2) or (sdate == sdate[1] and stime >= 시간2 and stime[1] < 시간2) Then { t = 2; } if t == 1 Then { var1 = var1+1; if c < o Then Var2 = Var2+1; } if t >= 2 Then { if Var2/var1*100 > 50 then sell(); } 풍성한 한가위 되시길 바랍니다. > 목마와숙녀 님이 쓴 글입니다. > 제목 : 문의 > 입력시간부터 발생한 봉들로만 계산 input:시간1(093000); input:시간2(100000); 음봉비율은 시간1에서 시간2까지 발생한 전체봉에서 음봉비율(음봉/전체봉*100) 진입은 시간2 지나고부터 시작합니다. if 음봉비율>50 then sell(); 수식 부탁드립니다. 항상 고맙습니다.
프로필 이미지
목마와숙녀
2024-11-06
593
글번호 183469
시스템
답변완료

수식 문의 드립니다

(1) 식, Input : Period(20) ; var : DMIv(0),DP(0),DM(0); DMIv = DMI(Period); DP = DIPlus(Period); DM = DIMinus(Period); data2 를 이용하여 data2(DMIv 가 상승중 DP 가 DM을 상향시) 매수 data2 를 이용하여 data2(DP 가 DM을 하향시) 매도 (2) 식 rsi(9), STOCHASTIC(12,5,5)를 이용한 data2 식 부탁 드립니다. DATA2(STOCHASTIC(12,5,5)) 가 상승 중이고, data2(RSI(9)) 가 50 상향시 매수 data2(rsi(9)) 가 70 상향시 매도 (3)식 trix(10,7) , macd(12,26,9) 이용한 data2 식 data2( trix) 와 data2(madc) 가 상승 중 일 때 매수 data2(macd)가 dead cross에서 매도
프로필 이미지
기관장
2024-09-15
693
글번호 183468
시스템
답변완료

문의드립니다

특정일의 고가, 저가, 종가를 분봉에 표시하고 싶습니다 특정일이후의 고/저/종가가 아니라... 특정일 히루의 dayhigh, daylow, dayclose 를 분봉에 가로선으로 나오게 표시.. 감사합니다
프로필 이미지
러블리
2024-09-18
668
글번호 183467
지표

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

프로필 이미지
와우리
2024-09-15
39
글번호 183466
지표
답변완료

문의 드립니다

안녕하세요 다음 트레이딩뷰 의 코딩을 예스로 전환 부탁드립니다 study("TDI - Traders Dynamic Index [Goldminds]", shorttitle="TDIGM") rsiPeriod = input(21, minval = 1, title = "RSI Period") bandLength = input(34, minval = 1, title = "Band Length") lengthrsipl = input(7, minval = 0, title = "Fast MA on RSI") lengthtradesl = input(2, minval = 1, title = "Slow MA on RSI") src = close // Source of Calculations (Close of Bar) r = rsi(src, rsiPeriod) // RSI of Close ma = sma(r, bandLength) // Moving Average of RSI [current] offs = (1.6185 * stdev(r, bandLength)) // Offset up = ma + offs // Upper Bands dn = ma - offs // Lower Bands mid = (up + dn) / 2 // Average of Upper and Lower Bands fastMA = sma(r, lengthrsipl) // Moving Average of RSI 2 bars back slowMA = sma(r, lengthtradesl) // Moving Average of RSI 7 bars back hline(20) // ExtremelyOversold hline(30) // Oversold hline(50) // Midline hline(70) // Overbought hline(80) // ExtremelyOverbought upl = plot(up, "Upper Band", color = #3286c3, linewidth = 2) // Upper Band dnl = plot(dn, "Lower Band", color = #3286c3, linewidth = 2) // Lower Band midl = plot(mid, "Middle of Bands", color = yellow, linewidth = 2) // Middle of Bands plot(slowMA, "Slow MA", color=green, linewidth=2) // Plot Slow MA plot(fastMA, "Fast MA", color=red, linewidth=1) // Plot Fast MA
프로필 이미지
만강
2024-09-15
736
글번호 183465
지표
답변완료

종목검색식 부탁드립니다.

조건검색식 부탁드립니다. 감사합니다...^^ 피봇2차저항 = (predayhigh()+predaylow()+predayclose())/3+predayhigh()-predaylow(); 봉신호 = V>=수량 && C>O*비율 && C>predayhigh() && Rsi(기간)>=70 && CrossUp(C, 피봇2차저항); 카운트 = Countsince(date!=date(1), 봉신호); 카운트 == 1 && 카운트(1) == 0 (지표변수) 수량: 50000 / 비율: 1.01 / 기간: 14
프로필 이미지
비밀통로
2024-09-15
818
글번호 183464
종목검색
답변완료

문의 드립니다

안녕하세요 adx 지표에서 adx선이 기울기가 0 이상이면 빨강, 0 이하면 파랑으로 표시 해주세요. 그리고 기준선 30,50,70을 표시해주세요
프로필 이미지
만강
2024-09-14
677
글번호 183462
지표
답변완료

부틱드립니다

수고하십니다 트레이딩 뷰 수식입니다. 예스로적용가능하도록 부탁 드립니다. //Created by ChrisMoody on 10-05-2014 //Known as SlingShot Method that keeps Traders on Trending Side of Market. study("CM_SlingShotSystem", overlay=true) sae = input(true, title="Show Aggressive Entry?, Or Use as Alert To Potential Conservative Entry?") sce = input(true, title="Show Conservative Entry?") st = input(true, title="Show Trend Arrows at Top and Bottom of Screen?") def = input(false, title="Only Choose 1 - Either Conservative Entry Arrows or 'B'-'S' Letters") pa = input(true, title="Show Conservative Entry Arrows?") sl = input(false, title="Show 'B'-'S' Letters?") //EMA Definitions emaSlow = ema(close, 62) emaFast = ema(close, 38) //Aggressive Entry or Alert To Potential Trade pullbackUpT() => emaFast > emaSlow and close < emaFast pullbackDnT() => emaFast < emaSlow and close > emaFast //Conservative Entry Code For Highlight Bars entryUpT() => emaFast > emaSlow and close[1] < emaFast and close > emaFast entryDnT() => emaFast < emaSlow and close[1] > emaFast and close < emaFast //Conservative Entry True/False Condition entryUpTrend = emaFast > emaSlow and close[1] < emaFast and close > emaFast ? 1 : 0 entryDnTrend = emaFast < emaSlow and close[1] > emaFast and close < emaFast ? 1 : 0 //Define Up and Down Trend for Trend Arrows at Top and Bottom of Screen upTrend = emaFast >= emaSlow downTrend = emaFast < emaSlow //Definition for Conseervative Entry Up and Down PlotArrows codiff = entryUpTrend == 1 ? entryUpTrend : 0 codiff2 = entryDnTrend == 1 ? entryDnTrend : 0 //Color definition for Moving Averages col = emaFast > emaSlow ? lime : emaFast < emaSlow ? red : yellow //Moving Average Plots and Fill p1 = plot(emaSlow, title="Slow MA", style=linebr, linewidth=4, color=col) p2 = plot(emaFast, title="Slow MA", style=linebr, linewidth=2, color=col) fill(p1, p2, color=silver, transp=50) //Aggressive Entry, Conservative Entry Highlight Bars barcolor(sae and pullbackUpT() ? yellow : sae and pullbackDnT() ? yellow : na) barcolor(sce and entryUpT() ? aqua : sce and entryDnT() ? aqua : na) //Trend Triangles at Top and Bottom of Screen plotshape(st and upTrend ? upTrend : na, title="Conservative Buy Entry Triangle",style=shape.triangleup, location=location.bottom, color=lime, transp=0, offset=0) plotshape(st and downTrend ? downTrend : na, title="Conservative Short Entry Triangle",style=shape.triangledown, location=location.top, color=red, transp=0, offset=0) //Plot Arrows OR Letters B and S for Buy Sell Signals plotarrow(pa and codiff ? codiff : na, title="Up Entry Arrow", colorup=lime, maxheight=30, minheight=30, transp=0) plotarrow(pa and codiff2*-1 ? codiff2*-1 : na, title="Down Entry Arrow", colordown=red, maxheight=30, minheight=30, transp=0) plotchar(sl and codiff ? low - tr : na, title="Buy Entry", offset=0, char='B', location=location.absolute, color=lime, transp=0) plotchar(sl and codiff2 ? high + tr : na, title="Short Entry", offset=0, char='S', location=location.absolute, color=red, transp=0)
프로필 이미지
파생돌이
2024-09-16
784
글번호 183461
지표

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

프로필 이미지
타요
2024-09-13
96
글번호 183460
종목검색
답변완료

시스템식 부탁드립니다.

항상 도움 주셔서 감사합니다. 아래와 같은 시스템식 부탁드립니다. 종목 : 해외선물 시간 : 10분봉 매수 조건식 : 매수 : 포지션이 없을 경우 장 시작시 첫 10분봉 종가로 매수(시장가) 추가매수 : 매수 가격 대비 20틱 상승할때마다 1계약씩 추가 매수 매수 가격 대비 20틱, 40틱, 60틱, 80틱에서 1계약씩 추가 매수(총 4회 매수) 매수 가격 대비 100틱 상승시 수익 청산 매수 이후 가격 하락시 손절 추가매수 설정 0부터 4까지 설정 가능 매수 청산1 : 매수 가격 대비 100틱 상승시 전체 포지션 청산 재매수는 다음날 장 시작시 첫 10분봉 종가로 매수(시장가) 매수 청산2 : 전체 포지션 수익이 100$ 이면 전체 포지션 청산 재매수는 다음날 장 시작시 첫 10분봉 종가로 매수(시장가) 매수 청산1, 매수청산2 둘중 하나 만족시 전체 청산 매수 익적 : 진입가격 대비 100틱 상승시 익절 매수 손절 : 진입가격 대비 100틱 하락시 손절 본청 : 추가 매수 진입이후 처음 진입가격까지 오면 본청 변수설정 : 익절, 손절, 추가매수간격, 총 진입횟수, 매수청산 틱, 전체 포지션 수익 ------------------------------------------------------------------------------- 매도 조건식 : 매도 : 포지션이 없을 경우 장 시작시 첫 10분봉 종가로 매도(시장가) 추가매도 : 매도 가격 대비 20틱 하락할때마다 1계약씩 추가 매도 매도 가격 대비 20틱, 40틱, 60틱, 80틱에서 1계약씩 추가 매도(총 4회 매도) 매도 가격 대비 100틱 하락시 수익 청산 매도 이후 가격 상승시 손절 추가매도 설정 0부터 4까지 설정 가능 매도 청산1 : 매도 가격 대비 100틱 하락시 전체 포지션 청산 재매도는 다음날 장 시작시 첫 10분봉 종가로 매도(시장가) 매도 청산2 : 전체 포지션 수익이 100$ 이면 전체 포지션 청산 재매도는 다음날 장 시작시 첫 10분봉 종가로 매도(시장가) 매도 청산1, 매도청산2 둘중 하나 만족시 전체 청산 매도 익적 : 진입가격 대비 100틱 하락시 익절 매도 손절 : 진입가격 대비 100틱 상승시 손절 본청 : 추가 매도 진입이후 처음 진입가격까지 오면 본청 변수설정 : 익절, 손절, 추가매도간격, 총 진입횟수, 매도청산 틱, 전체 포지션 수익 감사합니다.
프로필 이미지
양치기
2024-09-15
545
글번호 183459
시스템