커뮤니티

cme거래 및 시간설정 문의 드립니다.

프로필 이미지
대구어린울프
2018-11-01 22:36:13
170
글번호 123282
답변완료
안녕하세요? CME매매하는 방법을 게시판글 검색해서 따라해봤는데, 거래 시간이 밤 12시 전에껀 성능보고서엔 안나오더군요. 왜그런걸까요? 야간장에서 저녁6시부터 장끝날때까지 똑바로 거래를 하고싶습니다. 만약 시간설정을 해서 해야한다면, 아래의 식을 매매시작 시간, 매매종료시간 을 외부변수로 넣어싶습니다. 도와주세요. input : n(5),익절틱수(10),손절틱수(0); if MarketPosition == 0 then { if L == daylow(0) and C > O and abs(C-O) == PriceScale*n Then buy(); if H == DayHigh(0) and C < O and abs(C-O) == PriceScale*n Then sell(); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2018-11-02 14:50:05

안녕하세요 예스스탁입니다. 설정창에서 당일청산 설정하거나 수식안에서 당일청산함수로를 이용하면 당일청산은 지정한 시간이후에 당일 진입을 제한하게 됩니다. 새벽에 청산하는 경우에는 별도로 시간지정해 청산하야 합니다. input : n(5),익절틱수(10),손절틱수(0); input : starttime(090000),endtime(045000); var : Tcond(false); if (sdate != sdate[1] and stime >= starttime) or (sdate == sdate[1] and stime >= starttime and stime[1] < starttime) then { Tcond = true; } if (sdate != sdate[1] and stime >= endtime) or (sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then { Tcond = false; if MarketPosition == 1 Then exitlong(); if MarketPosition == -1 Then ExitShort(); } if MarketPosition == 0 and Tcond == true then { if L == daylow(0) and C > O and abs(C-O) == PriceScale*n Then buy(); if H == DayHigh(0) and C < O and abs(C-O) == PriceScale*n Then sell(); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 즐거운 하루되세요 > 대구어린울프 님이 쓴 글입니다. > 제목 : cme거래 및 시간설정 문의 드립니다. > 안녕하세요? CME매매하는 방법을 게시판글 검색해서 따라해봤는데, 거래 시간이 밤 12시 전에껀 성능보고서엔 안나오더군요. 왜그런걸까요? 야간장에서 저녁6시부터 장끝날때까지 똑바로 거래를 하고싶습니다. 만약 시간설정을 해서 해야한다면, 아래의 식을 매매시작 시간, 매매종료시간 을 외부변수로 넣어싶습니다. 도와주세요. input : n(5),익절틱수(10),손절틱수(0); if MarketPosition == 0 then { if L == daylow(0) and C > O and abs(C-O) == PriceScale*n Then buy(); if H == DayHigh(0) and C < O and abs(C-O) == PriceScale*n Then sell(); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop);