커뮤니티

재문의드립니다.

프로필 이미지
종호
2021-05-04 11:50:01
1060
글번호 148656
답변완료
안녕하세요. 아래수식을 돌리면 매매가 일어나지가 않습니다. 수정을 부탁드립니다. 그리고 if SPrice == 0 and Bdate == bdate[2] and C > mav and C <= O and C[1] > O[1] and C[2] > O[2] and C <= DayClose(1)*1.15 Then SPrice = C; 수식에서 SPrice = C; 가 아니고 종가가 아니고 시가이므로 SPrice = O; 인것 같습니다. 안녕하세요 예스스탁입니다. input : 시작날짜(20210429),시작시간(110000); input : 금액(3000000),진입횟수(3); var : mav(0),SPrice(0),tcond(False); var : 상한가(0), UpLimit(0),entry(0); var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(0); if sDate == 시작날짜 and sTime >= 시작시간 Then Tcond = true; 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,33); if Bdate != Bdate[1] Then { SPrice = 0; entry = 0; } if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if SPrice == 0 and Bdate == bdate[2] and C > mav and C <= O and C[1] > O[1] and C[2] > O[2] and C <= DayClose(1)*1.15 Then SPrice = C; if MarketPosition == 0 and Tcond == true and SPrice > 0 and CrossUp(C,SPrice) and entry < 0 and 진입횟수 Then Buy("b",OnClose,DEf,Floor(금액/C)); if MarketPosition == 1 Then { Sprice = 0; if TimeToMinutes(sTime) >= TimeToMinutes(EntryTime(0))+60 Then ExitLong("bx"); if CurrentContracts == MaxContracts Then ExitLong("bp",AtLimit,EntryPrice*1.05,"",Floor(MaxContracts*0.5),1); Else ExitLong("be",AtStop,EntryPrice); ExitLong("bu",AtLimit,상한가); } SetStopLoss(3,PercentStop); SetStopProfittarget(15,PercentStop); SetStopEndofday(151500); 즐거운 하루되세요 > 종호 님이 쓴 글입니다. > 제목 : 조건식 수정 문의합니다 > 아래에서 주문시 300만원 해당되게 매수되도록 수정하고요. 매수하고 나서 수익 청산이던지 본절,손절 어떤 청산이던지 매수 잔고가 0 이 되면 초기화하도록 부탁드립니다. 초기화 이후 조건이 만족하면 또 반복 메수되고 청산하도록 하고요. 1일에 최대 매수 횟수를 3회만 되도록 부탁드립니다. 안녕하세요 예스스탁입니다. 날짜시간을 지정해서 해당일시 이후에 신호가 발생하게 하는 방법뿐이 없습니다. input : 시작날짜(20210429),시작시간(110000); var : mav(0),SPrice(0),tcond(False); var : 상한가(0), UpLimit(0); var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(0); if sDate == 시작날짜 and sTime >= 시작시간 Then Tcond = true; 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,33); if Bdate != Bdate[1] Then SPrice = 0; if SPrice == 0 and Bdate == bdate[2] and C > mav and C <= O and C[1] > O[1] and C[2] > O[2] and C <= DayClose(1)*1.15 Then SPrice = C; if Tcond == true and SPrice > 0 and CrossUp(C,SPrice) Then Buy(); if MarketPosition == 1 Then { if TimeToMinutes(sTime) >= TimeToMinutes(EntryTime(0))+60 Then ExitLong("bx"); if CurrentContracts == MaxContracts Then ExitLong("bp",AtLimit,EntryPrice*1.05,"",Floor(MaxContracts*0.5),1); Else ExitLong("be",AtStop,EntryPrice); ExitLong("bu",AtLimit,상한가); } SetStopLoss(3,PercentStop); SetStopProfittarget(15,PercentStop); SetStopEndofday(151500); 즐거운 하루되세요 > 종호 님이 쓴 글입니다. > 제목 : 문의합니다. > 주식종목을 검토하다 장중에 좋은 주식이 나오면 장중 시간에 들어가서 시스템으로 매매하고 싶습니다. 그런데 예를 들어 11시에 시스템을 돌렸다면 11시 이전에 매수신호가 나온 것이 있을 수 있어서 피라미딩은 안한다는 전제하에 11시 이후에는 다시 진입을 할 수가 없다는 것입니다. 그래서 input 변수로 날자와 시간을 변수로 집어넣고 11시 이후로 시간을 변경하고서 시스템을 가동되도록 하면 되겠다는 생각이 들었습니다. 이 방법밖에 없는지요? 다른 방법이 있으면 가르쳐 주시고요. 장중 중간에 들어가서도 작동할 수 있도록 부탁드립니다. 이하 매매 방법입니다. 매수 준비 : 3분봉에서 주가가 주기가 33 이평선 위에 있고 현재봉이 도지 또는 음봉이 생기면 현재봉 바로 직전 첫째봉과 둘째봉이 연속 양봉이어야 합니다. 이 때 현재봉의 도지나 음봉의 시가를 매수기준가 라고 정의합니다. 매수 : 매수 기준가가 전날의 일봉 종가 대비 115% 이하이고 현재가가 매수 기준가를 돌파할 때 매수합니다. 손절 :3% 손실시 손절합니다. 이익청산 : 매수 후 5% 이익시 절반청산하고 이후에 하락하면 매수가 본전에서 나머지 전량청산합니다. 그리고 나머지 절반을 일단 상한가 매도를 걸어놓고 또 15 % 이익이 나면 나머지 전량 청산합니다. 안팔리면 매수이후에 1시간 될 때 전량 청산하고 메수후 혹시 1시간 이전에 장이 끝나게 되면 종가에 전량 청산합니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-05-04 14:44:37

안녕하세요 예스스탁입니다. 식을 수정했습니다. 진입식에 진입횟수지정에 문제가 있었습니다. input : 시작날짜(20210429),시작시간(110000); input : 금액(3000000),진입횟수(3); var : mav(0),SPrice(0),tcond(False); var : 상한가(0), UpLimit(0),entry(0); var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(0); if sDate == 시작날짜 and sTime >= 시작시간 Then Tcond = true; 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,33); if Bdate != Bdate[1] Then { SPrice = 0; entry = 0; } if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if SPrice == 0 and Bdate == bdate[2] and C > mav and C <= O and C[1] > O[1] and C[2] > O[2] and C <= DayClose(1)*1.15 Then SPrice = O; MessageLog("%.2f",sprice); if MarketPosition == 0 and Tcond == true and SPrice > 0 and CrossUp(C,SPrice) and entry < 1 and 진입횟수 Then Buy("b",OnClose,DEf,Floor(금액/C)); if MarketPosition == 1 Then { Sprice = 0; if TimeToMinutes(sTime) >= TimeToMinutes(EntryTime(0))+60 Then ExitLong("bx"); if CurrentContracts == MaxContracts Then ExitLong("bp",AtLimit,EntryPrice*1.05,"",Floor(MaxContracts*0.5),1); Else ExitLong("be",AtStop,EntryPrice); ExitLong("bu",AtLimit,상한가); } SetStopLoss(3,PercentStop); SetStopProfittarget(15,PercentStop); SetStopEndofday(151500); 즐거운 하루되세요 > 종호 님이 쓴 글입니다. > 제목 : 재문의드립니다. > 안녕하세요. 아래수식을 돌리면 매매가 일어나지가 않습니다. 수정을 부탁드립니다. 그리고 if SPrice == 0 and Bdate == bdate[2] and C > mav and C <= O and C[1] > O[1] and C[2] > O[2] and C <= DayClose(1)*1.15 Then SPrice = C; 수식에서 SPrice = C; 가 아니고 종가가 아니고 시가이므로 SPrice = O; 인것 같습니다. 안녕하세요 예스스탁입니다. input : 시작날짜(20210429),시작시간(110000); input : 금액(3000000),진입횟수(3); var : mav(0),SPrice(0),tcond(False); var : 상한가(0), UpLimit(0),entry(0); var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(0); if sDate == 시작날짜 and sTime >= 시작시간 Then Tcond = true; 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,33); if Bdate != Bdate[1] Then { SPrice = 0; entry = 0; } if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if SPrice == 0 and Bdate == bdate[2] and C > mav and C <= O and C[1] > O[1] and C[2] > O[2] and C <= DayClose(1)*1.15 Then SPrice = C; if MarketPosition == 0 and Tcond == true and SPrice > 0 and CrossUp(C,SPrice) and entry < 0 and 진입횟수 Then Buy("b",OnClose,DEf,Floor(금액/C)); if MarketPosition == 1 Then { Sprice = 0; if TimeToMinutes(sTime) >= TimeToMinutes(EntryTime(0))+60 Then ExitLong("bx"); if CurrentContracts == MaxContracts Then ExitLong("bp",AtLimit,EntryPrice*1.05,"",Floor(MaxContracts*0.5),1); Else ExitLong("be",AtStop,EntryPrice); ExitLong("bu",AtLimit,상한가); } SetStopLoss(3,PercentStop); SetStopProfittarget(15,PercentStop); SetStopEndofday(151500); 즐거운 하루되세요 > 종호 님이 쓴 글입니다. > 제목 : 조건식 수정 문의합니다 > 아래에서 주문시 300만원 해당되게 매수되도록 수정하고요. 매수하고 나서 수익 청산이던지 본절,손절 어떤 청산이던지 매수 잔고가 0 이 되면 초기화하도록 부탁드립니다. 초기화 이후 조건이 만족하면 또 반복 메수되고 청산하도록 하고요. 1일에 최대 매수 횟수를 3회만 되도록 부탁드립니다. 안녕하세요 예스스탁입니다. 날짜시간을 지정해서 해당일시 이후에 신호가 발생하게 하는 방법뿐이 없습니다. input : 시작날짜(20210429),시작시간(110000); var : mav(0),SPrice(0),tcond(False); var : 상한가(0), UpLimit(0); var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(0); if sDate == 시작날짜 and sTime >= 시작시간 Then Tcond = true; 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,33); if Bdate != Bdate[1] Then SPrice = 0; if SPrice == 0 and Bdate == bdate[2] and C > mav and C <= O and C[1] > O[1] and C[2] > O[2] and C <= DayClose(1)*1.15 Then SPrice = C; if Tcond == true and SPrice > 0 and CrossUp(C,SPrice) Then Buy(); if MarketPosition == 1 Then { if TimeToMinutes(sTime) >= TimeToMinutes(EntryTime(0))+60 Then ExitLong("bx"); if CurrentContracts == MaxContracts Then ExitLong("bp",AtLimit,EntryPrice*1.05,"",Floor(MaxContracts*0.5),1); Else ExitLong("be",AtStop,EntryPrice); ExitLong("bu",AtLimit,상한가); } SetStopLoss(3,PercentStop); SetStopProfittarget(15,PercentStop); SetStopEndofday(151500); 즐거운 하루되세요 > 종호 님이 쓴 글입니다. > 제목 : 문의합니다. > 주식종목을 검토하다 장중에 좋은 주식이 나오면 장중 시간에 들어가서 시스템으로 매매하고 싶습니다. 그런데 예를 들어 11시에 시스템을 돌렸다면 11시 이전에 매수신호가 나온 것이 있을 수 있어서 피라미딩은 안한다는 전제하에 11시 이후에는 다시 진입을 할 수가 없다는 것입니다. 그래서 input 변수로 날자와 시간을 변수로 집어넣고 11시 이후로 시간을 변경하고서 시스템을 가동되도록 하면 되겠다는 생각이 들었습니다. 이 방법밖에 없는지요? 다른 방법이 있으면 가르쳐 주시고요. 장중 중간에 들어가서도 작동할 수 있도록 부탁드립니다. 이하 매매 방법입니다. 매수 준비 : 3분봉에서 주가가 주기가 33 이평선 위에 있고 현재봉이 도지 또는 음봉이 생기면 현재봉 바로 직전 첫째봉과 둘째봉이 연속 양봉이어야 합니다. 이 때 현재봉의 도지나 음봉의 시가를 매수기준가 라고 정의합니다. 매수 : 매수 기준가가 전날의 일봉 종가 대비 115% 이하이고 현재가가 매수 기준가를 돌파할 때 매수합니다. 손절 :3% 손실시 손절합니다. 이익청산 : 매수 후 5% 이익시 절반청산하고 이후에 하락하면 매수가 본전에서 나머지 전량청산합니다. 그리고 나머지 절반을 일단 상한가 매도를 걸어놓고 또 15 % 이익이 나면 나머지 전량 청산합니다. 안팔리면 매수이후에 1시간 될 때 전량 청산하고 메수후 혹시 1시간 이전에 장이 끝나게 되면 종가에 전량 청산합니다.