커뮤니티

시스템식 수정 부탁드립니다.

프로필 이미지
함밝중명
2012-05-31 10:12:15
317
글번호 51513
답변완료
안녕하세요? 아래 시스템식에서 청산식을 <수식1>은 0.6pt 수익후 청산 <수식2>는 0.4pt 수익후 청산하게 하고 싶습니다. SetStopProfittarget(0.5,PointStop); <-----수정요망합니다. 감사합니다. ------------------------------------------------------ 안녕하세요 예스스탁입니다. 수식2는 당일 수식1이 발생하고 진입하게 작성되었습니다. 수식2매수는 수식1매수로 진입후 청산된 뒤에만 발생 수식2매도는 수식1매도로 진입후 청산된 뒤에만 발생 if crossup(ma(c,5),ma(c,10)) Then buy("수식1매수"); if EntryDate(1) == sdate and IsEntryName("수식1매수",1) == true and crossup(ma(c,5),ma(c,20)) Then buy("수식2매수"); if CrossDown(ma(c,5),ma(c,10)) Then sell("수식1매도"); if EntryDate(1) == sdate and IsEntryName("수식1매도",1) == true and CrossDown(ma(c,5),ma(c,20)) Then sell("수식2매도"); SetStopProfittarget(0.5,PointStop); SetStopLoss(2,PointStop); SetStopEndofday(145000); 즐거운 하루되세요
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2012-05-31 15:05:45

안녕하세요 예스스탁입니다. 아래와 같이 풀어서 청산식을 작성해야 합니다. if crossup(ma(c,5),ma(c,10)) Then buy("수식1매수"); if EntryDate(1) == sdate and IsEntryName("수식1매수",1) == true and crossup(ma(c,5),ma(c,20)) Then buy("수식2매수"); if CrossDown(ma(c,5),ma(c,10)) Then sell("수식1매도"); if EntryDate(1) == sdate and IsEntryName("수식1매도",1) == true and CrossDown(ma(c,5),ma(c,20)) Then sell("수식2매도"); if marketposition == 1 then{ exitlong("bx1",atlimit,entryprice+0.6,"수식1매수"); exitlong("bx2",atlimit,entryprice+0.4,"수식2매수"); } if marketposition == -1 then{ exitshort("sx1",atlimit,entryprice-0.6,"수식1매도"); exitshort("sx2",atlimit,entryprice-0.4,"수식2매도"); } SetStopLoss(2,PointStop); SetStopEndofday(145000); 즐거운 하루되세요 > 함밝중명 님이 쓴 글입니다. > 제목 : 시스템식 수정 부탁드립니다. > 안녕하세요? 아래 시스템식에서 청산식을 <수식1>은 0.6pt 수익후 청산 <수식2>는 0.4pt 수익후 청산하게 하고 싶습니다. SetStopProfittarget(0.5,PointStop); <-----수정요망합니다. 감사합니다. ------------------------------------------------------ 안녕하세요 예스스탁입니다. 수식2는 당일 수식1이 발생하고 진입하게 작성되었습니다. 수식2매수는 수식1매수로 진입후 청산된 뒤에만 발생 수식2매도는 수식1매도로 진입후 청산된 뒤에만 발생 if crossup(ma(c,5),ma(c,10)) Then buy("수식1매수"); if EntryDate(1) == sdate and IsEntryName("수식1매수",1) == true and crossup(ma(c,5),ma(c,20)) Then buy("수식2매수"); if CrossDown(ma(c,5),ma(c,10)) Then sell("수식1매도"); if EntryDate(1) == sdate and IsEntryName("수식1매도",1) == true and CrossDown(ma(c,5),ma(c,20)) Then sell("수식2매도"); SetStopProfittarget(0.5,PointStop); SetStopLoss(2,PointStop); SetStopEndofday(145000); 즐거운 하루되세요