커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

수정 의뢰드립니다

안녕하세요! 아래 첨부 파일은 지난번에 만들어 주셔서 현재 잘 사용하고 있습니다! 만들어주신 파일을 매매에 도움을 받고자 수정을 좀 요청 드립니다! 항상 노고에 감사드립니다! <수정 요청 사항> 콜과 풋교차 차트에서 콜이나 풋이 2.5 가격선에서 봉이 완성되었을때 첨부파일 처럼 강세 약세가 나타나는 수식을 부탁드립니다! 예> 콜이 2.5 가격선에서 완성봉이 되면 강세 (붉은 바탕) 풋이 2.5 가격선에서 완성봉이 되면 약세 (파랑 바탕) * 혹시 2.5 가격선에서 완성봉이 되지 않고 터치만 되어 꼬리가 만들어진 상황에서도 강세 약세가 만들어질 수 있는지요? 만약 강세 약세가 만들어 질 수 있다면 수식에 같이 추가하고 싶습니다. #선물차트: Data1 #콜풋 교차차트: Data2~data3 #콜풋 교차차트: Data4~data5 #콜풋 교차차트: Data6~data7 #콜풋 교차차트: Data8~data9 #콜풋 교차차트: Data10~data11 #콜풋 교차차트: Data12~data13 #콜풋 교차차트: Data14~data15 #콜풋 교차차트: Data16~data17 -------------------------------------------------------- input : Period(14); Input : af(0.02), maxAF(0.2); var : DP(0),DM(0),sarv(0); DP = DiPlus(Period); DM = DiMinus(Period); sarv = SAR(af,maxAF); if dp > dm and C > sarv Then { plot1(99999999,"라인1"); plot2(0,"라인2"); } else if dp < dm and C < sarv Then { plot1(0,"라인1"); plot2(99999999,"라인2"); } Else { Plot1(0); plot2(0); }
프로필 이미지
qha71
2023-02-10
1019
글번호 166175
지표
답변완료

함수요청

안녕하세요? 국내선물 5분봉으로 일중거래를 하고자 합니다. 아래의 전략에 대해 스크립트 작성 요청드립니다. 20ma가 당일의 시가선을 돌파든 이탈이든 크로스를 했을 당시 그 크로스 시점의 주가가 더 크면 완성 익봉 시가 매수진입 20ma가 당일의 시가선을 돌파든 이탈이든 크로스를 했을 당시 그 크로스 시점의 주가가 더 작으면 매도진입 진입횟수는 n번으로 제어하되 15시 20분에는 강제청산하고자 합니다.
프로필 이미지
흰둥이아빠
2023-02-10
1208
글번호 166171
시스템
답변완료

수식 수정부탁드립니다

Input : Period(12), Period1(5), Period2(5); Input : 기준선1(15), 기준선2(25), 기준선3(30), 기준선4(75), 기준선5(80); Input : 고저기간(12), 변곡기간(3); var : StoK(0),StoD(0),StoKH(0),StoKL(0); StoK = StochasticsK(Period,Period1); StoD = StochasticsD(Period,Period1,Period2); StoKH = Highest(StoK,고저기간); StoKL = Lowest(StoK,고저기간); Plot1(StoK, "StoK"); Plot2(StoD, "StoD"); var : AA(False),BB(False),DH1(0),DL1(0); AA = StoK[2]<=StoK[1] && StoK[1]>StoK; //고점변곡 BB = StoK[2]>=StoK[1] && StoK[1]<StoK; //저점변곡 #상승후 하락전환시의 최근<변곡기간>중의 최고 StoK if AA == true then { DH1 = StoK[1]; #표시라인값 } #하락후 상승전환시의 최근<변곡기간>중의 최저 StoK if BB == true Then { DL1 = StoK[1]; #표시라인값 } if DH1 > 0 Then Plot3(DH1,"변곡고가선"); if DL1 > 0 Then Plot4(DL1,"변곡저가선"); 상기 수식으로 지표설정을 해보면 PLOT3과 4의 라인이 제대로 설정이 안되는데 어디에서 수식을 수정해야할까요? 즉 StoK의 변곡저점과 변곡고점마다 라인이 표시되어야하는데 대부분은 표시가 되는데요 어떤 변곡점에는 라인이 제대로 표시가 되지않은데 수정을 부탁드립니다
프로필 이미지
해피오
2023-02-10
940
글번호 166170
지표
답변완료

재문의드립니다.

1. 아래 2번에 만들어 주신 수식을 적용해 보면 3시 31분에 매수가 나가고 매도로 더 이상 진행이 되지 않았습니다. 그리고 같은 봉에서도 현재가가 수시로 변할 때 매수 매도가 변환되도록 부탁드립니다, 같은 봉에서는 매매가 3개 정도만 되도록 수행하도록 고쳐 주시면 나머지 추가 수정른 제가 수정해서 붙여 놓갰습니다. 2. 두번째 문의는 위의 수식은 특정 가격 기준으로 위 아래로 매수 매도가 반복되는 것인데요. 특정가격 기준으로 하락시 매도만 하고 다시 상승시 전에는 매수로 전환 했는데 전처럼 매수로 전환하지 않고 그냥 매도 청산만 하고 싶습니다. 즉 하락 배팅에만 올인하는 수식을 하나더 부탁드립니다. 안녕하세요 예스스탁입니다. 1 올리신 식은 시가에서 5틱 상승하면 매수 시가에서 5틱 하락하면 매도 봉완성시 다음봉 시가 청산입니다. 동일 내용이 반복해서 쓰여진 이유는 수식에서 하나의 Buy나 sell은 한봉에 한번만 동작합니다. 한봉에서 여러번 시가+5틱과 시가-5틱을 왔다 갓다 반복할때 여러번 진입하기 위해 동일내용을 여러번 작성해 나열한 것입니다. 2 input : ndate(20220209),ntime(90000); input : Price(324.00),ntick(5);; var1 = Price + PriceScale*ntick; var2 = Price - PriceScale*ntick; if sDate >= ndate and sTime > ntime Then Condition1 = true; if Condition1 == true Then { if H < var1 Then Buy("b",AtStop,var1); if L > var2 Then Sell("s",AtStop,var2); } 즐거운 하루되세요 > 종호 님이 쓴 글입니다. > 제목 : 문의드립니다. > 아래수식을 보아도 코딩 지식이 없어서 어떻게 매수 매도 되는 원리인지 해석을 할 수가 없네요. 식들이 어떤 의미로 매수가 되고 청산되며 다시 매도되고 청산되는 지를 알고 싶습니다. 그리고 제가 원하는 수식은 특정 날자와 시간과 특정 가격을 input 으로 하고요. 어떤 특정 가격 A 를 input 으로 임의로 정해주고 특정 날자와 시간 이후에 기다리고 있다가 아래나 위에 있던 현재가 상승 또는 하락하여 A 가격에 도달하면 비로서 매수 매도가 활성화 되어서 그 가격 A + PriceScale*5 을 현재가가 한번 위로 터치하면 매수하고 계속 위로 올라가면 놓아두고 다시 아래로 떨어져서 A - PriceScale*5 를 터치하면 매수청산과 더불어서 히방으로 1계약 매도합니다. 이런 식으로 계속 반복합니다. 현재가가 A + PriceScale*5 위로 도달시 매수 1게약 현재가가 A - PriceScale*5 아래로 도달시 매도 1게약 을 반복하는 것입니다. 아래 수식처럼 비슷하게 하면 ATSTOP 함수를 써서 가능할 것 같은데요. 아래 수식에서 ExitLong("bx",AtMarket); 이 왜 수식으로 게속 와야 하는 지 등를 모르겠어요. 제가 원하는 수식도 마저 부탁드립니다. 늘 수고하심에 감사드립니다. 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 NextBarOpen != C Then { Buy("b2",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx2",AtMarket); if NextBarOpen != C Then { Buy("b3",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx3",AtMarket); if NextBarOpen != C Then { Buy("b4",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx4",AtMarket); if NextBarOpen != C Then { Buy("b5",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx5",AtMarket); if NextBarOpen == C Then { Buy("b6",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx6",AtMarket); if NextBarOpen == C Then { Buy("b7",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx7",AtMarket); if NextBarOpen == C Then { Buy("b8",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx8",AtMarket); if NextBarOpen == C Then { Buy("b9",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx9",AtMarket); if NextBarOpen == C Then { Buy("b10",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx10",AtMarket); if NextBarOpen == C Then { Buy("b11",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx11",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); if NextBarOpen != C Then { Sell("s2",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx2",AtMarket); if NextBarOpen != C Then { Sell("s3",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx3",AtMarket); if NextBarOpen != C Then { Sell("s4",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx4",AtMarket); if NextBarOpen != C Then { Sell("s5",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx5",AtMarket); if NextBarOpen == C Then { Sell("s6",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx6",AtMarket); if NextBarOpen == C Then { Sell("s7",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx7",AtMarket); if NextBarOpen == C Then { Sell("s8",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx8",AtMarket); if NextBarOpen == C Then { Sell("s9",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx9",AtMarket); if NextBarOpen == C Then { Sell("s10",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx10",AtMarket); if NextBarOpen == C Then { Sell("s11",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx11",AtMarket); if NextBarSdate != sDate Then { if NextBarOpen != C Then { Buy("b12",AtStop,NextBarOpen+PriceScale*5); } } ExitLong("bx12",AtMarket); if NextBarOpen != C Then { Buy("b13",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx13",AtMarket); if NextBarOpen != C Then { Buy("b14",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx14",AtMarket); if NextBarOpen != C Then { Buy("b15",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx15",AtMarket); if NextBarOpen != C Then { Buy("b16",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx16",AtMarket); if NextBarOpen != C Then { Buy("b17",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx17",AtMarket); if NextBarOpen == C Then { Buy("b18",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx18",AtMarket); if NextBarOpen == C Then { Buy("b19",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx19",AtMarket); if NextBarOpen == C Then { Buy("b20",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx20",AtMarket); if NextBarOpen == C Then { Buy("b21",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx21",AtMarket); if NextBarOpen == C Then { Buy("b22",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx22",AtMarket); if NextBarOpen == C Then { Buy("b23",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx23",AtMarket); if NextBarSdate != sDate Then { if NextBarOpen != C Then { Sell("s12",AtStop,NextBarOpen-PriceScale*5); } } ExitShort("sx12",AtMarket); if NextBarOpen != C Then { Sell("s13",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx13",AtMarket); if NextBarOpen != C Then { Sell("s14",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx14",AtMarket); if NextBarOpen != C Then { Sell("s15",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx15",AtMarket); if NextBarOpen != C Then { Sell("s16",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx16",AtMarket); if NextBarOpen != C Then { Sell("s17",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx17",AtMarket); if NextBarOpen == C Then { Sell("s18",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx18",AtMarket); if NextBarOpen == C Then { Sell("s19",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx19",AtMarket); if NextBarOpen == C Then { Sell("s20",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx20",AtMarket); if NextBarOpen == C Then { Sell("s21",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx21",AtMarket); if NextBarOpen == C Then { Sell("s22",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx22",AtMarket); if NextBarOpen == C Then { Sell("s23",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx23",AtMarket); if NextBarSdate != sDate Then { if NextBarOpen != C Then { Buy("b24",AtStop,NextBarOpen+PriceScale*5); } } ExitLong("bx24",AtMarket); if NextBarOpen != C Then { Buy("b25",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx25",AtMarket); if NextBarOpen != C Then { Buy("b26",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx26",AtMarket); if NextBarOpen != C Then { Buy("b27",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx27",AtMarket); if NextBarOpen != C Then { Buy("b28",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx28",AtMarket); if NextBarOpen != C Then { Buy("b29",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx29",AtMarket); if NextBarOpen == C Then { Buy("b30",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx30",AtMarket); if NextBarOpen == C Then { Buy("b31",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx31",AtMarket); if NextBarOpen == C Then { Buy("b32",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx32",AtMarket); if NextBarOpen == C Then { Buy("b33",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx33",AtMarket); if NextBarOpen == C Then { Buy("b34",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx34",AtMarket); if NextBarOpen == C Then { Buy("b35",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx35",AtMarket); if NextBarSdate != sDate Then { if NextBarOpen != C Then { Sell("s24",AtStop,NextBarOpen-PriceScale*5); } } ExitShort("sx24",AtMarket); if NextBarOpen != C Then { Sell("s25",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx25",AtMarket); if NextBarOpen != C Then { Sell("s26",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx26",AtMarket); if NextBarOpen != C Then { Sell("s27",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx27",AtMarket); if NextBarOpen != C Then { Sell("s28",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx28",AtMarket); if NextBarOpen != C Then { Sell("s29",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx29",AtMarket); if NextBarOpen == C Then { Sell("s30",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx30",AtMarket); if NextBarOpen == C Then { Sell("s31",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx31",AtMarket); if NextBarOpen == C Then { Sell("s32",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx32",AtMarket); if NextBarOpen == C Then { Sell("s33",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx33",AtMarket); if NextBarOpen == C Then { Sell("s34",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx34",AtMarket); if NextBarOpen == C Then { Sell("s35",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx35",AtMarket);
프로필 이미지
종호
2023-02-10
944
글번호 166167
시스템
답변완료

문의 드립니다.

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
723
글번호 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
744
글번호 166165
시스템
답변완료

청산봉과 재진입

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

문의

이동평균선 5. 10. 20 일 선이 상승추세인 종목을 검색하고 싶습니다.
프로필 이미지
엉덩공주
2023-02-09
957
글번호 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
1381
글번호 166162
지표