커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내

안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
프로필 이미지
예스스탁
2026-02-27
4395
글번호 230811
지표
답변완료

수정 부탁드립니다.

1. 안녕 하십니까? 도움 주서셔 감사드립니다. 2. 아래 붙임에 ma1 < ma2 Then을 Period(20) 고점돌파 전환 하락돌파전환으로 변경 부탁드립니다. 3. 파동선에 파동 중심선을 추가로 삽입 부탁드립니다. 4. ZZ[0] = L; 이것은 무엇을 설정을하기 위해 있나여? 5. 가끔 추세선이 에러가 나는데..갭,틱 등에 다른곳에서 이중으로 챠트가 그려 집니다. 이유가 무엇인지? Var:ShortPeriod(5),LongPeriod(14),선두께(1),상승색(BWHITE), 하락색(BWHITE); Var:j(0),ma1(0),ma2(0); Var: date11(0),date12(0),time11(0),time12(0),TL1(0), date21(0),date22(0),time21(0),time22(0), date31(0),date32(0),time31(0),time32(0),tx(0),tx1(0); Array:HiVal[20](0),LoVal[20](0),HiBar[20](0),LoBar[20](0),ZZ[20](0); Array:r[6](0),fr[6](0),TL2[6](0),TL3[6](0),TX2[6](0),TX3[6](0); r[0] = 0; r[1] = 2; r[2] = 3.; r[3] = -1; r[4] = -2.; r[5] = 1; For j = 0 To 19 { HiBar[j] = HiBar[j] + 1; LoBar[j] = LoBar[j] + 1; } ma1 = ma(C,ShortPeriod); ma2 = ma(C,LongPeriod); If ma1 < ma2 Then { If ma1[1] >= ma2[1] Then { For j = 18 DownTo 0 { LoVal[j+1] = LoVal[j]; LoBar[j+1] = LoBar[j]; ZZ[j+1] = ZZ[j]; } LoVal[0] = L; LoBar[0] = 0; ZZ[0] = L; date11 = date[HiBar[0]]; time11 = stime[HiBar[0]]; Value11 = HiVal[0]; date12 = date[LoBar[0]]; time12 = stime[LoBar[0]]; Value12 = LoVal[0]; TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,상승색); Tx = Text_New(date11,time11,Value11,"●"); #동그라미 색상, 빨강 Text_SetColor(Tx,RED); Text_SetStyle(Tx,2,2); tx = Text_New(date11,time11,Value11,NumToStr(value11,2)+NewLine+NumToStr(value11,2)+NewLine); Text_SetStyle(tx,2,1); date21 = date[HiBar[0]]; time21 = stime[HiBar[0]]; date22 = date[0]; time22 = stime[0]; for j = 0 to 5 { fr[j] = LoVal[1] + ((HiVal[0] - LoVal[1]) * r[j]); } TL2[0] = TL_New(date21,time21,fr[0],date22,time22,fr[0]); TL_SetColor(TL2[0],RED); TL2[1] = TL_New(date21,time21,fr[1],date22,time22,fr[1]); TL_SetColor(TL2[1],RED); TL_SetStyle(TL2[1], 3); TL2[2] = TL_New(date21,time21,fr[2],date22,time22,fr[2]); TL_SetColor(TL2[2],RED); TL_SetSize(TL2[2],1); TX2[2] = Text_New(date22,time22,fr[2],NumToStr(fr[2],2)); Text_SetColor(Tx2[2],BWHITE); Text_SetStyle(TX2[2],1,1); TL2[3] = TL_New(date21,time21,fr[3],date22,time22,fr[3]); TL_SetColor(TL2[3],RED); TL_SetStyle(TL2[3], 3); TL2[4] = TL_New(date21,time21,fr[4],date22,time22,fr[4]); TL_SetColor(TL2[4],RED); TL_SetSize(TL2[4],1); TX2[4] = Text_New(date22,time22,fr[4],NumToStr(fr[4],2)); Text_SetColor(Tx2[4],BWHITE); Text_SetStyle(TX2[4],1,0); TL2[5] = TL_New(date21,time21,fr[5],date22,time22,fr[5]); TL_SetColor(TL2[5],RED); } Else If LoVal[0] > L Then { LoVal[0] = L; LoBar[0] = 0; ZZ[0] = L; date12 = date[LoBar[0]]; time12 = stime[LoBar[0]]; Value12 = LoVal[0]; TL_SetEnd(TL1, date12,time12,Value12); date22 = date[0]; time22 = stime[0]; Tx = Text_New_Self(date12,time12,Value12,NumToStr(abs(value11-value12)/PriceScale,0)+" "); #동그라미 색상, 빨강 Text_SetColor(Tx,BLUE); Text_SetStyle(Tx,1,0); TL_SetEnd(TL2[0],date22,time22,fr[0]); TL_SetEnd(TL2[1],date22,time22,fr[1]); TL_SetEnd(TL2[2],date22,time22,fr[2]); Text_SetLocation(TX2[2],date22,time22,fr[2]); TL_SetEnd(TL2[3],date22,time22,fr[3]); TL_SetEnd(TL2[4],date22,time22,fr[4]); Text_SetLocation(TX2[4],date22,time22,fr[4]); TL_SetEnd(TL2[5],date22,time22,fr[5]); } } Else If ma1 > ma2 Then { If ma1[1] <= ma2[1] Then { For j = 18 DownTo 0 { HiVal[j+1] = HiVal[j]; HiBar[j+1] = HiBar[j]; ZZ[j+1] = ZZ[j]; } HiVal[0] = H; HiBar[0] = 0; ZZ[0] = H; date11 = date[LoBar[0]]; time11 = stime[LoBar[0]]; Value11 = LoVal[0]; date12 = date[HiBar[0]]; time12 = stime[HiBar[0]]; Value12 = HiVal[0]; TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,하락색); Tx1 = Text_New(date11,time11,Value11,"●"); #동그라미 색상, 파랑 Text_SetColor(Tx1,BLUE); Text_SetStyle(Tx1,2,2); tx = Text_New(date11,time11,Value11,NewLine+NumToStr(value11,2)+NewLine+NumToStr(value11,2)); Text_SetStyle(tx,2,0); date31 = date[LoBar[0]]; time31 = stime[LoBar[0]]; date32 = date[0]; time32 = stime[0]; for j = 0 to 5 { fr[j] = LoVal[0] + ((HiVal[1] - LoVal[0]) * r[j]); } TL3[0] = TL_New(date31,time31,fr[0],date32,time32,fr[0]); TL_SetColor(TL3[0],BLUE); TL3[1] = TL_New(date31,time31,fr[1],date32,time32,fr[1]); TL_SetColor(TL3[1],BLUE); TL_SetStyle(TL3[1], 3); TL3[2] = TL_New(date31,time31,fr[2],date32,time32,fr[2]); TL_SetColor(TL3[2],BLUE); TL_SetSize(TL3[2],1); TX3[2] = Text_New(date32,time32,fr[2],NumToStr(fr[2],2)); Text_SetColor(Tx3[2],BWHITE); Text_SetStyle(TX3[2],1,1); TL3[3] = TL_New(date31,time31,fr[3],date32,time32,fr[3]); TL_SetColor(TL3[3],BLUE); TL_SetStyle(TL3[3], 3); TL3[4] = TL_New(date31,time31,fr[4],date32,time32,fr[4]); TL_SetColor(TL3[4],BLUE); TL_SetSize(TL3[4],1); TX3[4] = Text_New(date32,time32,fr[4],NumToStr(fr[4],2)); Text_SetColor(Tx3[4],BWHITE); Text_SetStyle(TX3[4],1,0); TL3[5] = TL_New(date31,time31,fr[5],date32,time32,fr[5]); TL_SetColor(TL3[5],BLUE); } Else If HiVal[0] < H Then { HiVal[0] = H; HiBar[0] = 0; ZZ[0] = H; date12 = date[HiBar[0]]; time12 = stime[HiBar[0]]; Value12 = HiVal[0]; TL_SetEnd(TL1, date12,time12,Value12); date32 = date[0]; time32 = stime[0]; Tx = Text_New_Self(date12,time12,Value12,NumToStr(abs(value11-value12)/PriceScale,0)+" "); #동그라미 색상, 빨강 Text_SetColor(Tx,RED); Text_SetStyle(Tx,1,1); TL_SetEnd(TL3[0],date32,time32,fr[0]); TL_SetEnd(TL3[1],date32,time32,fr[1]); TL_SetEnd(TL3[2],date32,time32,fr[2]); Text_SetLocation(TX3[2],date32,time32,fr[2]); TL_SetEnd(TL3[3],date32,time32,fr[3]); TL_SetEnd(TL3[4],date32,time32,fr[4]); Text_SetLocation(TX3[4],date32,time32,fr[4]); TL_SetEnd(TL3[5],date32,time32,fr[5]); } } TL_SetSize(TL1,선두께);
프로필 이미지
fill
2018-06-07
274
글번호 119531
지표

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

프로필 이미지
fill
2018-06-07
0
글번호 119530
지표
답변완료

초 단위시간

초 단위시간표시는 어떻게 하는지요? 예) 1초, 2초, 3초, 5초 와 같이 예를 들어 주십시요.
프로필 이미지
너무조아
2018-06-07
235
글번호 119529
시스템
답변완료

수식작성 부탁드립니다.

안녕하세요? 간단한 수식작성 부탁드립니다. * 진입조건 1. 고점에서 양종가 < 음시가 양종가 > 음종가인 음봉매도 (고점과 진입봉 또는 진입전봉 고점과의 간격이 0~4(변수)틱 이내인것 2. 저점서 음종가>양시가 음종가<양종가인 양봉매수 (저점과 진입봉 또는 진입전봉 저점과의 간격이 0~4(변수)틱 이내인것 * 청산조건 손/익절 : 1.00/1.00P (변수) * 고점의 정의 : 차트화면상 전저점서 1.00(변수)이상 상승한 상태 * 저점의 정의 : 차트화면상 전고점서 1.00(변수)이상 하락한 상태 * 변수는 모두 외부 변수로.
프로필 이미지
대구어린울프
2018-06-06
240
글번호 119528
시스템
답변완료

부탁드립니다.

1. 분챠트에서 종가가 highest(h,20)[9]를 올라서면 매수하고, lowest(l,20)[9]를 내려서면 매도하라는 시스템식을 만드는데 있어서, 전에 매시간 20분부터 50분 사이에만 거래할 수 있도록시간제한 매수, 매도 진입표시가 되도록 부탁드렸는데 막상 구현이 되지 않는 것 같습니다. 다시한번 부탁드립니다. 2. 그리고 분챠트에서 종가가 highest(h,20)[5]를 올라서면 매수하고, lowest(l,20)[5]를 내려서면 매도하라는 시스템식을 만드면서 같은 시간대만큼은 매수든 매도든 먼저 나온 진입신호 하나만 1회 허용하는 시스템식을 구현해 주세요. 감사합니다.
프로필 이미지
서태공
2018-06-06
229
글번호 119527
시스템
답변완료

중심선 지표식 2

항상 감사드립니다 아래조건의 지표식 부탁드립니다 1.당일 처음 중심선1,상단선1,하단선1은 중심선1 = (전일종가+전일저가)/2 (전일종가-전일저가) = T1(절대값) (전일고가-전일종가) = T2(절대값) T1 > T2 일때 a1=T1 T1 < T2 일때 a1=T2 상단선1= 중심선1+a1 하단선1= 중심선1-a1 상단선1-->청색 중심선1-->노란색 하단선1-->빨간색 /************************************************************/ 전봉고가 > = (상단선1+a1+a1) 조건만족시 전봉고가 = 상단선2 중심선2=(상단선2+하단선1)/2 (전봉고가-중심선2)=T3 (절대값) (중심선2 -하단선1)=T4 (절대값) T3 > T4 일때 T3 = a2 T3 < T4 일때 T4 = a2 상단선2= 중심선2+a2 하단선2= 중심선2-a2 /*******************************************************/ 전봉저가 = < (하단선1-a1-a1) 조건만족시 전봉저가 = 하단선2 중심선2=(상단선1+하단선2)/2 (중심선2-전봉저가)=T3 (절대값) (상단선1 -중심선2)=T4 (절대값) T3 > T4 일때 T3 = a2 T3 < T4 일때 T4 = a2 상단선2= 중심선2+a2 하단선2= 중심선2-a2 /*****************************************************/ 위와같은 조건이 계속변경될때마다 중심선및 상단선,하단선변경 2.전일저가,종가,고가를 수작업으로 입력할수 있도록 변형식 부탁드립니다. 감사합니다.
프로필 이미지
조민철
2018-06-06
279
글번호 119526
지표

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

프로필 이미지
yes
2018-06-06
5
글번호 119525
지표
답변완료

수식 부탁드립니다

패턴이 완성된후 그림과같이 피보나치 라인이 나타나게 수식부탁드립니다 Input:length(20),오차범위(0.382); Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0), 처리구분(""),XA(0),AB(0),BC(0),CD(0),V1(0),V2(0),V3(0),V4(0),V5(0),Result(""); Array:고점[10,2](0),저점[10,2](0),TL[9](0),TX[6](0); //가격,위치 처리구분 = ""; If Highest(H,length) == H and lastHiVal <> H and Lowest(L,length) == L and lastLoVal <> L Then { If 저점[1,1] > L Then 처리구분 = "저점처리"; // 저점 갱신되었을 때 저점으로 처리 If 고점[1,1] < H Then 처리구분 = "고점처리"; // 고점,저점 모두 갱신되었을 땐 고점으로 처리 } Else If Highest(H,length) == H and lastHiVal <> H Then 처리구분 = "고점처리"; Else If Lowest(L,length) == L and lastLoVal <> L Then 처리구분 = "저점처리"; If 처리구분 == "고점처리" Then { lastHiVal = H; If 고점[1,2] < 저점[1,2] Then { For j = 10 DownTo 2 { 고점[j,1] = 고점[j-1,1]; 고점[j,2] = 고점[j-1,2]; } } If 고점[1,2] < 저점[1,2] or 고점[1,1] < H Then { 고점[1,1] = H; 고점[1,2] = Index; XA = sqrt((고점[3,1]-저점[2,1])^2+(저점[2,2]-고점[3,2])^2); AB = sqrt((고점[2,1]-저점[2,1])^2+(고점[2,2]-저점[2,2])^2); BC = sqrt((고점[2,1]-저점[1,1])^2+(저점[1,2]-고점[2,2])^2); CD = sqrt((고점[1,1]-저점[1,1])^2+(고점[1,2]-저점[1,2])^2); V1 = AB/XA; V2 = BC/AB; V3 = CD/BC; V4 = CD/XA; Result = ""; If 고점[2,1] < 고점[1,1] and 고점[1,1] < 고점[3,1] and 저점[1,1] > 저점[2,1] Then { If condition1= V1 >= 0.618 - 오차범위 and V1 <= 0.618 + 오차범위 and V2 >= 0.382 - 오차범위 and V2 <= 0.886 + 오차범위 and V3 >= 1.13 - 오차범위 and V3 <= 1.618 + 오차범위 and V4 >= 0.786- 오차범위 and V4 <= 0.786 + 오차범위 Then Result = " Bearish Gartley "; Else If V1 >= 0.382 - 오차범위 and V1 <= 0.5 + 오차범위 and V2 >= 0.382 - 오차범위 and V2 <= 0.886 + 오차범위 and V3 >= 1.618 - 오차범위 and v3 <= 2.618 + 오차범위 and V4 >= 0.886 - 오차범위 and V4 <= 0.886 + 오차범위 Then Result = "Bearish Bat"; } Else If 고점[2,1] < 고점[1,1] and 고점[3,1] < 고점[1,1] and 저점[2,1] < 저점[1,1] Then { If V1 >= 0.382 - 오차범위 and V1 <= 0.618 + 오차범위 and V2 >= 0.382 - 오차범위 and V2 <= 0.886 + 오차범위 and V3 >= 2.618 - 오차범위 and V3 <= 3.618 + 오차범위 and V4 >= 1.618 - 오차범위 and V4 <= 1.618 + 오차범위 Then Result = "Bearish Crab"; Else If V1 >= 0.786 - 오차범위 and V1 <= 0.786 + 오차범위 and V2 >= 0.382 - 오차범위 and V2 <= 0.886 + 오차범위 and V3 >= 1.618 - 오차범위 and v3 <= 2.24 + 오차범위 and V4 >= 1.27 - 오차범위 and V4 <= 1.41 + 오차범위 Then Result = "Bearish Butterfly"; Else If V1 >= 0.886 - 오차범위 and V1 <= 0.886 + 오차범위 and V2 >= 0.382 - 오차범위 and V2 <= 0.886 + 오차범위 and V3 >= 2.0 - 오차범위 and V3 <= 3.618 + 오차범위 and V4 >= 1.618 - 오차범위 and V4 <= 1.618 + 오차범위 Then Result = "Bearish Deep Crab"; Else If V1 >= 0.382 - 오차범위 and V1 <= 0.382 + 오차범위 and V2 >= 0.382 - 오차범위 and V2 <= 0.886 + 오차범위 and V3 >= 2.0 - 오차범위 and V3 <= 3.168 + 오차범위 and V4 >= 1.13 - 오차범위 and V4 <= 1.13 + 오차범위 Then Result = "Bearish ALT BAT"; } Else If 고점[2,1] < 고점[3,1] and 고점[2,1] < 고점[1,1] and 고점[3,1] < 고점[1,1] and 저점[1,1] < 저점[2,1] Then { If V2 >= 1.13 - 오차범위 and V2 <= 1.618 + 오차범위 and V3 >= 1.618 - 오차범위 and V3 <= 2.24 + 오차범위 and V4 >= 0.886 - 오차범위 and V4 <= 1.13 + 오차범위 Then Result = "Bearish Shark"; } If Result != "" Then { TL_SetExtRight(TL[7],false); TL_SetExtRight(TL[8],false); sBar = Index - 고점[3,2]; eBar = Index - 저점[2,2]; If TL_GetBeginDate(TL[1]) == sDate[sBar] and TL_GetBeginTime(TL[1]) == sTime[sBar] Then { For j = 1 To 8 { TL_Delete(TL[j]); If j < 6 Then Text_Delete(TX[j]); } } TL[1] = TL_New(sDate[sBar],sTime[sBar],고점[3,1],sDate[eBar],sTime[eBar],저점[2,1]); sBar = Index - 저점[2,2]; eBar = Index - 고점[2,2]; TL[2] = TL_New(sDate[sBar],sTime[sBar],저점[2,1],sDate[eBar],sTime[eBar],고점[2,1]); sBar = Index - 고점[2,2]; eBar = Index - 저점[1,2]; TL[3] = TL_New(sDate[sBar],sTime[sBar],고점[2,1],sDate[eBar],sTime[eBar],저점[1,1]); sBar = Index - 저점[1,2]; eBar = Index - 고점[1,2]; TL[4] = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]); sBar = Index - 고점[3,2]; eBar = Index - 고점[2,2]; TL[5] = TL_New(sDate[sBar],sTime[sBar],고점[3,1],sDate[eBar],sTime[eBar],고점[2,1]); sBar = Index - 고점[2,2]; eBar = Index - 고점[1,2]; TL[6] = TL_New(sDate[sBar],sTime[sBar],고점[2,1],sDate[eBar],sTime[eBar],고점[1,1]); sBar = Index - 고점[3,2]; eBar = Index - 고점[1,2]; TL[7] = TL_New(sDate[sBar],sTime[sBar],고점[3,1],sDate[eBar],sTime[eBar],고점[1,1]); sBar = Index - 저점[2,2]; eBar = Index - 저점[1,2]; TL[8] = TL_New(sDate[sBar],sTime[sBar],저점[2,1],sDate[eBar],sTime[eBar],저점[1,1]); sBar = Index - round((고점[3,2] + 고점[2,2])/2,0); TX[1] = Text_New(sDate[sBar],sTime[sBar],(고점[3,1]+고점[2,1])/2,NumToStr(V1,4)); sBar = Index - round((저점[2,2] + 저점[1,2])/2,0); TX[2] = Text_New(sDate[sBar],sTime[sBar],(저점[2,1]+저점[1,1])/2,NumToStr(V2,4)); sBar = Index - round((고점[2,2] + 고점[1,2])/2,0); TX[3] = Text_New(sDate[sBar],sTime[sBar],(고점[2,1]+고점[1,1])/2,NumToStr(V3,4)); sBar = Index - round((고점[3,2] + 고점[1,2])/2,0); TX[4] = Text_New(sDate[sBar],sTime[sBar],(고점[3,1]+고점[1,1])/2,NumToStr(V4,4)); sBar = Index - round((고점[3,2] + 고점[1,2])/2,0); TX[5] = Text_New(sDate[sBar],sTime[sBar],(고점[3,1]+고점[2,1])/2,Result); For j = 1 To 8 { TL_SetColor(TL[j],BLUE); } Text_SetStyle(TX[1],2,0); Text_SetStyle(TX[2],2,0); Text_SetStyle(TX[3],2,0); Text_SetStyle(TX[4],2,0); Text_SetStyle(TX[5],2,5); } } } If 처리구분 == "저점처리" Then { lastLoVal = L; If 저점[1,2] < 고점[1,2] then { For j = 10 DownTo 2 { 저점[j,1] = 저점[j-1,1]; 저점[j,2] = 저점[j-1,2]; } } If 저점[1,2] < 고점[1,2] or 저점[1,1] > L then { 저점[1,1] = L; 저점[1,2] = Index; XA = sqrt((고점[2,1]-저점[3,1])^2+(고점[2,2]-저점[3,2])^2); AB = sqrt((고점[2,1]-저점[2,1])^2+(저점[2,2]-고점[2,2])^2); BC = sqrt((고점[1,1]-저점[2,1])^2+(고점[1,2]-저점[2,2])^2); CD = sqrt((고점[1,1]-저점[1,1])^2+(저점[1,2]-고점[1,2])^2); V1 = AB/XA; V2 = BC/AB; V3 = CD/BC; V4 = CD/XA; Result = ""; If 저점[3,1] < 저점[1,1] and 저점[1,1] < 저점[2,1] and 고점[1,1] < 고점[2,1] Then { If V1 >= 0.618 - 오차범위 and V1 <= 0.618 + 오차범위 and V2 >= 0.382 - 오차범위 and V2 <= 0.886 + 오차범위 and V3 >= 1.13 - 오차범위 and V3 <= 1.618 + 오차범위 and V4 >= 0.786 - 오차범위 and V4 <= 0.786 + 오차범위 Then Result = "Bullish Gartley"; Else If 저점[3,1] < 저점[1,1] and 저점[1,1] < 저점[2,1] and 고점[1,1] < 고점[2,1] Then { If V1 >= 0.382 - 오차범위 and V1 <= 0.5 + 오차범위 and V2 >= 0.382 - 오차범위 and V2 <= 0.886 + 오차범위 and V3 >= 1.618 - 오차범위 and v3 <= 2.618 + 오차범위 and V4 >= 0.886 - 오차범위 and V4 <= 0.886 + 오차범위 Then Result = "Bullish Bat"; } Else If 저점[1,1] < 저점[3,1] and 저점[3,1] < 저점[2,1] and 고점[1,1] < 고점[2,1] Then { If V1 >= 0.382 - 오차범위 and V1 <= 0.618 + 오차범위 and V2 >= 0.382 - 오차범위 and V2 <= 0.886 + 오차범위 and V3 >= 2.618 - 오차범위 and V3 <= 3.618 + 오차범위 and V4 >= 1.618 - 오차범위 and V4 <= 1.618 + 오차범위 Then Result = "Bullish Crab"; Else If V1 >= 0.786 - 오차범위 and V1 <= 0.786 + 오차범위 and V2 >= 0.382 - 오차범위 and V2 <= 0.886 + 오차범위 and V3 >= 1.618 - 오차범위 and v3 <= 2.24 + 오차범위 and V4 >= 1.27 - 오차범위 and V4 <= 1.41 + 오차범위 Then Result = "Bullish Butterfly"; Else If V1 >= 0.886 - 오차범위 and V1 <= 0.886 + 오차범위 and V2 >= 0.382 - 오차범위 and V2 <= 0.886 + 오차범위 and V3 >= 2.0 - 오차범위 and V3 <= 3.618 + 오차범위 and V4 >= 1.618 - 오차범위 and V4 <= 1.618 + 오차범위 Then Result = "Bullish Deep Crab"; Else If V1 >= 0.382 - 오차범위 and V1 <= 0.382 + 오차범위 and V2 >= 0.382 - 오차범위 and V2 <= 0.886 + 오차범위 and V3 >= 2.0 - 오차범위 and V3 <= 3.168 + 오차범위 and V4 >= 1.13 - 오차범위 and V4 <= 1.13 + 오차범위 Then Result = "Bullish ALT BAT"; } Else If 저점[1,1] < 저점[2,1] and 저점[3,1] < 저점[2,1] and 고점[2,1] < 고점[1,1] Then { If V2 >= 1.13 - 오차범위 and V2 <= 1.618 + 오차범위 and V3 >= 1.618 - 오차범위 and V3 <= 2.24 + 오차범위 and V4 >= 0.886 - 오차범위 and V4 <= 1.13 + 오차범위 Then Result = "Bullish Shark"; } If Result != "" Then { TL_SetExtRight(TL[7],false); TL_SetExtRight(TL[8],false); sBar = Index - 저점[3,2]; eBar = Index - 고점[2,2]; If TL_GetBeginDate(TL[1]) == sDate[sBar] and TL_GetBeginTime(TL[1]) == sTime[sBar] Then { For j = 1 To 8 { TL_Delete(TL[j]); If j < 6 Then Text_Delete(TX[j]); } } TL[1] = TL_New(sDate[sBar],sTime[sBar],저점[3,1],sDate[eBar],sTime[eBar],고점[2,1]); sBar = Index - 고점[2,2]; eBar = Index - 저점[2,2]; TL[2] = TL_New(sDate[sBar],sTime[sBar],고점[2,1],sDate[eBar],sTime[eBar],저점[2,1]); sBar = Index - 저점[2,2]; eBar = Index - 고점[1,2]; TL[3] = TL_New(sDate[sBar],sTime[sBar],저점[2,1],sDate[eBar],sTime[eBar],고점[1,1]); sBar = Index - 고점[1,2]; eBar = Index - 저점[1,2]; TL[4] = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]); sBar = Index - 저점[3,2]; eBar = Index - 저점[2,2]; TL[5] = TL_New(sDate[sBar],sTime[sBar],저점[3,1],sDate[eBar],sTime[eBar],저점[2,1]); sBar = Index - 저점[2,2]; eBar = Index - 저점[1,2]; TL[6] = TL_New(sDate[sBar],sTime[sBar],저점[2,1],sDate[eBar],sTime[eBar],저점[1,1]); sBar = Index - 저점[3,2]; eBar = Index - 저점[1,2]; TL[7] = TL_New(sDate[sBar],sTime[sBar],저점[3,1],sDate[eBar],sTime[eBar],저점[1,1]); sBar = Index - 고점[2,2]; eBar = Index - 고점[1,2]; TL[8] = TL_New(sDate[sBar],sTime[sBar],고점[2,1],sDate[eBar],sTime[eBar],고점[1,1]); sBar = Index - round((저점[3,2] + 저점[2,2])/2,0); TX[1] = Text_New(sDate[sBar],sTime[sBar],(저점[3,1]+저점[2,1])/2,NumToStr(V1,4)); sBar = Index - round((고점[2,2] + 고점[1,2])/2,0); TX[2] = Text_New(sDate[sBar],sTime[sBar],(고점[2,1]+고점[1,1])/2,NumToStr(V2,4)); sBar = Index - round((저점[2,2] + 저점[1,2])/2,0); TX[3] = Text_New(sDate[sBar],sTime[sBar],(저점[2,1]+저점[1,1])/2,NumToStr(V3,4)); sBar = Index - round((저점[3,2] + 저점[1,2])/2,0); TX[4] = Text_New(sDate[sBar],sTime[sBar],(저점[3,1]+저점[1,1])/2,NumToStr(V4,4)); sBar = Index - round((저점[3,2] + 저점[1,2])/2,0); TX[5] = Text_New(sDate[sBar],sTime[sBar],(저점[3,1]+저점[2,1])/2,Result); For j = 1 To 8 { TL_SetColor(TL[j],RED); } Text_SetStyle(TX[1],2,0); Text_SetStyle(TX[2],2,0); Text_SetStyle(TX[3],2,0); Text_SetStyle(TX[4],2,0); Text_SetStyle(TX[5],2,5); } } } For j = 1 To 4 { TL_SetSize(TL[j],1); } For j = 5 To 8 { TL_SetSize(TL[j],1); TL_SetColor(TL[j],GREEN); TL_SetExtRight(TL[7],True); TL_SetExtRight(TL[8],True); }}
프로필 이미지
수색대대
2018-06-06
420
글번호 119524
지표
답변완료

문의드립니다.

수고하십니다. 예전에 검색식 만들어주셔서 잘 쓰고 있습니다. 찾아진 갭의 상단과 갭의 하단을 분할매수하고 매수된 단가의 5%,10% 지정가 익절매도하는 시스템식을 부탁드립니다. (매수가 안된 매수주문과 매도가 안된 매도주문은 익일부터 지속적으로 주문이 나가게 하고 싶습니다.) input : NN(10),AA(10),BB(5); if min(C,O) >= C[1]*(1+AA/100) Then { var1 = min(C,O); var2 = h; var3 = index; Condition1 = false; } if H > var2 Then var2 = h; if index > var3 and L <= var1*(1+BB/100) then Condition1 = true; if var3 > 0 and index > var3 and index <= var3+nn and Condition1 == false Then find(1);
프로필 이미지
여세우
2018-06-06
235
글번호 119523
시스템