커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

수식 변환 부탁드립니다.

안녕하십니까? 아래 수식을 예스에서 종목검색하고 싶습니다. max( avg(C,short), avg(C,mid), avg(C,long)) < min( avg(C,short), avg(C,mid), avg(C,long)) * (1+Percent/100) && HIGHEST(H, 4, 1) < C and O < C and ((C(1)*1.021 <= C) or (O*1.021 <= C)) and (C-O)*2 >= (H-C) and (C-O)*0.9 >= (O-L) and V(1)*1.5 <= V and avg(V, 5) >= 9000 and PreDayClose() >= 950 and Crossup(C,SAR(0.02, 0.2)) 지표변수 short = 5 mid = 20 long = 60 Percent = 5
프로필 이미지
매일대박
2024-06-27
792
글번호 181029
종목검색
답변완료

수식 문의드립니다.

수고하십니다. LatestEntryPrice 함수는 최근 진입 가격 기준으로 매수 되는데 b3 매수 신호는 b1 신호를 기준으로 하는지 b2 신호를 기준으로 발생하는지 알고 싶습니다. b2 매수 신호 발생 다음 봉에 b3 신호가 발생하도록 가능한지요? input : p1(1),p2(2),p3(3),시작일(202406501); var1 = ma(c,1); if MarketPosition == 0 and sdate >= 시작일 Then Buy("b1",AtStop,var1); if MarketPosition == 1 and sdate >= 시작일 Then { Buy("b2",AtLimit,LatestEntryPrice*(1-p2*1/100)); Buy("b3",AtLimit,LatestEntryPrice*(1-p2*2/100)); } SetStopProfittarget(p3,PercentStop);
프로필 이미지
근이
2024-06-27
810
글번호 181028
시스템
답변완료

시가대칭

시가와 당일 최저가와의 차이의 2배를, 최저가로부터 2배 지점 상단에 네모 표시. 시가와 당일 최고가와의 차이의 2배를, 최고가로부터 2배 지점 하단에 네모 표시. 시가가 380이고 최저가가 378.5면(-1.5), 최저가 상단 381.5(시가+1.5) 지점에 표시. 네모 아래에 그 지점 숫자 381.5 표시. 최고가 2배는 반대. 감사합니다.
프로필 이미지
고성
2024-06-27
740
글번호 181025
지표
답변완료

시스템 부탁 드립니다.

var : mav1(0),mav2(0),mav3(0),T1(0),T2(0),T3(0); mav1 = ma(c,5); mav2 = ma(c,20); mav3 = ma(c,60); if mav1 > mav1[1] Then T1 = 1; if mav1 < mav1[1] Then T1 = -1; if T1 == 1 and T1[1] != 1 Then var1 = 0; // if T1 == 1 and C > O and (C+O)/2 >= mav1 and mav2 > mav2[1] and mav3 > mav3[1] Then{ 60이평포함 if T1 == 1 and C > O and (C+O)/2 >= mav1 and mav2 > mav2[1] and mav1 > mav2 Then{ var1 = var1+1; if var1 == 1 Then buy("5매수"); } if T1 == -1 and T1[1] != -1 Then var2 = 0; // if T1 == -1 and C < O and (C+O)/2 <= mav1 and mav2 < mav2[1] and mav3 < mav3[1] Then{ 60이평포함 if T1 == -1 and C < O and (C+O)/2 <= mav1 and mav2 < mav2[1] and mav1 < mav2 Then{ var2 = var2+1; if var2 == 1 Then sell("5매도"); } 위 수식을 90틱에 적용중입니다. 여기에 5분봉을 불러와서 5분봉의 캔들이 양봉이면서 5분봉의 5선 위에 있을때만 90틱에 매수신호가 5분봉의 캔들이 음봉이면서 5분봉의 5선 아래에 있을때만 90틱에 매도의 신호가 나오게 수정 부탁 드립니다.
프로필 이미지
오늘도수익
2024-06-27
784
글번호 181023
시스템

구경꾼그림자 님에 의해서 삭제되었습니다.

프로필 이미지
구경꾼그림자
2024-06-27
1
글번호 181022
종목검색
답변완료

문의

input : StartTime(1015000),EndTime(130000); var : Tcond(false),cnt(0); Array : DO[20](0),DH[20](0),DL[20](0),DC[20](0); if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; for cnt = 19 downto 1 { DO[cnt] = DO[cnt-1]; DH[cnt] = DH[cnt-1]; DL[cnt] = DL[cnt-1]; DC[cnt] = DC[cnt-1]; } DO[0] = O; DH[0] = H; DL[0] = L; } if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then { Tcond = False; } if Tcond == true Then { DC[0] = C; if H > DH[0] Then DH[0] = H; if L < DL[0] Then DL[0] = L; } plot1(DO[1],"1일전시가"); plot2(DH[1],"1일전고가"); plot3(DL[1],"1일전저가"); plot4(DO[2],"2일전시가"); plot5(DH[2],"2일전고가"); plot6(DL[2],"2일전저가"); plot7(DO[3],"3일전시가"); plot8(DH[3],"3일전고가"); plot9(DL[3],"3일전저가"); 전에 만들어주신 식 모두0으로 나옵니다.
프로필 이미지
레전드
2024-06-27
770
글번호 181021
지표
답변완료

수식요청

INPUT : shortPeriod(9),midPeriod(26),longPeriod(52),이평(13); VAR : 선행1(0),선행2(0),고점(0),저점(0),A(0),B(0); 선행1=(highest(high,shortPeriod)+lowest(low,shortPeriod)+highest(high,midPeriod)+lowest(low,midPeriod))/4; 선행2=(highest(high,longPeriod)+lowest(low,longPeriod))/2; 고점 = Highest(선행1,25); 저점 = lowest(선행1,25); IF 선행1<선행2 TheN A=저점; B=EMA(C, 이평); IF CROSSUP(B, A) && C>O && C>C[1] && B[1]<B && (V>V[1]*2 or V[1]>V[2]*5) TheN Find(1); =========================================================================== 위는 13지수이평이 선행스팬기준선을 돌파하는 검색수식입니다. 시가가 아래의 선 아래에 위치할 때 발생하는 돌파를 검색코자 합니다. AA=(H+L+C)/3; BB=AA*V; X1=SUM(BB,기간); X2=SUM(V,기간); CT=X1/X2; CT-D2*stdev(AA, 기간) (기간 200 D2= 2)
프로필 이미지
ksks
2024-06-27
588
글번호 181018
종목검색
답변완료

진입청산 시간설정 문의

해외선물 시간설정을 다음과 같이 적용하여 시뮬레이션을 돌려 봤더니 시간설정 범위외에서도 진입청산이 이루어진 것을 발견했습니다. 제가 설정이 잘못 된것 같은데 바로 잡아 주시면 고맙겠습니다. input : StartTime(090310), EndTime(160900); var : Tcond(False); var : upper(0),lower(0); lower = lowest(L,length); upper = highest(H,length); var : up(0),down(0),sup(0),sdown(0); var : k1(0),k2(0),k3(0),k4(0),i1(-1),i2(-1), BollUp(0), BollDown(0), Ma20(0), BWI(0), Magijun(0) ; IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } if Bdate != Bdate[1] Then { IF Endtime <= starttime Then { SetStopEndofday(0); } } if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; } if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then Tcond = False;
프로필 이미지
하날랑
2024-06-27
624
글번호 181017
시스템
답변완료

당일

Input : 전환(0.45); Var:j(0),jj(0),HH(0),LL(0),hiBar(0),loBar(0),최종꼭지점(""),처리구분(""); Array:고[10,4](0),저[10,4](0); var : box(0),TX(0),TX2(0),TL(0),TL1(0); HH = H; LL = L; If Index == 0 Then { 고[1,1] = HH; 고[1,2] = 0; 고[1,3] = sDate; 고[1,4] = sTime; 저[1,1] = LL; 저[1,2] = 0; 저[1,3] = sDate; 저[1,4] = sTime; } If Index > 0 Then { hiBar = hiBar + 1; loBar = loBar + 1; } If HH[hiBar] < HH Then hiBar = 0; If LL[loBar] > LL Then loBar = 0; Condition1 = 저[1,1]+전환 <= HH and hiBar == 0; Condition2 = 고[1,1]-전환 >= LL and loBar == 0; 처리구분 = ""; If Condition1 and Condition2 Then { If 최종꼭지점 == "저점" Then { If 저[1,1] > LL Then 처리구분 = "저점처리"; Else 처리구분 = "고점처리"; } Else If 최종꼭지점 == "고점" Then { If 고[1,1] < HH Then 처리구분 = "고점처리"; Else 처리구분 = "저점처리"; } } Else If Condition1 Then 처리구분 = "고점처리"; Else If Condition2 Then 처리구분 = "저점처리"; If 처리구분 == "고점처리" Then { If 최종꼭지점 == "저점" Then { For j = 10 DownTo 2 { For jj = 1 To 4 { 고[j,jj] = 고[j-1,jj]; } } 고[1,1] = HH[hiBar]; 고[1,2] = Index - hiBar; 고[1,3] = sDate[hiBar]; 고[1,4] = sTime[hiBar]; hiBar = -1; loBar = -1; TL = TL_New_Self(저[1,3],저[1,4],저[1,1],고[1,3],고[1,4],고[1,1]); TL_SetSize(TL,1); TL_SetColor(TL,RED); TX = Text_New_Self(고[1,3],고[1,4],고[1,1],NumToStr(고[1,1]-저[1,1],2)+" "); Text_SetSize(tx,25); Text_SetColor(tx,Red); Text_SetStyle(tx,1,1); Text_SetBold(tx,1); box = Box_New_Self(저[1,3],저[1,4],저[1,1],고[1,3],고[1,4],고[1,1]); } If 고[1,1] < HH[hiBar] Then { 고[1,1] = HH[hiBar]; 고[1,2] = Index - hiBar; 고[1,3] = sDate[hiBar]; 고[1,4] = sTime[hiBar]; hiBar = -1; loBar = -1; TL_SetEnd(TL,고[1,3],고[1,4],고[1,1]); Text_SetString(TX,NumToStr(고[1,1]-저[1,1],2)+" "); Text_SetLocation(TX,고[1,3],고[1,4],고[1,1]); Box_SetEnd(box,고[1,3],고[1,4],고[1,1]); } if 고[1,1] >= 저[1,1]+1.9 Then { Box_SetColor(box,Pink); Box_SetFill(box,true,60); } else if 고[1,1] < 저[1,1]+1.9 and 고[1,1] >= 저[1,1]+1.3 Then { Box_SetColor(box,Gray); Box_SetFill(box,true,40); } else if 고[1,1] < 저[1,1]+1.3 and 고[1,1] >= 저[1,1]+0.8 Then { Box_SetColor(box,Magenta); Box_SetFill(box,true,30); } else if 고[1,1] < 저[1,1]+0.8 and 고[1,1] >= 저[1,1]+0.6 Then { Box_SetColor(box,Gray); Box_SetFill(box,true,50); } else { Box_SetColor(box,Orange); Box_SetFill(box,true,70); } 최종꼭지점 = "고점"; Plot1(고[1,1]); NoPlot(2); } If 처리구분 == "저점처리" Then { If 최종꼭지점 == "고점" Then { For j = 10 DownTo 2 { For jj = 1 To 4 { 저[j,jj] = 저[j-1,jj]; } } 저[1,1] = LL[loBar]; 저[1,2] = Index - loBar; 저[1,3] = sDate[loBar]; 저[1,4] = sTime[loBar]; hiBar = -1; loBar = -1; TL = TL_New_Self(고[1,3],고[1,4],고[1,1],저[1,3],저[1,4],저[1,1]); TL_SetSize(TL,1); TL_SetColor(TL,Green); TX = Text_New_Self(저[1,3],저[1,4],저[1,1],NumToStr(고[1,1]-저[1,1],2)+" "); Text_SetSize(tx,25); Text_SetColor(tx,Blue); Text_SetStyle(tx,1,0); Text_SetBold(tx,1); Condition5 = False; if Condition5 == False and 저[1,1]<= 고[1,1]-0.9 Then { Condition5 = true; } box = Box_New_Self(고[1,3],고[1,4],고[1,1],저[1,3],저[1,4],저[1,1]); } If 저[1,1] > LL[loBar] Then { 저[1,1] = LL[loBar]; 저[1,2] = Index - loBar; 저[1,3] = sDate[loBar]; 저[1,4] = sTime[loBar]; hiBar = -1; loBar = -1; TL_SetEnd(TL,저[1,3],저[1,4],저[1,1]); Text_SetString(TX,NumToStr(고[1,1]-저[1,1],2)+" "); Text_SetLocation(TX,저[1,3],저[1,4],저[1,1]); if Condition5 == False and 저[1,1] <= 고[1,1]-0.9 Then { Condition5 = true; tx2 = Text_New_Self(저[1,3],저[1,4],저[1,1]+0.6,"★"); Text_SetStyle(tx2,2,2); Text_SetColor(tx2,Blue); Text_SetSize(tx2,70); } Box_SetEnd(box,저[1,3],저[1,4],저[1,1]); } if 저[1,1] > 고[1,1]-0.6 Then { Box_SetColor(box,Cyan); Box_SetFill(box,true,80); } else if 저[1,1] <= 고[1,1]-0.6 and 저[1,1] > 고[1,1]-0.9 Then { Box_SetColor(box,Yellow); Box_SetFill(box,true,120); } else if 저[1,1] <= 고[1,1]-0.9 and 저[1,1] > 고[1,1]-1.3 Then { Box_SetColor(box,Lime); Box_SetFill(box,true,70); } else if 저[1,1] <= 고[1,1]-1.3 and 저[1,1] > 고[1,1]-1.6 Then { Box_SetColor(box,Cyan); Box_SetFill(box,true,70); } else if 저[1,1] <= 고[1,1]-1.6 and 저[1,1] > 고[1,1]-1.9 Then { Box_SetColor(box,Blue); Box_SetFill(box,true,20); } else { Box_SetColor(box,Yellow); Box_SetFill(box,true,70); } 최종꼭지점 = "저점"; Plot2(저[1,1]); NoPlot(1); } 모든 지표의 계산을, 전일과 무관하게 당일 시초부터 계산. 표시는 전일도. 수식 추가가 대략 20줄 이상으로 복잡하게 많으면, 아예 당일만 표시. 당일만 표시에도 20줄 이상 추가되면 취소. 감사합니다.
프로필 이미지
고성
2024-06-27
915
글번호 181016
지표
답변완료

문의

하이캔아시 챠트를 키움 챠트처름 윗꼬리 아래꼬리가 표현되는 캔들 챠트로 표현할 수없나요
프로필 이미지
레전드
2024-06-27
624
글번호 181015
지표