커뮤니티

또 질문드립니다

프로필 이미지
hana1092
2022-05-06 12:18:13
1226
글번호 158630
답변완료
또 문의드립니다..! 함수 1 1. 거래대금 1000억이상 양봉 캔들이 생기고 다음날부터 (이때는 이평선 20일선 아래 있어도됨) 2. 이평선 20일선 위에 있는 조건으로 3. 엔벨로프 Period 5 Percent 5 의 지지선에 닿으면 매수 4. 매수가대비 4.5% 상승즉시 매도 5. 매수가가 이평선 5일선과 같아지면 손절 함수 2 1. 상한가 양봉 캔들이 생기고 다음날부터 (이때는 이평선 20일선 아래 있어도됨) 2. 이평선 20일선 위에 있는 조건으로 3. 엔벨로프 Period 3 Percent 3 의 지지선에 닿으면 매수 4. 매수가대비 3.8% 상승즉시 매도 5. 매수한날의 저점을 깨면 손절
사용자 함수
답변 3
프로필 이미지

예스스탁 예스스탁 답변

2022-05-06 15:18:25

안녕하세요 예스스탁입니다. 1 input : P(20),Period(3),Percent(3); var : DM(0),DM1(0),cnt(0); var : sum(0),mav(0),mid(0),dnv(0); #20일 이평 sum = 0; For cnt = 0 to P-1 { sum = sum + DayClose(cnt); } mav = sum/P; #엔벨로프 중단 하단 mid = ma(C,Period); dnv = EnvelopeDown(Period,Percent); #일간 거래대금 if Bdate != Bdate[1] Then { DM = 0; DM1 = DM; if DM1 >= 100000000000 and DayClose(1) > DayOpen(1) Then Condition1 = true; } DM = DM+M; if Condition1 == true then { if C > mav and L > dnv Then Buy("b",AtLimit,dnv); } if MarketPosition == 1 Then ExitLong("bx",AtLimit,mid); SetStopProfittarget(4.5,PercentStop); 2 input : P(20),Period(3),Percent(3); var : cnt(0),sum(0),mav(0),mid(0),dnv(0); 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 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 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; } } #20일 이평 sum = 0; For cnt = 0 to P-1 { sum = sum + DayClose(cnt); } mav = sum/P; #엔벨로프 중단/하단 mid = ma(C,Period); dnv = EnvelopeDown(Period,Percent); if Bdate != Bdate[1] Then { if DayHigh(1) >= 상한가[1] and DayClose(1) > DayOpen(1) Then Condition1 = true; } if Condition1 == true then { if C > mav and L > dnv Then Buy("b",AtLimit,dnv); } if MarketPosition == 1 Then { if MarketPosition[1] != 1 Then value1 = DayLow; ExitLong("bx",AtLimit,value1); } SetStopProfittarget(3.8,PercentStop); 즐거운 하루되세요 > hana1092 님이 쓴 글입니다. > 제목 : 또 질문드립니다 > 또 문의드립니다..! 함수 1 1. 거래대금 1000억이상 양봉 캔들이 생기고 다음날부터 (이때는 이평선 20일선 아래 있어도됨) 2. 이평선 20일선 위에 있는 조건으로 3. 엔벨로프 Period 5 Percent 5 의 지지선에 닿으면 매수 4. 매수가대비 4.5% 상승즉시 매도 5. 매수가가 이평선 5일선과 같아지면 손절 함수 2 1. 상한가 양봉 캔들이 생기고 다음날부터 (이때는 이평선 20일선 아래 있어도됨) 2. 이평선 20일선 위에 있는 조건으로 3. 엔벨로프 Period 3 Percent 3 의 지지선에 닿으면 매수 4. 매수가대비 3.8% 상승즉시 매도 5. 매수한날의 저점을 깨면 손절
프로필 이미지

hana1092

2022-05-07 10:40:56

정말 감사합니다. 1번식은 아무것도 뜨질 않습니다 ㅠㅠ 뭐가 문제일지.. 도와주세요 ㅜㅜ 다시 정리해서 재요청 드립니다. 함수 2식을 적용하다보면, 모든 조건이 맞는데도 매수하고자 하는 선에 닿아도 매수가 안되는 경우가 있더라구요.. 이 부분도 요청드립니다.. (첫번째 사진의 빨간 박스 참고) 함수 1 1. 거래대금 1000억이상 27%이상의 양봉 캔들이 생기고 다음날부터 1회만 매수매도 가능 * 같은 조건의 양봉캔들이 생기면 또 다시 1회 매수매도 가능 **두번째 사진을 보시면 1개의 장대양봉 출현후 매수 매도가 여러번 진행되었습니다. 이부분을 장대양봉을 기준으로 1회, 또 장대양봉이 나오면 1회 이런식으로 진행하고자 합니다.. 2. 일봉상 이평선 20일선 위에 있는 조건으로 일봉상 엔벨로프 Period 5 Percent 5 의 지지선에 닿으면 매수 4. 매수가대비 4.5% 상승즉시 매도 5. 매수가가 이평선 5일선과 같아지면 손절 함수 2 1. 거래대금 1000억이상 27%이상의 양봉 캔들이 생기고 다음날부터 1회만 매수매도 가능 * 같은 조건의 양봉캔들이 생기면 또 다시 1회 매수매도 가능 ** 사진에 보시면 1개의 장대양봉 출현후 매수 매도가 여러번 진행되었습니다. 이부분을 장대양봉을 기준으로 1회, 또 장대양봉이 나오면 1회 이런식으로 진행하고자 합니다.. (위와 같습니다) 2. 일봉상 이평선 20일선 위에 있는 조건으로 일봉상 엔벨로프 Period 3 Percent 3 의 지지선에 닿으면 매수 4. 매수가대비 3.5% 상승즉시 매도 5. 매수한날의 저점을 깨면 손절 이렇게도 가능할까요..? 매번 정말 감사드립니다.. > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 또 질문드립니다 > 안녕하세요 예스스탁입니다. 1 input : P(20),Period(3),Percent(3); var : DM(0),DM1(0),cnt(0); var : sum(0),mav(0),mid(0),dnv(0); #20일 이평 sum = 0; For cnt = 0 to P-1 { sum = sum + DayClose(cnt); } mav = sum/P; #엔벨로프 중단 하단 mid = ma(C,Period); dnv = EnvelopeDown(Period,Percent); #일간 거래대금 if Bdate != Bdate[1] Then { DM = 0; DM1 = DM; if DM1 >= 100000000000 and DayClose(1) > DayOpen(1) Then Condition1 = true; } DM = DM+M; if Condition1 == true then { if C > mav and L > dnv Then Buy("b",AtLimit,dnv); } if MarketPosition == 1 Then ExitLong("bx",AtLimit,mid); SetStopProfittarget(4.5,PercentStop); 2 input : P(20),Period(3),Percent(3); var : cnt(0),sum(0),mav(0),mid(0),dnv(0); 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 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 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; } } #20일 이평 sum = 0; For cnt = 0 to P-1 { sum = sum + DayClose(cnt); } mav = sum/P; #엔벨로프 중단/하단 mid = ma(C,Period); dnv = EnvelopeDown(Period,Percent); if Bdate != Bdate[1] Then { if DayHigh(1) >= 상한가[1] and DayClose(1) > DayOpen(1) Then Condition1 = true; } if Condition1 == true then { if C > mav and L > dnv Then Buy("b",AtLimit,dnv); } if MarketPosition == 1 Then { if MarketPosition[1] != 1 Then value1 = DayLow; ExitLong("bx",AtLimit,value1); } SetStopProfittarget(3.8,PercentStop); 즐거운 하루되세요 > hana1092 님이 쓴 글입니다. > 제목 : 또 질문드립니다 > 또 문의드립니다..! 함수 1 1. 거래대금 1000억이상 양봉 캔들이 생기고 다음날부터 (이때는 이평선 20일선 아래 있어도됨) 2. 이평선 20일선 위에 있는 조건으로 3. 엔벨로프 Period 5 Percent 5 의 지지선에 닿으면 매수 4. 매수가대비 4.5% 상승즉시 매도 5. 매수가가 이평선 5일선과 같아지면 손절 함수 2 1. 상한가 양봉 캔들이 생기고 다음날부터 (이때는 이평선 20일선 아래 있어도됨) 2. 이평선 20일선 위에 있는 조건으로 3. 엔벨로프 Period 3 Percent 3 의 지지선에 닿으면 매수 4. 매수가대비 3.8% 상승즉시 매도 5. 매수한날의 저점을 깨면 손절
프로필 이미지

예스스탁 예스스탁 답변

2022-05-09 09:55:42

안녕하세요 예스스탁입니다. 질문하신 내용에 일봉이평과 주기가 없는 엔벨로프가 언급되어 있으셔서 분봉에서 일봉이평 계산해 적용하는 내용으로 작성이 되어 있었습니다. 일봉차트에 적용하시므로 해당 내용에 맞게 수정해 드립니다. 1번과 2번은 기존식을 수정한 내용이고 3번과 4번은 새로 올리신 내용으로 작성한 식입니다. 참고로 랭귀지는 현재봉 미완성시에 현재가와 현재봉의 특정값을 비교해서 즉시 신호는 발생하지 못합니다. 봉미완성시에 특정가격을 터치해서 신호가 발생하는 내용은 미완성봉의 현재가와 직전봉에서 확정된 값과 비교해서만 가능합니다. 즉 현재봉 미완성시에 현재가가 현재봉의 지지선값을 터치하면 매수는 불가능하고 현재봉 미완성시에 현재개가 전봉기준 지지선값보다 같거나 작으면 매수는 가능합니다. 아래 진입과 청산은 미완성봉에서 발생하는데 위 기준으로 발생합니다. 1번 input : P(20),Period(3),Percent(3); var : EE(0),E1(0); var : mav(0),mid(0),dnv(0); mav = ma(C,P); mid = ma(C,Period); dnv = EnvelopeDown(Period,Percent); if MarketPosition == 0 Then EE = TotalTrades; Else EE = TotalTrades+1; if M >= 100000000000 and C > O Then { E1 = EE; Condition1 = true; } if Condition1 == true and EE < E1+1 and C > mav Then Buy("b",AtLimit,dnv); if MarketPosition == 1 Then ExitLong("bx",AtLimit,mid); SetStopProfittarget(4.5,PercentStop); 2번 input : P(20),Period(3),Percent(3); var : mav(0),mid(0),dnv(0),EE(0),E1(0); 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 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 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; } } mav = ma(C,P); mid = ma(C,Period); dnv = EnvelopeDown(Period,Percent); if MarketPosition == 0 Then EE = TotalTrades; Else EE = TotalTrades+1; if H >= 상한가 and C > O Then { Condition1 = true; E1 = EE; } if MarketPosition == 0 and Condition1 == true and EE < E1+1 and C > mav Then Buy("b",AtLimit,dnv); if MarketPosition == 1 Then ExitLong("bx2",AtStop,L[BarsSinceEntry]); SetStopProfittarget(3.8,PercentStop); 3 input : P(20),Period(5),Percent(5); var : mav(0),mid(0),dnv(0),E1(0),EE(0),T(0); mav = ma(C,P); mid = ma(C,Period); dnv = EnvelopeDown(Period,Percent); if MarketPosition == 0 Then EE = TotalTrades; Else EE = TotalTrades+1; if M >= 10000000000 and C >= O*1.27 Then { Condition1 = true; E1 = EE; } if Condition1 == true and EE < E1+1 and C > mav and MarketPosition == 0 Then { Buy("b",AtLimit,dnv); ExitLong("bx1",AtLimit,mid); } if MarketPosition == 1 Then ExitLong("bx2",AtLimit,mid); SetStopProfittarget(4.5,PercentStop); 4 input : P(20),Period(3),Percent(3); var : mav(0),mid(0),dnv(0),E1(0),EE(0),T(0); mav = ma(C,P); mid = ma(C,Period); dnv = EnvelopeDown(Period,Percent); if MarketPosition == 0 Then EE = TotalTrades; Else EE = TotalTrades+1; if M >= 10000000000 and C >= O*1.27 Then { Condition1 = true; E1 = EE; } if Condition1 == true and EE < E1+1 and C > mav and MarketPosition == 0 Then Buy("b",AtLimit,dnv); if MarketPosition == 1 Then ExitLong("bx2",AtStop,L[BarsSinceEntry]); SetStopProfittarget(3.5,PercentStop); 즐거운 하루되세요 > hana1092 님이 쓴 글입니다. > 제목 : Re : Re : 또 질문드립니다 > 정말 감사합니다. 1번식은 아무것도 뜨질 않습니다 ㅠㅠ 뭐가 문제일지.. 도와주세요 ㅜㅜ 다시 정리해서 재요청 드립니다. 함수 2식을 적용하다보면, 모든 조건이 맞는데도 매수하고자 하는 선에 닿아도 매수가 안되는 경우가 있더라구요.. 이 부분도 요청드립니다.. (첫번째 사진의 빨간 박스 참고) 함수 1 1. 거래대금 1000억이상 27%이상의 양봉 캔들이 생기고 다음날부터 1회만 매수매도 가능 * 같은 조건의 양봉캔들이 생기면 또 다시 1회 매수매도 가능 **두번째 사진을 보시면 1개의 장대양봉 출현후 매수 매도가 여러번 진행되었습니다. 이부분을 장대양봉을 기준으로 1회, 또 장대양봉이 나오면 1회 이런식으로 진행하고자 합니다.. 2. 일봉상 이평선 20일선 위에 있는 조건으로 일봉상 엔벨로프 Period 5 Percent 5 의 지지선에 닿으면 매수 4. 매수가대비 4.5% 상승즉시 매도 5. 매수가가 이평선 5일선과 같아지면 손절 함수 2 1. 거래대금 1000억이상 27%이상의 양봉 캔들이 생기고 다음날부터 1회만 매수매도 가능 * 같은 조건의 양봉캔들이 생기면 또 다시 1회 매수매도 가능 ** 사진에 보시면 1개의 장대양봉 출현후 매수 매도가 여러번 진행되었습니다. 이부분을 장대양봉을 기준으로 1회, 또 장대양봉이 나오면 1회 이런식으로 진행하고자 합니다.. (위와 같습니다) 2. 일봉상 이평선 20일선 위에 있는 조건으로 일봉상 엔벨로프 Period 3 Percent 3 의 지지선에 닿으면 매수 4. 매수가대비 3.5% 상승즉시 매도 5. 매수한날의 저점을 깨면 손절 이렇게도 가능할까요..? 매번 정말 감사드립니다.. > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 또 질문드립니다 > 안녕하세요 예스스탁입니다. 1 input : P(20),Period(3),Percent(3); var : DM(0),DM1(0),cnt(0); var : sum(0),mav(0),mid(0),dnv(0); #20일 이평 sum = 0; For cnt = 0 to P-1 { sum = sum + DayClose(cnt); } mav = sum/P; #엔벨로프 중단 하단 mid = ma(C,Period); dnv = EnvelopeDown(Period,Percent); #일간 거래대금 if Bdate != Bdate[1] Then { DM = 0; DM1 = DM; if DM1 >= 100000000000 and DayClose(1) > DayOpen(1) Then Condition1 = true; } DM = DM+M; if Condition1 == true then { if C > mav and L > dnv Then Buy("b",AtLimit,dnv); } if MarketPosition == 1 Then ExitLong("bx",AtLimit,mid); SetStopProfittarget(4.5,PercentStop); 2 input : P(20),Period(3),Percent(3); var : cnt(0),sum(0),mav(0),mid(0),dnv(0); 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 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 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; } } #20일 이평 sum = 0; For cnt = 0 to P-1 { sum = sum + DayClose(cnt); } mav = sum/P; #엔벨로프 중단/하단 mid = ma(C,Period); dnv = EnvelopeDown(Period,Percent); if Bdate != Bdate[1] Then { if DayHigh(1) >= 상한가[1] and DayClose(1) > DayOpen(1) Then Condition1 = true; } if Condition1 == true then { if C > mav and L > dnv Then Buy("b",AtLimit,dnv); } if MarketPosition == 1 Then { if MarketPosition[1] != 1 Then value1 = DayLow; ExitLong("bx",AtLimit,value1); } SetStopProfittarget(3.8,PercentStop); 즐거운 하루되세요 > hana1092 님이 쓴 글입니다. > 제목 : 또 질문드립니다 > 또 문의드립니다..! 함수 1 1. 거래대금 1000억이상 양봉 캔들이 생기고 다음날부터 (이때는 이평선 20일선 아래 있어도됨) 2. 이평선 20일선 위에 있는 조건으로 3. 엔벨로프 Period 5 Percent 5 의 지지선에 닿으면 매수 4. 매수가대비 4.5% 상승즉시 매도 5. 매수가가 이평선 5일선과 같아지면 손절 함수 2 1. 상한가 양봉 캔들이 생기고 다음날부터 (이때는 이평선 20일선 아래 있어도됨) 2. 이평선 20일선 위에 있는 조건으로 3. 엔벨로프 Period 3 Percent 3 의 지지선에 닿으면 매수 4. 매수가대비 3.8% 상승즉시 매도 5. 매수한날의 저점을 깨면 손절