커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

틱차트에 일봉 이평선

틱차트에서 일봉 가중이평선과 지수이평선 위에있을때는 매수로만, 밑에있을때는 매도로만 대응하고싶은데 시스템에서 어떻게 표현해야할지 알려주세요
프로필 이미지
swhinc
2020-06-08
1707
글번호 139596
시스템
답변완료

당일 첫봉에서 진입이 안됩니다, 그리고 계좌예수금에 따라 베팅사이즈를 조절

안녕하세요 ^^ 1) 아래와 같은 수식을 사용할 경우 당일 첫봉에서 매수/매도 진입이 전혀 되지 않습니다. 어떻게 해야될까요? 2) 계좌 예수금에 따라 베팅사이즈를 조절하려면 아래와 같이 수식을 적으면 될까요? (모의투자) input : n(3),risk(1.5%),rt(0.17),MUL(50000); var : noise(0),sum(0),cnt(0), RANGE(0),LTR(0),STR(0), L1(0),L2(0),L3(0),S1(0), S2(0),S3(0), NL1(0), NL2(0),NL3(0), NS1(0), NS2(0), NS3(0), VL(0),Lunit(0),LUNIT1(0),LUNIT2(0),SUNIT(0), SUNIT1(0), SUNIT2(0), Accoundnum(""),value(0); accoundnum = GetAccount(0); value = GetUnclearedDeposits(accoundnum); VL = value / (dayclose(1) * MUL * rt); LUNIT = INT((value * RISK) / (LTR * MUL)); SUNIT = INT((value * RISK) / (STR * MUL)); # ENTRY L1 = DAYOPEN + LTR ; L2 = L1 + (LTR * 0.5); L3 = L1 + LTR; S1 = DAYOPEN - STR; S2 = S1 - (STR * 0.5); S3 = S1 - STR; NL1 = LatestExitPrice(1)+LTR; NL2 = NL1 + LTR * 0.5; NL3 = NL1 + LTR; NS1 = LatestExitPrice(1)-STR; NS2 = NS1 - STR * 0.5; NS3 = NS1 - Str; IF MarketPosition == 0 AND BDATE != EXITDATE(1) Then { IF H <= L1 AND NEXTBARSDATE == SDATE Then BUY("L1",ATSTOP,L1,LUNIT1); IF L >= S1 AND NextBarSdate == SDATE THEN SELL("S1",ATSTOP,S1,SUNIT1); } # 매수 피라미딩 IF MarketPosition == 1 AND STIME <153000 and IsEntryName("L1")==True THEN { if highest(h,BarsSinceEntry) <= L2 Then buy("L2",ATSTOP,L2,LUNIT2); if highest(h,BarsSinceEntry) <= L1 + LTR Then buy("L3",ATSTOP, L3,LUNIT2); } # 매수청산 IF MarketPosition == 1 then { if NextBarSdate == SDATE Then ExitLong("LS",AtStop,LatestEntryPrice - LTR); IF NextBarSdate != SDATE Then ExitLong("EL",ATMARKET); } # 매도 피라미딩 IF MarketPosition == -1 AND STIME < 153000 AND IsEntryName("S1") == True THEN { IF Lowest(L,BarsSinceEntry) >= S2 Then SELL("S2",AtStop,S2,SUNIT2); IF Lowest(L,BarsSinceEntry) >= S1 - STR Then SELL("S3",AtStop,S3,SUNIT2); } # 매도청산 IF MarketPosition == -1 then { IF NextBarSdate == SDATE Then EXITSHORT("SS",AtStop,LatestEntryPrice + STR); SetStopEndofday(1545); } ELSE SetStopEndofday(0); #해제 # 재진입 IF MarketPosition == 0 AND BDATE == EXITDATE(1) Then { IF MarketPosition(1) == 1 AND H <= NL1 AND NextBarSdate == sDate AND IsExitName("LS",1) == TRUE THEN BUY("NL1",ATSTOP,NL1,LUNIT1); IF MarketPosition(1) == -1 AND L >= NS1 AND NextBarSdate == SDATE THEN SELL("NS1",ATSTOP,NS1,SUNIT1); } IF BDATE == EXITDATE(1) AND MarketPosition == 1 AND IsEntryName("NL1") == TRUE THEN { IF LatestEntryName == "NL1" AND Highest(H,BarsSinceEntry) <= NL2 THEN BUY("NL2",ATSTOP,NL2,LUNIT2); IF LatestEntryName == "NL2" AND HIGHEST(H,BarsSinceEntry) <= NL3 THEN BUY("NL3",ATSTOP,NL3,LUNIT2); } IF BDATE == ExitDate(1) AND MarketPosition == -1 AND IsEntryName("NS1") == TRUE Then { IF LatestEntryName == "NS1" AND Lowest(L,BarsSinceEntry) >= NS2 THEN SELL("NS2",ATSTOP,NS2,SUNIT2); IF LatestEntryName == "NS2" AND Lowest(L,BarsSinceEntry) >= NS3 THEN SELL("NS3",ATSTOP,NS2,SUNIT2); }
프로필 이미지
엠씨용가
2020-06-07
1787
글번호 139595
시스템
답변완료

시스템식 부탁드립니다.

항상 도움 주셔서 감사합니다. 아래 조건에 맞는 시스템식 부탁드립니다. 종목 : 해선 타임 : 30분 RSI지표 : 14 매수진입식 1. RSI값이 RSI-30을 상향 돌파시 1번째 1계약 매수 2. 1번째 진입가격보다 가격이 30틱 아래로 떨어 졌을 경우 2계약 추가 매수 3. 1번째 2번째 평균 진입가격보다 가격이 30틱 아래로 떨어 졌을 경우 3계약 추가 매수 4. 1번째 2번째 3번째 평균 진입가격보다 가격이 30틱 아래로 떨어 졌을 경우 4계약 추가 매수 5. 1번째 2번째 3번째 4번째 평균 진입가격보다 가격이 30틱 아래로 떨어 졌을 경우 5계약 추가 매수 매수청산 1. 1계약(한번만)만 진입시에는 RSI값이 RSI-50 상향돌파시 매수청산 2. 2계약 이상(두번이상) 진입시에는 평균매수 단가보다 10틱 위로 상승시 모두 매수 청산 매도진입식 1. RSI값이 RSI-70을 하향 돌파시 1번째 1계약 매도 2. 1번째 진입가격보다 가격이 30틱 위로 올라갔을 경우 2계약 추가 매도 3. 1번째 2번째 평균 진입가격보다 가격이 30틱 위로 올라갔을 경우 3계약 추가 매도 4. 1번째 2번째 3번째 평균 진입가격보다 가격이 30틱 위로 올라갔을 경우 4계약 추가 매도 5. 1번째 2번째 3번째 4번째 평균 진입가격보다 가격이 30틱 위로 올라갔을 경우 5계약 추가 매도청산 - 매도청산 방법은 다릅니다. 1. 1계약(한번만)만 진입시에는 RSI값이 RSI-50 하향돌파시 매도청산 2. 2계약 이상(두번이상) 진입시에는 평균매도 단가보다 10틱씩 아래로 하락할때마다 1계약씩 매도 청산 - 1번 진입시 평균진입가격보다 10틱 하락시 1계약 매도 - 2번 진입시 평균진입가격보다 20틱 하락시 2계약 매도 - 3번 진입시 평균진입가격보다 30틱 하락시 3계약 매도 - 4번 진입시 평균진입가격보다 40틱 하락시 4계약 매도 - 5번 진입시 평균진입가격보다 50틱 하락시 5계약 매도 감사합니다.
프로필 이미지
양치기
2020-06-06
1931
글번호 139593
시스템
답변완료

문의드립니다.

수고많으십니다. 항셍은 하루 3번 시작하다보니 하루 기준이 달라서 차트상 갭보정이 먹히지 않습니다. 저는 새벽 항셍 종가와 오전10시 15분 시가가 갭없는 상태로 파라볼릭 매매식을 만들고 싶습니다. 잘 부탁드립니다.
프로필 이미지
카르마다
2020-06-06
1980
글번호 139592
시스템
답변완료

수식 작성좀 부탁드립니다.

틱 차트를 사용하고 있는데요. 최근 30분 이내 고점과 저점이 20틱 이내인 경우를 어떻게 표현해야 하는지요?
프로필 이미지
천왕봉
2020-06-06
2007
글번호 139591
시스템
답변완료

문의드립니다.

예스수식으로 부탁드립니다. rsiSource = input(title="RSI Source", type=input.source, defval=close) rsiLength = input(title="RSI Length", type=input.integer, defval=12) rsiOverbought = input(title="RSI Overbought", type=input.integer, defval=70, minval=50, maxval=100) rsiOvesold = input(title="RSI Oversold", type=input.integer, defval=30, minval=1, maxval=50) // RSI value based on inbuilt RSI rsiValue = rsi(rsiSource, rsiLength) // Get the current state isOverbought = rsiValue >= rsiOverbought isOversold = rsiValue <= rsiOvesold // State of the last extreme 0 for initialization, 1 = overbought, 2 = oversold var laststate = 0 // Highest and Lowest prices since the last state change var hh = low var ll = high // Labels var label labelll = na var label labelhh = na // Swing lines var line line_up = na var line line_down = na // We go from overbought straight to oversold NEW DRAWINGS CREATED HERE if(laststate == 1 and isOversold) ll := low labelll := label.new(bar_index, low, style=label.style_label_up, color=color.green, size=size.tiny) labelhh_low = label.get_x(labelhh) labelhh_pos = label.get_y(labelhh) line_down := line.new(bar_index, high, labelhh_low, labelhh_pos, width=2) // We go from oversold straight to overbought NEW DRAWINGS CREATED HERE if(laststate == 2 and isOverbought) hh := high labelhh := label.new(bar_index, high, style=label.style_label_down, color=color.red, size=size.tiny) labelll_low = label.get_x(labelll) labelll_pos = label.get_y(labelll) line_up := line.new(bar_index, high, labelll_low, labelll_pos, width=2) // If we are overbought if(isOverbought) if(high >= hh) hh := high label.set_x(labelhh, bar_index) label.set_y(labelhh, high) line.set_x1(line_up, bar_index) line.set_y1(line_up, high) laststate := 1 // If we are oversold if(isOversold) if(low <= ll) ll := low label.set_x(labelll, bar_index) label.set_y(labelll, low) line.set_x1(line_down, bar_index) line.set_y1(line_down, low) laststate := 2 // If last state was overbought and we are overbought if(laststate == 1 and isOverbought) if(hh <= high) hh := high label.set_x(labelhh, bar_index) label.set_y(labelhh, high) line.set_x1(line_up, bar_index) line.set_y1(line_up, high) //If we are oversold and the last state was oversold, move the drawings to the lowest price if(laststate == 2 and isOversold) if(low <= ll) ll := low label.set_x(labelll, bar_index) label.set_y(labelll, low) line.set_x1(line_down, bar_index) line.set_y1(line_down, low) // If last state was overbought if(laststate == 1) if(hh <= high) hh := high label.set_x(labelhh, bar_index) label.set_y(labelhh, high) line.set_x1(line_up, bar_index) line.set_y1(line_up, high) // If last stare was oversold if(laststate == 2) if(ll >= low) ll := low label.set_x(labelll, bar_index) label.set_y(labelll, low) line.set_x1(line_down, bar_index) line.set_y1(line_down, low)
프로필 이미지
as8282
2020-06-06
2027
글번호 139590
지표
답변완료

부탁 드립니다.

도움주심에 항상 감사 드립니다. 1) 아래 수식1,2)를 타주기 일봉용으로 작성해주신 수식3)입니다. 이것을 질문1) 타주기(주봉용), 질문2) 타주기(월봉용),으로 스스로 작성된것이 정상작동이 되지 않는것으로 보입니다. 검토 부탁 드립니다. 특히 변수 P값을 변경하여도 변화가 없습니다. 미리 감사 드립니다. 수식1) Input : P(20),sig(5); var1=(highest(c,p)-L)/(highest(c,p))*100; var2=ma(var1,sig); 수식2) Input : P(20),sig(5); var1=(lowest(c,p)-H)/(lowest(c,p))*100; var2=ma(var1,sig); 수식3) 타주기(일봉용)_정상 작동됨 input : P(20),sig(5); var : sum1(0),sum2(0),hc(0),lc(0),i1(0),i2(0); if DayHigh(P+sig-1) > 0 and DayLow(P+sig-1) > 0 then { sum1 = 0; sum2 = 0; for i1 = 0 to sig-1 { hc = 0; lc = 0; for i2 = i1+0 to i1+P-1 { if hc == 0 or (hc > 0 and DayClose(i2) > hc) Then hc = DayClose(i2); if lc == 0 or (lc > 0 and DayClose(i2) < lc) Then lc = DayClose(i2); } sum1 = sum1 + (hc-DayLow(i1))/hc*100; sum2 = sum2 + (lc-dayhigh(i1))/lc*100; if i1 == 0 Then { var1 = (hc-daylow(i1))/hc*100; value1 = (lc-DayHigh(i1))/lc*100; } } var2 = sum1/sig; value2 = sum2/sig; plot1(var1); plot2(var2); plot3(value1); plot4(value2); } 질문1) 타주기(주봉용)_검토 필요 input : P(20),sig(5); var : sum1(0),sum2(0),hc(0),lc(0),i1(0),i2(0); if weekHigh(P+sig-1) > 0 and weekLow(P+sig-1) > 0 then { sum1 = 0; sum2 = 0; for i1 = 0 to sig-1 { hc = 0; lc = 0; for i2 = i1+0 to i1+P-1 { if hc == 0 or (hc > 0 and weekClose(i2) > hc) Then hc = weekClose(i2); if lc == 0 or (lc > 0 and weekClose(i2) < lc) Then lc = weekClose(i2); } sum1 = sum1 + (hc-weekLow(i1))/hc*100; sum2 = sum2 + (lc-weekhigh(i1))/lc*100; if i1 == 0 Then { var1 = (hc-weeklow(i1))/hc*100; value1 = (lc-weekHigh(i1))/lc*100; } } var2 = sum1/sig; value2 = sum2/sig; plot1(var1); plot2(var2); plot3(value1); plot4(value2); } 질문2) 타주기(월봉용)_검토 필요 input : P(20),sig(5); var : sum1(0),sum2(0),hc(0),lc(0),i1(0),i2(0); if MONTHHigh(P+sig-1) > 0 and MONTHLow(P+sig-1) > 0 then { sum1 = 0; sum2 = 0; for i1 = 0 to sig-1 { hc = 0; lc = 0; for i2 = i1+0 to i1+P-1 { if hc == 0 or (hc > 0 and MONTHClose(i2) > hc) Then hc = MONTHClose(i2); if lc == 0 or (lc > 0 and MONTHClose(i2) < lc) Then lc = MONTHClose(i2); } sum1 = sum1 + (hc-MONTHLow(i1))/hc*100; sum2 = sum2 + (lc-MONTHhigh(i1))/lc*100; if i1 == 0 Then { var1 = (hc-MONTHlow(i1))/hc*100; value1 = (lc-MONTHHigh(i1))/lc*100; } } var2 = sum1/sig; value2 = sum2/sig; plot1(var1); plot2(var2); plot3(value1); plot4(value2); }
프로필 이미지
뮬리
2020-06-08
2088
글번호 139589
지표

관리자에 의해 프로그램 사용법 QnA로 이동되었습니다

프로필 이미지
hiphepho
2020-06-05
6
글번호 139588
시스템
답변완료

수식 수정 부탁드립니다.

안녕하세요. 아래 수식 수정좀 부탁드립니다. 아래 수식에서 12봉동안 양봉(양도지포함)이 8개 이상 부분을 12봉 동안 양봉(양도지포함)과 종가가 전봉보다 상승한 음봉도 포함해서로 수정부탁드립니다. var1 = ma(C,5); var2 = AccumN(m,12); if countif(C>O,12) >= 8 and countif(C>var1,12) == 12 and var2 >= 500000000 Then find(1);
프로필 이미지
강태공3
2020-06-05
1849
글번호 139587
검색
답변완료

부탁좀드립니다~~

아무리 검색하고 알아봐도 알아내지 못해서 글 남깁니다. 답변 부탁드릴게요 1. 예를 들어 1봉전 대량거래량이 발생하여 "얼마만에" 최고거래량을 달성했다고 했을경우 1봉전 거래량이 :얼마만에" 최고거래량인지 아는 수식좀요 2. 거래량이 아닌 가격도요 즉 얼마만에 최고가인지... 3. 1봉전 봉이 몇시 몇분이 완성된 봉인지 시간을 나타내주는 수식도 부탁합니다 무더위 조심하시고 답변 꼭좀 달아주세요 ㅍ.ㅍ
프로필 이미지
말라
2020-06-07
1790
글번호 139579
지표