커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

문의 드립니다.

1. 해외선물 전일잔고를 08시01분에 청산하는 수식어를 부탁드립니다. 2. input : starttime(180000),endtime(40000),n(30); var : Tcond(false),hh(0),h1(0),ll(0),l1(0); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } 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; IF Endtime <= starttime Then { SetStopEndofday(0); } } if Tcond == true Then { input : 익절틱수(0),손절틱수(0); if NextBarSdate != sDate Then { if NextBarOpen != C Then { Buy("b",AtStop,NextBarOpen+PriceScale*5); } } ExitLong("bx",AtMarket); if NextBarOpen == C Then { Buy("b1",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx1",AtMarket); if NextBarSdate != sDate Then { if NextBarOpen != C Then { Sell("s",AtStop,NextBarOpen-PriceScale*5); } } ExitShort("sx",AtMarket); if NextBarOpen == C Then { Sell("s1",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx1",AtMarket); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); } 1번 수식어를 2번에 넣을수있는지요. 미리 감사드립니다.
프로필 이미지
푸른
2023-02-10
690
글번호 166166
시스템
답변완료

부탁드립니다.

1. 보조차트1(1.00-1.30 사이 일때),보조차트2(1.70-2.00 사이 일때),보조차트3(2.60-3.00 사이 일때),보조차트4(3.60-4.00 사이 일때),보조차트5(4.50-5.10 사이 일때) 중에 2개 이상 양봉일 때에는 주차트에 매수표시를 그 반대이면 매도표시를 해 주세요 고맙습니다.
프로필 이미지
서태공
2023-02-09
709
글번호 166165
시스템
답변완료

청산봉과 재진입

1)청산봉과 스토캐스틱의 골드 크로스가 동시에 발생할때 골드에 진입하려면 산식을 어떻게 해야 하나요? 또한 실전에서 과연 체결이 다른경우와 비교시 효과적일까요? 차라리 골드 확인후 다음봉에서 진입하는것이 더 나을까요? 2)골드크로스가 0900에 발생할때 와 어제 마지막 발생한 스토캐스틱의 crossup과 그 전에 발생한 crossdown사이의 봉수를 count하는 방법은???
프로필 이미지
티끌
2023-02-10
947
글번호 166164
시스템
답변완료

문의

이동평균선 5. 10. 20 일 선이 상승추세인 종목을 검색하고 싶습니다.
프로필 이미지
엉덩공주
2023-02-09
919
글번호 166163
종목검색
답변완료

행복; 지표식 작성 바랍니다

한국의 금융산업 발전을 위해 불철주야 애쓰시는 귀하의 노고를 높이 평가합니다 지표식 관련입니다 <질문> - 2023년 1월 25일부터 바뀌는 호가체계로 인하여 상한가를 어떻게 표시해야 하는가에 대한 질문과 답변을 보았습니다 - 2023년 1월 19일에 있는 답변이 <아래>와 같습니다 - 근데 오류가 있는 것 같습니다 - if close == 상한가 then plot1(close); // 막대그래프로 표시 - 이 때 2023년 2월 8일의 상한가 종목인 케이피엠테크(487원), 한일진공(550원), 텔콘RF제약(1,544원)과 2023년 2월 9일의 상한가 종목인 웅진(1898원)에서는 표시가 되지 않고 있습니다 - 확인 부탁드립니다 - 수고하십시요^^ ###################< 아래 >############################## ============<변경된 상한가 시작>==================================== var : 상한가(0), UpLimit(0); var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(0); if date >= 19981207 then { if date < 20050328 && CodeCategory() == 2 then UpLimit = (BP[0] * 1.12); Else if date >= 20050328 and date < 20150615 Then UpLimit = (BP[0] * 1.15); Else UpLimit = (BP[0] * 1.30); if date >= 20230125 Then { up1 = int(UpLimit/1000+0.00001)*1000; up2 = int(UpLimit/500+0.00001)*500; up3 = int(UpLimit/100+0.00001)*100; up4 = int(UpLimit/50+0.00001)*50; up5 = int(UpLimit/10+0.00001)*10; up6 = int(UpLimit/5+0.00001)*5; up7 = int(UpLimit/1+0.00001)*1; } Else { if CodeCategory() == 2 then { if date >= 20030721 then { up1 = int(UpLimit/100+0.00001)*100; up2 = int(UpLimit/100+0.00001)*100; up3 = int(UpLimit/100+0.00001)*100; up4 = int(UpLimit/50+0.00001)*50; up5 = int(UpLimit/10+0.00001)*10; up6 = int(UpLimit/5+0.00001)*5; up7 = int(UpLimit/1+0.00001)*1; } else { up1 = int(UpLimit/1000+0.00001)*1000; up2 = int(UpLimit/500+0.00001)*500; up3 = int(UpLimit/100+0.00001)*100; up4 = int(UpLimit/50+0.00001)*50; up5 = int(UpLimit/10+0.00001)*10; up6 = int(UpLimit/10+0.00001)*10; up7 = int(UpLimit/1+0.00001)*1; } } Else { up1 = int(UpLimit/1000+0.00001)*1000; up2 = int(UpLimit/500+0.00001)*500; up3 = int(UpLimit/100+0.00001)*100; up4 = int(UpLimit/50+0.00001)*50; up5 = int(UpLimit/10+0.00001)*10; up6 = int(UpLimit/5+0.00001)*5; up7 = int(UpLimit/1+0.00001)*1; } } if CodeCategory() == 1 || CodeCategory() == 2 then { if date >= 20230125 Then { If BP >= 500000 Then 상한가 = up1; Else If BP >= 200000 Then 상한가 = iff(up2>=500000, up1, up2); Else If BP >= 50000 Then 상한가 = iff(up3>=200000, up2, up3); Else If BP >= 20000 Then 상한가 = iff(up4>=50000, up3, up4); Else If BP >= 5000 Then 상한가 = iff(up5>=20000, up4, up5); Else If BP >= 2000 Then 상한가 = iff(up5>=5000, up5, up6); Else 상한가 = iff(up6>=2000, up6, up6); } Else { if sdate < 20101004 Then { If BP >= 500000 Then 상한가 = up1; Else If BP >= 100000 Then 상한가 = iff(up2>=500000, up1, up2); Else If BP >= 50000 Then 상한가 = iff(up3>=100000, up2, up3); Else If BP >= 10000 Then 상한가 = iff(up4>=50000, up3, up4); Else If BP >= 5000 Then 상한가 = iff(up5>=10000, up4, up5); Else If BP >= 1000 Then 상한가 = iff(up5>=5000, up5, up6); Else 상한가 = iff(up6>=1000, up6, up6); } Else { If BP >= 500000 Then 상한가 = up1; Else If BP >= 100000 Then 상한가 = iff(up2>=500000, up1, up2); Else If BP >= 50000 Then 상한가 = iff(up3>=100000, up2, up3); Else If BP >= 10000 Then 상한가 = iff(up4>=50000, up3, up4); Else If BP >= 5000 Then 상한가 = iff(up5>=10000, up4, up5); Else If BP >= 1000 Then 상한가 = iff(up5>=5000, up5, up6); Else 상한가 = iff(up6>=1000, up6, up7); } } } else if CodeCategory() == 8 || CodeCategory() == 9 then { // ETF 상한가 = up6; } } ============<변경된 상한가 끝>====================================
프로필 이미지
행복한가방
2023-02-09
1336
글번호 166162
지표
답변완료

문의드립니다.

지그재그차트에서 상단고점 꼭지점 수평라인은 유지하고 하단 저점 변곡점 수평라인은 삭제 요청합니다. Input:전환비율(5); Var:j(0),jj(0),HH(0),LL(0),hiBar(0),loBar(0),최종꼭지점(""),처리구분(""), TL1(0),Text1(0),ADXV1(0); Array:고[10,4](0),저[10,4](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] * (1 + (전환비율/100)) < HH and hiBar == 0; Condition2 = 고[1,1] * (1 - (전환비율/100)) > 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; TL1 = TL_New(저[1,3],저[1,4],저[1,1],고[1,3],고[1,4],고[1,1]); TL_SetSize(TL1,1); TL_SetColor(TL1,RED); } Else If 고[1,1] < HH[hiBar] Then// 1번 고점보다 높은 고가 출현 { 고[1,1] = HH[hiBar]; 고[1,2] = Index - hiBar; 고[1,3] = sDate[hiBar]; 고[1,4] = sTime[hiBar]; hiBar= -1; loBar= -1; TL_SetEnd(TL1,고[1,3],고[1,4],고[1,1]); } 최종꼭지점 = "고점"; } 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; TL1 = TL_New(고[1,3],고[1,4],고[1,1],저[1,3],저[1,4],저[1,1]); TL_SetSize(TL1,1); TL_SetColor(TL1,BLUE); } Else 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(TL1,저[1,3],저[1,4],저[1,1]); } 최종꼭지점 = "저점"; }
프로필 이미지
구호리
2023-02-10
1269
글번호 166161
지표
답변완료

문의드립니다

30일 기준 각각 기하이동평균, 삼각이동평균, 평탄화 이동평균 의 수식을 구하고 싶습니다
프로필 이미지
kns
2023-02-09
953
글번호 166160
지표
답변완료

문의드립니다

30일 기준 각각 기하이동평균, 삼각이동평균, 평탄화 이동평균 의 수식을 구하고 싶습니다
프로필 이미지
kns
2023-02-09
723
글번호 166159
지표
답변완료

지표식 문의드립니다.

매번 성실한 답변 감사드립니다. 분봉기준입니다. 당일 최고가가 전일종가 대비 15% 이상이고 슬로우 스톡캐스틱이 20 이상일때 스톡캐스틱 슬로우가 20 이하가 되기 위해 필요한 현재가 라인을 긋고 싶습니다. 당일 최고가가 15%가 안될때는 전일 종가를, 스톡캐스틱이 20 이하일때는 직전 값을 사용합니다. 스톡캐스틱 수식을 역산하여 현재가 값을 구하는게 어려워서 도움을 청합니다. 감사합니다.
프로필 이미지
이글맨
2023-02-09
795
글번호 166158
지표
답변완료

문의드립니다~

일차트나 분차트에 주봉 기준으로 계산된 디마크선이 나오게 하고 싶습니다~ 화면에 수치도 보이게 하고 싶습니다~ 감사합니다~
프로필 이미지
유산균
2023-02-09
781
글번호 166157
지표