커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

수식 질문합니다.

안녕하세요. 아래 수식 검증 부탁드립니다. 관련 없는 종목들이 많이 떠서요. 감사합니다. 그리고 85196 추가질문 답변 부탁드립니다. -------------------------------------------------------------------- input: nbar(10); 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, up7); } 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; } } var : S(0),ii(0); if H >= 상한가 Then { S = (C+C[1])/2; ii = Index; } if ii > 0 and Index <= ii+nbar and CrossDown(C,S) Then Find(1);
프로필 이미지
트더
2024-01-05
798
글번호 175456
종목검색
답변완료

수식 질문합니다.

안녕하세요. 아래 수식에서 이평선골과 마루의 이격을 세분해서 적용하고 싶은데요. 이격이 30-50% 일 때 골과 마루의 중심 돌파 50-120% 일 때 골과 마루의 1/4선 또는 중심 돌파 120% 이상 일 때 골과 마루의 1/16 또는 1/8 또는 1/4 또는 1/2 돌파 하는 종목을 검색하고 싶습니다. 감사합니다. --------------------------------------------- input : P(240),Nper(30); var : T(0),고점(0),저점(0); var1 = ma(C,240); if var1 > var1[1] Then T = 1; if var1 < var1[1] Then T = -1; #고점(이평하락전환) if T == -1 and T != T[1] Then { value1 = var1[1]; value11 = value1[1]; if value1 > value11 Then 고점 = value1; } #저점(이평상승전환) if T == 1 and T != T[1] Then { value2 = var1[1]; Value22 = Value2[1]; if Value2 < Value22 Then 저점 = Value2; } if 고점 > 0 and 저점 > 0 and 고점 >= 저점*(1+Nper/100) and C > O and (CrossUp(c,고점) or CrossUp(C,(고점+저점)/2)) Then Find(1);
프로필 이미지
트더
2024-01-05
552
글번호 175455
종목검색
답변완료

수식문의드립니다.

안녕하세요. 수식 부탁드립니다. SetStopProfittarget(25*PriceScale,PointStop); SetStopLoss(10*PriceScale,PointStop); 위의 해당 코딩을 을 틱수가 아니라 진입가의 25% 수익이면 익절 진입가의 10% 손실이면 손절 로 바꾸어 코딩해주시면 감사하겠습니다. 감사합니다. 좋은 주말되세요 ~
프로필 이미지
하늘선물
2024-01-05
606
글번호 175454
시스템
답변완료

문의드립니다

A = '이번봉 종가 - 이전봉 종가' 의 절대값 최근 n봉 동안의 이 A값들을 모아서 표준편차 & 이평선을 구해서, 종가로 만드는 일반적인 볼린저밴드가 아닌, 이 A값으로 만드는 볼린저밴드를 만들어보려고 하는데 막히는 부분이 있어 요청을 좀 드립니다 ㅠ
프로필 이미지
루라라라
2024-01-05
691
글번호 175453
지표
답변완료

부탁드립니다

1. 종가 기준으로 매도호가 잔량이 매수호가 잔량보다 많을 때 파란색으로, 종가 기준으로 매수호가 잔량이 매도호가 잔량보다 많을 때 빨강색으로 구현해 주세요 2. 종가가 양봉이면서 체결량이 일시에 5개 이상 있었을 경우 빨강색으로, 종가가 음봉이면서 체결량이 일시에 5개 이상 있었을 경우 파란색으로 구현해 주세요 고맙습니다.
프로필 이미지
서태공
2024-01-05
602
글번호 175452
강조
답변완료

부틱드립니다

수고하십니다 아래수식을 예스수식으로 변경 부탁드립니다 TT=(time/100)%100%분; if((time >= 210000 and time <= 240000 ) or ( time <= 070000) and TT < TT(1),O*1,0) 지표조건설정 분 60 라인설정 막대
프로필 이미지
파생돌이
2024-01-05
744
글번호 175451
지표

백성현 님에 의해서 삭제되었습니다.

프로필 이미지
백성현
2024-01-05
11
글번호 175450
종목검색

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

프로필 이미지
hakona
2024-01-12
73
글번호 175449
지표
답변완료

data2 인식 시간

input : N(50),N1(5),per(10); var : TX1(0),TX2(0),cnt(0),box(0),box1(0); var : TL1(0),TL2(0),TL3(0),TL4(0),TL5(0),TL6(0),TL7(0),TL8(0); Plot1(Data2(c)); For cnt = 0 to 49 { TL_Delete(TL1[cnt]); TL_Delete(TL2[cnt]); TL_Delete(TL3[cnt]); TL_Delete(TL4[cnt]); TL_Delete(TL5[cnt]); TL_Delete(TL6[cnt]); TL_Delete(TL7[cnt]); TL_Delete(TL8[cnt]); Text_Delete(TX1[cnt]); Text_Delete(TX2[cnt]); TL_Delete(Box[cnt]); TL_Delete(Box1[cnt]); } if Data2(sTime >= 85000) Then { TL1 = TL_New_Self(sDate,sTime,data2(highest(H,N)),NextBarSdate,NextBarStime,data2(highest(H,N))); TL2 = TL_New_Self(sDate,sTime,data2(lowest(L,N)),NextBarSdate,NextBarStime,data2(lowest(L,N))); TL_SetColor(TL1,Red); TL_SetColor(TL2,Blue); TL_SetSize(TL1,1); TL_SetSize(TL2,1); TL_SetExtLeft(TL1,true); TL_SetExtLeft(TL2,true); TL3 = TL_New_Self(Data2(sDate[NthHighestBar(1,H,N)]),Data2(stime[NthhighestBar(1,H,N)]),-9999,Data2(sDate[NthHighestBar(1,H,N)]),Data2(stime[NthhighestBar(1,H,N)]),9999); TL4 = TL_New_Self(Data2(sDate[NthlowestBar(1,L,N)]),Data2(stime[NthlowestBar(1,L,N)]),-9999,Data2(sDate[NthlowestBar(1,L,N)]),Data2(stime[NthlowestBar(1,L,N)]),9999); TL_SetColor(TL3,Pink); TL_SetColor(TL4,Gold); TL_SetSize(TL3,5); TL_SetSize(TL4,2); TL5 = TL_New(Data2(sDate[NthHighestBar(1,H,N)]),Data2(stime[NthhighestBar(1,H,N)]),-9999,Data2(sDate[NthHighestBar(1,H,N)]),Data2(stime[NthhighestBar(1,H,N)]),9999); TL6 = TL_New(Data2(sDate[NthlowestBar(1,L,N)]),Data2(stime[NthlowestBar(1,L,N)]),-9999,Data2(sDate[NthlowestBar(1,L,N)]),Data2(stime[NthlowestBar(1,L,N)]),9999); TL_SetColor(TL5,Pink); TL_SetColor(TL6,Gold); TL_SetSize(TL5,5); TL_SetSize(TL6,2); TL7 = TL_New_Self(sDate,sTime,data2(lowest(L*1.1,N)),NextBarSdate,NextBarStime,data2(lowest(L*1.1,N))); TL_SetColor(TL7,Orange); TL_SetSize(TL7,1); TL_SetExtLeft(TL7,true); TL8 = TL_New_Self(sDate,sTime,data2(lowest(L*1.2,N)),NextBarSdate,NextBarStime,data2(lowest(L*1.2,N))); TL_SetColor(TL8,Green); TL_SetSize(TL8,1); TL_SetExtLeft(TL8,true); TX1 = Text_New_Self(Data2(sDate[NthHighestBar(1,H,N)]),Data2(stime[NthhighestBar(1,H,N)]),Data2(highest(H+PriceScale*1,N)),"■"); TX2 = Text_New_Self(Data2(sDate[NthLowestBar(1,L,N)]),Data2(stime[NthLowestBar(1,L,N)]),Data2(Lowest(L-PriceScale*1,N)),"■"); Text_SetStyle(TX1,2,1); Text_SetStyle(TX2,2,0); Text_SetColor(TX1,Blue); Text_SetColor(TX2,Magenta); Text_SetSize(tx1,40); Text_SetSize(tx2,40); box1 = Box_New(Data2(sDate[NthlowestBar(1,L,N)+N1]),Data2(stime[NthlowestBar(1,L,N)+N1]),9999, Data2(sDate[NthlowestBar(1,L,N)]),Data2(stime[NthlowestBar(1,L,N)]),-9999); Box_SetColor(box1,Blue); Box_SetFill(box1,true,30); box = Box_New_Self(Data2(sDate[NthlowestBar(1,L,N)+N1]),Data2(stime[NthlowestBar(1,L,N)+N1]),9999, Data2(sDate[NthlowestBar(1,L,N)]),Data2(stime[NthlowestBar(1,L,N)]),-9999); Box_SetColor(box,Blue); Box_SetFill(box,true,25); var : box3(0),cond(False),H2(0),L2(0); if data2(CrossUp(L,Lowest(L,N)*(1+per/100))) Then { Box_Delete(box3); cond = true; H2 = Data2(H); L2 = Data2(lowest(L,N)*(1+per/100)); box3 = Box_New_Self(sDate[100],sTime[100],L2,Sdate,Stime,H2); Box_SetColor(box3,Lime); Box_SetFill(box3,true,60); } Else { if cond == true Then { if data2(H) > H2 Then H2 =Data2(H); Box_SetEnd(box3,sDate,sTime,H2); if Data2(l < lowest(L,N)*(1+per/100)) Then Box_Delete(box3); } } } 85239 재문의 10시에 10시 5분을 시작 시간으로 설정하고 기다리면 10시 5분에 표시는 되는데, 50봉 중의 최저점 조건 때문에 이전 50봉까지 체크해서 이전 저점을 표시해줍니다. 직전 50봉 이내에 저점이 있더라도, 시작은 무조건 설정한 10시 5분봉을 최저점으로 시작하고 싶습니다. 설정한 시간 이전봉을 모두 무시할 수 있게 수정 부탁드립니다.
프로필 이미지
고성
2024-01-04
823
글번호 175447
지표
답변완료

시스템식 부탁드립니다.

항상 도움 주셔서 감사합니다. 종목 : 해외선물 차트 : 1분봉 아래 시스템식 수정 부탁드립니다. 제가 요청 드리는 것은 매수 진입 간격이 고정이 아니라 특정 배수 간격으로 진입을 하고 싶습니다. input : Pst(1); // 매수,매도 input : gap(10), pt(20), multi(0.7); var : vol(0),v1(0); value1 = gap/PointValue; //최초 진입간격 value2 = pt/PointValue; if pst == 1 Then { if MarketPosition == 0 and TotalTrades == TotalTrades[1] Then { vol = 1; Buy("b",OnClose,Def,vol); } if MarketPosition == 1 Then { if CurrentContracts > CurrentContracts[1] Then v1 = CurrentContracts-CurrentContracts[1]; vol = Round(v1+v1*multi,0); Buy("bb",AtLimit,EntryPrice(0)-PriceScale*(value1*MaxEntries),vol); # 진입가격을 value1의 고정간격이 아닌 진입할때마다 0.5배식 증가하고 싶습니다. 예) 10 -> 15 -> 23 -> 35 -> 53 -> 80 -> 120 ...(첨부엑셀 참고 요망) ExitLong("bp",AtLimit,AvgEntryPrice+PriceScale*Value2); } } #--------------------------------------- NO 최초진입간격 배수 진입간격 #--------------------------------------- 1 10 0.5 10 2 15 0.5 15 3 22.5 0.5 23 4 34.5 0.5 35 5 52.5 0.5 53 6 79.5 0.5 80 7 120 0.5 120 8 180 0.5 180 9 270 0.5 270 10 405 0.5 405 11 607.5 0.5 608 12 912 0.5 912 #--------------------------------------- 감사합니다.
프로필 이미지
양치기
2024-01-04
941
글번호 175441
시스템