커뮤니티

예스랭귀지 Q&A

글쓰기

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

프로필 이미지
덕조
2020-12-13
27
글번호 144638
지표
답변완료

수식문의드립니다

안녕하십니까 항상 도움을 주심에 감사드립니다 바쁘신데 수식관련 몇가지만 여쭙고자합니다 저는 현재 if문을 이용한, 특정조건 충족시 값이 갱신되는 지지/저항 수평선을 사용하고있습니다. plot1, plot2, plot3, plot4 네가지로 나눠서 사용중인데 아래와 같은 종목검색을 수식으로 구현하고싶어서 질문드립니다 Q1.일봉기준 오늘 장마감 이후에(당일 장마감후 검색 예정) "120일선 아래에서" plot1 or plot2 or plot3 or plot4 네개 지표값 중에 한가지 이상의 지표값이 갱신된 종목을 포착하는 수식. (갱신된 지표값(들)이 120일선 아래에 있는 경우입니다) Q2.일봉기준 10봉이내에서 [120일선 아래에서 plot1 or plot2 or plot3 or plot4 4개 지표값 중에 한가지 이상의 지표값이 갱신된 종목] 을 포착하는 수식 Q3.일봉기준 오늘 장마감 이후에(당일 장마감후 검색 예정) 오늘 장중 고가가 plot1 OR plot2 OR plot3 OR plot4 4개 중 2개 지표값 이상을 뛰어넘은 종목을 포착하는 수식 (120일선 위아래 상관없음) 예스트레이더에서 위와같은 수식들이 구현가능한지 궁금합니다 답변부탁드립니다 행복한 하루 되세요~
프로필 이미지
하누왕
2020-12-13
785
글번호 144637
검색
답변완료

문의

아래는 옵션 만기일 기준으로 날짜를 리턴하는 수식입니다. 선물 만기일(3개월) 기준 수식을 부탁드립니다. 항상 고맙습니다. *********************************************************************************** input : 리메인(0); Var : Year(0),Month(0),ndate1(0),ndate2(0); var : cnt(0),count1(0),count2(0); var : XD1(0),XD2(0),Xdate(0),remain(0); Year = Floor(sDate / 10000)*10000; month = Floor(FracPortion(sdate/10000)*100)*100; ndate1 = year+month+1; if Month+100 <= 1200 Then ndate2 = year+(month+100)+1; Else ndate2 = (year+10000)+100+1; count1 = 0; count2 = 0; for cnt = 0 to 15 { if dayofweek(ndate1+cnt) == 4 Then { count1 = count1+1; if count1 == 2 Then { XD1 = ndate1+cnt; } } if dayofweek(ndate2+cnt) == 4 Then { count2 = count2+1; if count2 == 2 Then { XD2 = nDate2+cnt; } } } if sDate <= XD1 Then { Xdate = XD1; } Else { Xdate = XD2; } if Xdate > 0 Then { remain = DateToJulian(Xdate)-DateToJulian(sDate); } if remain == 리메인 then { }
프로필 이미지
좌오비우오비
2020-12-13
713
글번호 144636
시스템

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

프로필 이미지
말라
2020-12-12
5
글번호 144635
시스템
답변완료

안녕하세요 질문드립니다.

시간에 관한 지표좀 알고싶습니다. 랭귀지 사전을봐도 쉽게 이해가 안가서요 예제를 올려볼테니 답좀주시기 바랍니다. EX) 1봉전의 시간, 9봉전의 시간 지표식이 VAR1= c[1]; Plot(var1); 이라면 지표값은 1봉전 종가 이렇게 답이 있잖아요 시간도 위처럼 하나의 지표값으로 나오게끔 식좀 부탁드립니다. 위의 EX)도 이런식으로 좀 표현되게끔 하고싶어요 도와주세요 var1 = 1봉전의 시간 Plot(var1); var1 = 9봉전의 시간 Plot(var1); 이렇게 뭔가 딱 지표로 표현될수있게끔....너무초보라 지성요
프로필 이미지
말라
2020-12-14
667
글번호 144634
지표

코샘매쓰 님에 의해서 삭제되었습니다.

프로필 이미지
코샘매쓰
2020-12-12
7
글번호 144633
시스템
답변완료

검색 수식 좀 부탁드립니다.

안녕하세요. 수식 한가지 부탁드립니다. 현재봉(날짜를 변경할 수 있게 변수로 부탁드립니다)부터 20봉전까지의 최고가가 21개전봉부터 200봉전까지의 최고가보다 크면서 현재봉이 양봉인 종목을 검색하는 수식 부탁드립니다. 여기서 아주 중요한 부분이 있는데요. 상장한지 얼마 되지 않아 현재 생성된 전체 봉갯수가 201개 이상되지 않고 200개 이하인 경우에도 형성된 봉 갯수내에서 위 조건을 만족할 경우 종목이 검색되도록 부탁드립니다. 예를 들어서 전체 봉 갯수가 25개나 50개나 100개나 150개나 190개 라도 종목이 검색되게 말입니다. 잘 부탁드립니다.
프로필 이미지
강태공3
2020-12-12
831
글번호 144632
검색
답변완료

문의드립니다.

안녕하세요~ 문의드릴게 있습니다. 제가 적용하고자 하는 수식으로 백테스트를 해보고 싶은데요~ 어떻게 하면 되나요?? 시스템을 켰을때 실시간진입 구간하고 차이가 나더라고요~ 방법을 자세히 알고 싶습니다. 틱봉,분봉을 해보려고 합니다.
프로필 이미지
?덈줎?쒖옉
2020-12-12
786
글번호 144631
시스템
답변완료

수식 결과에 나오는 점이 여러개 일때 안겹치게 하는 방법이 있나요??

수식 결과에 나오는 점이 여러개 일때 안겹치게 하는 방법이 있나요? 검색에서 수식을 여러개 작성하여 plot1~plot9 9개의 검색 수식으로 만족하는 수식이 어떤봉에는 2개 어떤봉에는 5개 어떤봉에는 0개 차이나게 표시될때 plot1의 위치 고정, plot2의 위치 고정, plot3......으로 각각의 위치를 고정하면 경치지 않고 지정된 위치에 표시되겠는데요!! 저가 원하는 것은 고정된 위치가 아닌 순서대로 나란히 나오게 할 수 있을까요?? 첨부그림 참고해 주세요!! //■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ input : st1(5),st2(5),st3(3),상승(5),하락(-3); var : stok(0),stod(0),upp(0),dnp(0),avu(0),avd(0),gap(0); //---------------------------------- //스톡케스틱 stok=StochasticsK(st1,st2); stod=StochasticsD(st1,st2,st3); //---------------------------------- //상승률 upp=((c-o)/o)*100; dnp=((c-o)/o)*100; //---------------------------------- //검색식 점 간격 gap=(c/100)*1.5; //■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ //예제를 위해 수식은 매수와 매도 같은 수식이며 plot1,2의 색깔만 넣었습니다. //여러개의 검색식이 만족 할때 점이 겹쳐서 이전에 적용된 빨간점은 안 보입니다. if Crossdown(stok,stod) Then Plot1(L-gap,"매수",red,DEf,8); Else NoPlot(1); //---------------------------------- if Crossdown(stok,stod) Then Plot2(L-gap,"매도",blue,DEf,8); Else NoPlot(2); //■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
프로필 이미지
여유의공간
2020-12-12
754
글번호 144630
검색
답변완료

안녕하세요 질문드립니다.

안녕하세요 시스템에서 "매도"부분만 약간 수정하고 싶어서 글남깁니다 아래는 제가 사용하는 시스템인데요 #A진입은 제외하고 #"B진입 1~6부분"만 수정하고싶습니다 각 진입마다 매도식은 1매도는 매수가 대비 12프로상승시 매도 2매도는 매수가 대비 1프로상승 후 7프로 하락시 매도 3매도는 매수가 대비 6프로 하락시 매도 이렇게 3개로 똑같습니다. 여기서 3매도 부분만 C[4]부분을 참고하고 싶은데요 "6프로 하락시 매도"가아닌 "C[4] 대비 1프로 하락"시 매도로 식좀 수정해주시면 고맙겠습니다. var : VV(0); var : A1(False),A2(False),A3(False),A4(False),A5(False),A6(False),A7(False),A8(False),A9(False),A10(False),A11(False),A12(False),A13(False),A14(False),A15(False); var : B1(False),B2(False),B3(False),B4(False),B5(False),B6(False),B7(False),B8(False),B9(False),B10(False),B11(False); VV = AccumN(DownVol,1)[1]/AccumN(Volume,1)[1]; A1 = C[4]<Lowest(L,2)[1]; A2 = Highest(H,2)[2] >= C[4]*1.06; A3 = Accumn(H-O,1)[3] > Accumn(H-O,1)[2]; A4 = Highest(H,2)[2] > Highest(H,1)[1]; A5 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.25 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.30; A6 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.20 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.25; A7 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.15 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.20; A8 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.10 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.15; A9 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.05 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.10; A10 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.01 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.05; A11 = AccumN(V,1)[2] > AccumN(V,1)[1] and AccumN(V,1)[2] > AccumN(V,1)[3]*0.1; A12 = C[1] <= C[2]*1.01 and C[1] >= C[2]*0.99; A13 = 0.60 >= VV and VV >= 0.40; A14 = (Accumn(DownVol,3)[1]/Accumn(Volume,3)[1])/(Accumn(DownVol,2)[2]/Accumn(Volume,2)[2])<1.1; A15 = (Accumn(Volume,2)[2]/Accumn(Volume,2)[4] >= 8 Or Accumn(Volume,2)[2]/Accumn(Volume,4)[4] >= 8 Or Accumn(Volume,2)[2]/Accumn(Volume,6)[4] >= 8 Or Accumn(Volume,2)[2]/Accumn(Volume,8)[4] >= 8 Or Accumn(Volume,2)[2]/Accumn(Volume,10)[4] >= 8); B1 = C[1] < C[4]*1.06; B2 = Highest(H,2)[2] >= C[4]*1.06; B3 = Accumn(H-O,1)[3] > Accumn(H-O,1)[2]; B4 = Highest(H,2)[2] > Highest(H,1)[1]; B5 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.25 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.30; B6 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.20 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.25; B7 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.15 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.20; B8 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.10 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.15; B9 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.05 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.10; B10 = AccumN(v,1)[1] >= AccumN(v,2)[2]*0.01 and AccumN(v,1)[1] <= AccumN(v,2)[2]*0.05; B11 = AccumN(V,1)[2] > AccumN(V,1)[1] and AccumN(V,1)[2] > AccumN(V,1)[3]*0.1; if A1 and A2 and A3 and A4 and A5 and A11 and (A12 or A13 or A14) and A15 Then Buy("A6"); if A1 and A2 and A3 and A4 and A6 and A11 and (A12 or A13 or A14) and A15 Then Buy("A5"); if A1 and A2 and A3 and A4 and A7 and A11 and (A12 or A13 or A14) and A15 Then Buy("A4"); if A1 and A2 and A3 and A4 and A8 and A11 and (A12 or A13 or A14) and A15 Then Buy("A3"); if A1 and A2 and A3 and A4 and A9 and A11 and (A12 or A13 or A14) and A15 Then Buy("A2"); if A1 and A2 and A3 and A4 and A10 and A11 and (A12 or A13 or A14) and A15 Then Buy("A1"); if B1 and B2 and B3 and B4 and B5 and B11 Then Buy("B6"); if B1 and B2 and B3 and B4 and B6 and B11 Then Buy("B5"); if B1 and B2 and B3 and B4 and B7 and B11 Then Buy("B4"); if B1 and B2 and B3 and B4 and B8 and B11 Then Buy("B3"); if B1 and B2 and B3 and B4 and B9 and B11 Then Buy("B2"); if B1 and B2 and B3 and B4 and B10 and B11 Then Buy("B1"); var : A1Price(0),A1high(0); var : A2Price(0),A2high(0); var : A3Price(0),A3high(0); var : A4Price(0),A4high(0); var : A5Price(0),A5high(0); var : A6Price(0),A6high(0); var : B1Price(0),B1high(0); var : B2Price(0),B2high(0); var : B3Price(0),B3high(0); var : B4Price(0),B4high(0); var : B5Price(0),B5high(0); var : B6Price(0),B6high(0); if MarketPosition == 1 Then { #A1진입 발생 #보유수량이 증가하고 최근 발생한 진입명이 A1이면 if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "A1" Then { #진입가 저장 A1Price = LatestEntryPrice(0); #진입이후 최고가의 초기값으로 현재봉 고가저장 A1high = H; } #새로운 고가가 발생하면 변수의 값을 새로운 고가를 변경 if A1high > 0 and H > A1high Then A1high = H; if A1Price > 0 Then #추가된 if문 { #12% 수익이면 청산 ExitLong("A1-1",AtLimit,A1Price*1.12,"A1"); #1% 이상 수익이후에 7% 하락하면 청산 if A1high >= A1Price*1.01 Then ExitLong("A1-2",AtStop,A1high*0.93,"A1"); #6% 손실시 청산 ExitLong("A1-3",AtStop,A1Price*0.94,"A1"); } #A2진입 if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "A2" Then { A2Price = LatestEntryPrice(0); A2high = H; } if A2high > 0 and H > A2high Then A2high = H; if A2Price > 0 Then { ExitLong("A2-1",AtLimit,A2Price*1.12,"A2"); if A2high >= A2Price*1.01 Then ExitLong("A2-2",AtStop,A2high*0.93,"A2"); ExitLong("A2-3",AtStop,A2Price*0.94,"A2"); } #A3진입 if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "A3" Then { A3Price = LatestEntryPrice(0); A3high = H; } if A3high > 0 and H > A3high Then A3high = H; if A3Price > 0 Then { ExitLong("A3-1",AtLimit,A3Price*1.12,"A3"); if A3high >= A3Price*1.01 Then ExitLong("A3-2",AtStop,A3high*0.93,"A3"); ExitLong("A3-3",AtStop,A3Price*0.94,"A3"); } #A4진입 if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "A4" Then { A4Price = LatestEntryPrice(0); A4high = H; } if A4high > 0 and H > A4high Then A4high = H; if A4Price > 0 Then { ExitLong("A4-1",AtLimit,A4Price*1.12,"A4"); if A4high >= A4Price*1.01 Then ExitLong("A4-2",AtStop,A4high*0.93,"A4"); ExitLong("A4-3",AtStop,A4Price*0.94,"A4"); } #A5진입 if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "A5" Then { A5Price = LatestEntryPrice(0); A5high = H; } if A5high > 0 and H > A5high Then A5high = H; if A5Price > 0 Then { ExitLong("A5-1",AtLimit,A5Price*1.12,"A5"); if A5high >= A5Price*1.01 Then ExitLong("A5-2",AtStop,A5high*0.93,"A5"); ExitLong("A5-3",AtStop,A5Price*0.94,"A5"); } #A6진입 if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "A6" Then { A6Price = LatestEntryPrice(0); A6high = H; } if A6high > 0 and H > A6high Then A6high = H; if A6Price > 0 Then { ExitLong("A6-1",AtLimit,A6Price*1.12,"A6"); if A6high >= A6Price*1.01 Then ExitLong("A6-2",AtStop,A6high*0.93,"A6"); ExitLong("A6-3",AtStop,A6Price*0.94,"A6"); } #B1진입 if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "B1" Then { B1Price = LatestEntryPrice(0); B1high = H; } if B1high > 0 and H > B1high Then B1high = H; if B1Price > 0 Then { ExitLong("B1-1",AtLimit,B1Price*1.12,"B1"); if B1high >= B1Price*1.01 Then ExitLong("B1-2",AtStop,B1high*0.93,"B1"); ExitLong("B1-3",AtStop,B1Price*0.94,"B1"); } #B2진입 if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "B2" Then { B2Price = LatestEntryPrice(0); B2high = H; } if B2high > 0 and H > B2high Then B2high = H; if B2Price > 0 Then { ExitLong("B2-1",AtLimit,B2Price*1.12,"B2"); if B2high >= B2Price*1.01 Then ExitLong("B2-2",AtStop,B2high*0.93,"B2"); ExitLong("B2-3",AtStop,B2Price*0.94,"B2"); } #B3진입 if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "B3" Then { B3Price = LatestEntryPrice(0); B3high = H; } if B3high > 0 and H > B3high Then B3high = H; if B3Price > 0 Then { ExitLong("B3-1",AtLimit,B3Price*1.12,"B3"); if B3high >= B3Price*1.01 Then ExitLong("B3-2",AtStop,B3high*0.93,"B3"); ExitLong("B3-3",AtStop,B3Price*0.94,"B3"); } #B4진입 if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "B4" Then { B4Price = LatestEntryPrice(0); B4high = H; } if B4high > 0 and H > B4high Then B4high = H; if B4Price > 0 Then { ExitLong("B4-1",AtLimit,B4Price*1.12,"B4"); if B4high >= B4Price*1.01 Then ExitLong("B4-2",AtStop,B4high*0.93,"B4"); ExitLong("B4-3",AtStop,B4Price*0.94,"B4"); } #B5진입 if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "B5" Then { B5Price = LatestEntryPrice(0); B5high = H; } if B5high > 0 and H > B5high Then B5high = H; if B5Price > 0 Then { ExitLong("B5-1",AtLimit,B5Price*1.12,"B5"); if B5high >= B5Price*1.01 Then ExitLong("B5-2",AtStop,B5high*0.93,"B5"); ExitLong("B5-3",AtStop,B5Price*0.94,"B5"); } #B6진입 if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "B6" Then { B6Price = LatestEntryPrice(0); B6high = H; } if B6high > 0 and H > B6high Then B6high = H; if B6Price > 0 Then { ExitLong("B6-1",AtLimit,B6Price*1.12,"B6"); if B6high >= B6Price*1.01 Then ExitLong("B6-2",AtStop,B6high*0.93,"B6"); ExitLong("B6-3",AtStop,B6Price*0.94,"B6"); } } Else { A1Price = 0; A1high = 0; A2Price = 0; A2high = 0; A3Price = 0; A3high = 0; A4Price = 0; A4high = 0; A5Price = 0; A5high = 0; A6Price = 0; A6high = 0; B1Price = 0; B1high = 0; B2Price = 0; B2high = 0; B3Price = 0; B3high = 0; B4Price = 0; B4high = 0; B5Price = 0; B5high = 0; B6Price = 0; B6high = 0; }
프로필 이미지
말라
2020-12-14
649
글번호 144629
시스템