커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

매매 정지 가능할까요?

input : StartTime(120000),EndTime(151000); var : Tcond(false,Data1); var : C2(0,Data2); input : 손절(2.4),익절(3.4); if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then Tcond = False; if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then Tcond = true; C2 = Data2(c); if Tcond == true Then { #var : C2(0,Data2); if crossup(C2,0) then buy(); if crossdown(C2,0) then sell(); } SetStopEndofday(EndTime); SetStopProfittarget(익절,PointStop); SetStoploss(손절,PointStop); ------------------- c2가 1보다 커지면 그날 포지션이 있다면 청산하고, 어쨋든 매매 정지하고 싶습니다. 가능할까요? 부탁드립니다.
프로필 이미지
캣피쉬
2021-02-26
555
글번호 146662
시스템
답변완료

문의 드립니다.

첨부파일의 상단 차트는 5,10,20 이평선을 표시한 것인데 하단 차트에 동그라미 친부분처럼 특정 기간 부터 이평선을 표시할 수 있나요?
프로필 이미지
부활
2021-02-25
652
글번호 146661
지표
답변완료

시스템 식 질문 드립니다.

안녕하세요? 시스템식 여쭤 봅니다~ 1분봉에서 매매 예정입니다. 일봉상 전일 상한가 매수는 1차매수 오늘 시초가 에 30% 2차매수는 시초가 -2% 에 30% 3차매수는 시초가 -4% 에 40% 매수가 일어나는 시간은 오전 9시부터 오후1시 사이 매도는 매수시점부터 10분후 현재남은 물량의 30% 매도 15분후 현재남은 물량의 50% 매도 20분후 현재남은 물량의 50% 매도 25분후 현재남은 물량의 50% 매도 30분후 현재남은 물량 전부 매도 매수후 5% 상승시 현재물량의 50% 매도 매수후 10% 상승시 남은 전체 매도 매수후 5% 상승했다가 2% 까지 떨어지면 전체매도 손절은! 매수후 -10% 남은 물량의 50% 매도 매수후 -15% 전체 손절 청산은! 당일 15시10분 전부 매도 이상입니다. 감사합니다~
프로필 이미지
부자청년28
2021-02-25
621
글번호 146660
시스템
답변완료

문의드립니다.

아래수식을 예스로 부탁합니다. amplitude = input(title="Amplitude", defval=2) channelDeviation = input(title="Channel Deviation", defval=2) showArrows = input(title="Show Arrows", defval=true) showChannels = input(title="Show Channels", defval=true) var int trend = 0 var int nextTrend = 0 var float maxLowPrice = nz(low[1], low) var float minHighPrice = nz(high[1], high) var float up = 0.0 var float down = 0.0 float atrHigh = 0.0 float atrLow = 0.0 float arrowUp = na float arrowDown = na atr2 = atr(100) / 2 dev = channelDeviation * atr2 highPrice = high[abs(highestbars(amplitude))] lowPrice = low[abs(lowestbars(amplitude))] highma = sma(high, amplitude) lowma = sma(low, amplitude) if nextTrend == 1 maxLowPrice := max(lowPrice, maxLowPrice) if highma < maxLowPrice and close < nz(low[1], low) trend := 1 nextTrend := 0 minHighPrice := highPrice else minHighPrice := min(highPrice, minHighPrice) if lowma > minHighPrice and close > nz(high[1], high) trend := 0 nextTrend := 1 maxLowPrice := lowPrice if trend == 0 if not na(trend[1]) and trend[1] != 0 up := na(down[1]) ? down : down[1] arrowUp := up - atr2 else up := na(up[1]) ? maxLowPrice : max(maxLowPrice, up[1]) atrHigh := up + dev atrLow := up - dev else if not na(trend[1]) and trend[1] != 1 down := na(up[1]) ? up : up[1] arrowDown := down + atr2 else down := na(down[1]) ? minHighPrice : min(minHighPrice, down[1]) atrHigh := down + dev atrLow := down - dev ht = trend == 0 ? up : down var color buyColor = color.blue var color sellColor = color.red htColor = trend == 0 ? buyColor : sellColor htPlot = plot(ht, title="HalfTrend", linewidth=2, color=htColor) atrHighPlot = plot(showChannels ? atrHigh : na, title="ATR High", style=plot.style_circles, color=sellColor) atrLowPlot = plot(showChannels ? atrLow : na, title="ATR Low", style=plot.style_circles, color=buyColor) fill(htPlot, atrHighPlot, title="ATR High Ribbon", color=sellColor) fill(htPlot, atrLowPlot, title="ATR Low Ribbon", color=buyColor) buySignal = not na(arrowUp) and (trend == 0 and trend[1] == 1) sellSignal = not na(arrowDown) and (trend == 1 and trend[1] == 0) plotshape(showArrows and buySignal ? atrLow : na, title="Arrow Up", style=shape.triangleup, location=location.absolute, size=size.tiny, color=buyColor) plotshape(showArrows and sellSignal ? atrHigh : na, title="Arrow Down", style=shape.triangledown, location=location.absolute, size=size.tiny, color=sellColor) alertcondition(buySignal, title="Alert: HalfTrend Buy", message="HalfTrend Buy") alertcondition(sellSignal, title="Alert: HalfTrend Sell", message="HalfTrend Sell")
프로필 이미지
천외일성
2021-02-25
700
글번호 146659
지표
답변완료

참조데이터

또... 감사합니다. 선물 분봉(틱)챠트에서 1. 참조데이터(프로그램 순매수금액)을 기준선 0을 기준으로 막대그래프로 나타내고자합니다. 기준선 0 위에는 붉은색, 0선아래엔 파란색 2. 참조데이터(선물외국인 순매수량)을 기준선 0을 기준으로 막대그래프로 나타내고자합니다. 기준선 0 위에는 붉은색, 0선아래엔 파란색 행복한 주말 보내세요.
프로필 이미지
포보스
2021-02-25
641
글번호 146658
지표

크라켄 님에 의해서 삭제되었습니다.

프로필 이미지
크라켄
2021-02-26
12
글번호 146656
지표

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

프로필 이미지
dunhill
2021-02-25
5
글번호 146654
지표
답변완료

N일간 N거래대금 이상인 거래일이 N회 이상인 종목

감사합니다 전일기준 N일간 N거래대금 이상인 거래일이 N회 이상인 종목 예) 전일기준 60일간 거래대금이 백억이상이었던 날이 3회 이상인 종목을 찾는 검색식을 부탁합니다
프로필 이미지
jdavid
2021-02-25
784
글번호 146649
종목검색
답변완료

감사합니다....복받으실꺼에요~~~

안녕하세요? 늘 감사합니다. 문의 드립니다. 1. 아래 수식중 진입신호에 의해 진입된후 청산식에서 다음봉이 진행중일 때 강제 청산처럼 바로 해당비율로 청산되는 식으로 변경 부탁드립니다. 지금상태는 진입후 다음봉이 완성되고, 다음 봉에서 청산됩니다. 해서 수익이 발생해도 봉이 완성되지 않아 손실로 마무리 되는 경우가 있습니다. 고맙습니다. 2. 1일 1회로 진입제한이 되어 있는데, 전략에 보여지는 봉수(300) 안에 24일날 진입청산이 되어 있으면 25일 진입을 하지 않습니다. 그렇다고 전략의 봉의 갯수를 줄이면 전일 종가가 전략에 표시되지않아 다른곳에서 진입을 합니다. 해결 방법이 없을까요? var: T1(0),ENTRY(0); if Bdate != Bdate[1]Then T1 = TotalTrades[1]; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = TotalTrades-T1+1; //////////////////////////////////////////// Input : shortPeriod(5), longPeriod(20); value1 = ma(C, shortPeriod); value2 = ma(C, longPeriod); if DayOpen >= DayClose(1) and Value1 < c Then { if entry < 1 Then Buy("매수"); Else ExitShort(); } # 매도청산 If CrossDown(c , value1) Then { if entry < 1 Then Sell("매도"); Else ExitLong(); } if MarketPosition == 1 Then { ExitLong("bx1",AtStop,EntryPrice*1.03,"",Floor(MaxContracts*0.25),1); ExitLong("bx2",AtStop,EntryPrice*1.04,"",Floor(MaxContracts*0.25),1); ExitLong("bx3",AtStop,EntryPrice*1.05,"",Floor(MaxContracts*0.25),1); ExitLong("bx4",AtStop,EntryPrice*1.06,"",Floor(MaxContracts*0.25),1); ExitLong("bx5",AtStop,EntryPrice*1.07); if Highest(H,BarsSinceEntry) >= EntryPrice*1.01 Then ExitLong("bx",AtStop,Highest(H,BarsSinceEntry)*0.96); }
프로필 이미지
하늘북
2021-02-25
951
글번호 146648
시스템
답변완료

지표 질문입니다

바닥 포함 7캔들 고가를 그린다 천정 포함 7캔들 저가를 그린다 7캔들내 음봉 고가 가운데 2번째 높은 음봉 고가를 그린다 7캔들내 천정 포함 우측으로 3번째 음봉 고가를 그린다 7캔들내 양봉 저가 가운데 2번째 낮은 양봉 저가를 그린다 7캔들내 바닥 포함 우측으로 3번째 양봉 저가를 그린다 감사합니다
프로필 이미지
유튜버
2021-02-25
813
글번호 146642
지표