커뮤니티

국내 주식 일봉차트에서 자동매매 할수 있게 수식 변환 요청합니다.

프로필 이미지
이형지
2020-06-16 06:05:22
2222
글번호 139859
답변완료
국내 주식입니다. 일봉 기준입니다. 자동매매로 거래할수 있도록 수식 변환 요청드릴께요... 일봉에서는 봉완성후 진입이라 장종료후에 진입이 되지 않는 것으로 알고 있습니다. 그러면 종가가 조건에 부합했을때 다음봉(다음날) 전일 종가(또는 낮은 값일때) 에 실시간으로 진입하는 수식 부탁드리고요 추가 매수 되는 것은 장중에 해당 값에 도달시 즉시 진입되는 수식으로 될수 있게 그리고 청산시에도 조건부합시 다음봉(다음날) 전일 종가에 실시간으로 청산 하는 수식 부탁드림니다. 정리하면 최초 매수 진입분: 다음봉에 전봉 종가 또는 낮을값일때 진입( 갭상승시 전일종가 , 갭하락시 즉시 체결) 추가매수분 : 해당 조건 충족시 즉시 진입 청산분: 다음봉에 전일종가 또는 높을때 즉시청산(갭상승일때 즉시 청산,갭하락일때 전일종가) --------------------------------------------------------------------------------- input : 기준평균봉값(80); input : 일차매수금액(100); input : 이차매수금액(200); input : 삼차매수금액(300); input : 사차매수금액(400); input : 오차매수금액(500); input : 육차매수금액(600); input : 최초진입하락폭(0.95); input : 추가진입하락폭(0.96); input : MFI기간(15),MFI값(85); input : 심리도기간(15),심리도값(85); var : mav(0,data2),MM(0,data1),SS(0,data1); mav = data2(ma(c,기준평균봉값)); MM = data1(mfi(MFI기간)); SS = data1(Simrido(심리도기간)); if MarketPosition == 0 and data2(CrossDown(c,mav*최초진입하락폭)) then buy("b1",OnClose,def,Floor(일차매수금액*10000/c)); if MarketPosition == 1 then { if MaxEntries == 1 and c<=LatestEntryPrice(0)*추가진입하락폭 then # 85 buy("b2",OnClose,def,Floor(이차매수금액*10000/c)); if MaxEntries == 2 and c<=LatestEntryPrice(0)*(추가진입하락폭-0.04) then # 80 buy("b3",OnClose,def,Floor(삼차매수금액*10000/c)); if MaxEntries == 3 and c<=LatestEntryPrice(0)*(추가진입하락폭-0.07) then # 75 buy("b4",OnClose,def,Floor(사차매수금액*10000/c)); if MaxEntries == 4 and c<=LatestEntryPrice(0)*(추가진입하락폭-0.09) then # 70 buy("b5",OnClose,def,Floor(오차매수금액*10000/c)); if MaxEntries == 5 and c<=LatestEntryPrice(0)*(추가진입하락폭-0.10) then # 65 buy("b6",OnClose,def,Floor(육차매수금액*10000/c)); if MM > MFI값 or SS > 심리도값 Then exitlong("청산"); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-06-16 15:31:42

안녕하세요 예스스탁입니다. input : 기준평균봉값(80); input : 일차매수금액(100); input : 이차매수금액(200); input : 삼차매수금액(300); input : 사차매수금액(400); input : 오차매수금액(500); input : 육차매수금액(600); input : 최초진입하락폭(0.95); input : 추가진입하락폭(0.96); input : MFI기간(15),MFI값(85); input : 심리도기간(15),심리도값(85); var : mav(0,data2),MM(0,data1),SS(0,data1); mav = data2(ma(c,기준평균봉값)); MM = data1(mfi(MFI기간)); SS = data1(Simrido(심리도기간)); if MarketPosition == 0 and data2(CrossDown(c,mav*최초진입하락폭)) then buy("b1",atlimit,C,Floor(일차매수금액*10000/min(NextBarOpen,C))); if MarketPosition == 1 then { if MaxEntries == 1 then # 85 buy("b2",AtLimit,LatestEntryPrice(0)*추가진입하락폭,Floor(이차매수금액*10000/c)); if MaxEntries == 2 then # 80 buy("b3",AtLimit,LatestEntryPrice(0)*(추가진입하락폭-0.04),Floor(삼차매수금액*10000/c)); if MaxEntries == 3 then # 75 buy("b4",AtLimit,LatestEntryPrice(0)*(추가진입하락폭-0.07),Floor(사차매수금액*10000/c)); if MaxEntries == 4 then # 70 buy("b5",AtLimit,LatestEntryPrice(0)*(추가진입하락폭-0.09),Floor(오차매수금액*10000/c)); if MaxEntries == 5 then # 65 buy("b6",AtLimit,LatestEntryPrice(0)*(추가진입하락폭-0.10),Floor(육차매수금액*10000/c)); if MM > MFI값 or SS > 심리도값 Then exitlong("청산",atlimit,C); } 즐거운 하루되세요 > 이형지 님이 쓴 글입니다. > 제목 : 국내 주식 일봉차트에서 자동매매 할수 있게 수식 변환 요청합니다. > 국내 주식입니다. 일봉 기준입니다. 자동매매로 거래할수 있도록 수식 변환 요청드릴께요... 일봉에서는 봉완성후 진입이라 장종료후에 진입이 되지 않는 것으로 알고 있습니다. 그러면 종가가 조건에 부합했을때 다음봉(다음날) 전일 종가(또는 낮은 값일때) 에 실시간으로 진입하는 수식 부탁드리고요 추가 매수 되는 것은 장중에 해당 값에 도달시 즉시 진입되는 수식으로 될수 있게 그리고 청산시에도 조건부합시 다음봉(다음날) 전일 종가에 실시간으로 청산 하는 수식 부탁드림니다. 정리하면 최초 매수 진입분: 다음봉에 전봉 종가 또는 낮을값일때 진입( 갭상승시 전일종가 , 갭하락시 즉시 체결) 추가매수분 : 해당 조건 충족시 즉시 진입 청산분: 다음봉에 전일종가 또는 높을때 즉시청산(갭상승일때 즉시 청산,갭하락일때 전일종가) --------------------------------------------------------------------------------- input : 기준평균봉값(80); input : 일차매수금액(100); input : 이차매수금액(200); input : 삼차매수금액(300); input : 사차매수금액(400); input : 오차매수금액(500); input : 육차매수금액(600); input : 최초진입하락폭(0.95); input : 추가진입하락폭(0.96); input : MFI기간(15),MFI값(85); input : 심리도기간(15),심리도값(85); var : mav(0,data2),MM(0,data1),SS(0,data1); mav = data2(ma(c,기준평균봉값)); MM = data1(mfi(MFI기간)); SS = data1(Simrido(심리도기간)); if MarketPosition == 0 and data2(CrossDown(c,mav*최초진입하락폭)) then buy("b1",OnClose,def,Floor(일차매수금액*10000/c)); if MarketPosition == 1 then { if MaxEntries == 1 and c<=LatestEntryPrice(0)*추가진입하락폭 then # 85 buy("b2",OnClose,def,Floor(이차매수금액*10000/c)); if MaxEntries == 2 and c<=LatestEntryPrice(0)*(추가진입하락폭-0.04) then # 80 buy("b3",OnClose,def,Floor(삼차매수금액*10000/c)); if MaxEntries == 3 and c<=LatestEntryPrice(0)*(추가진입하락폭-0.07) then # 75 buy("b4",OnClose,def,Floor(사차매수금액*10000/c)); if MaxEntries == 4 and c<=LatestEntryPrice(0)*(추가진입하락폭-0.09) then # 70 buy("b5",OnClose,def,Floor(오차매수금액*10000/c)); if MaxEntries == 5 and c<=LatestEntryPrice(0)*(추가진입하락폭-0.10) then # 65 buy("b6",OnClose,def,Floor(육차매수금액*10000/c)); if MM > MFI값 or SS > 심리도값 Then exitlong("청산"); }