커뮤니티

상한가 검색 구현하고 싶은데요

프로필 이미지
기다리셈
2010-07-07 14:25:08
734
글번호 30804
답변완료
수식뿐만 아니라 가격에 따라 가격 제한폭이 계산돼는 공식도 알려주심 감사하겠습니다. 6610원 14.69% 7600원 14.98% 8740원 15.00% 10050원 14.99% 한국화장품 제조 상한가 쳤을시의 가격과 전일대비 퍼센트
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2010-07-07 18:44:31

안녕하세요 예스스탁입니다. var : 상한가(0), UpLimit(0); var : aaa(0), bbb(0), ccc(0), ddd(0), eee(0),fff(0); if date >= 19981207 then { if date < 20050328 && CodeCategory() == 2 then UpLimit = (BP[0] * 1.12); Else UpLimit = (BP[0] * 1.15); if CodeCategory() == 2 then { if date >= 20030721 then { aaa = int(UpLimit/100+0.00001)*100; bbb = int(UpLimit/100+0.00001)*100; ccc = int(UpLimit/100+0.00001)*100; ddd = int(UpLimit/50+0.00001)*50; eee = int(UpLimit/10+0.00001)*10; fff = int(UpLimit/5+0.00001)*5; } else { aaa = int(UpLimit/1000+0.00001)*1000; bbb = int(UpLimit/500+0.00001)*500; ccc = int(UpLimit/100+0.00001)*100; ddd = int(UpLimit/50+0.00001)*50; eee = int(UpLimit/10+0.00001)*10; fff = int(UpLimit/10+0.00001)*10; } } Else { aaa = int(UpLimit/1000+0.00001)*1000; bbb = int(UpLimit/500+0.00001)*500; ccc = int(UpLimit/100+0.00001)*100; ddd = int(UpLimit/50+0.00001)*50; eee = int(UpLimit/10+0.00001)*10; fff = int(UpLimit/5+0.00001)*5; } if CodeCategory() == 1 || CodeCategory() == 2 then { If BP >= 500000 Then 상한가 = aaa; Else If BP >= 100000 Then 상한가 = iff(bbb>=500000, aaa, bbb); Else If BP >= 50000 Then 상한가 = iff(ccc>=100000, bbb, ccc); Else If BP >= 10000 Then 상한가 = iff(ddd>=50000, ccc, ddd); Else If BP >= 5000 Then 상한가 = iff(eee>=10000, ddd, eee); Else 상한가 = iff(fff>=5000, eee, fff); } else if CodeCategory() == 8 || CodeCategory() == 9 then { // ETF 상한가 = fff; } } if H >= 상한가 Then find(1); 즐거운 하루되세요 > 기다리셈 님이 쓴 글입니다. > 제목 : 상한가 검색 구현하고 싶은데요 > 수식뿐만 아니라 가격에 따라 가격 제한폭이 계산돼는 공식도 알려주심 감사하겠습니다. 6610원 14.69% 7600원 14.98% 8740원 15.00% 10050원 14.99% 한국화장품 제조 상한가 쳤을시의 가격과 전일대비 퍼센트