커뮤니티

부탁드립니다.

프로필 이미지
1개미
2013-11-06 20:38:07
130
글번호 69272
답변완료
안녕하세요.. 늘 감사드립니다.. 1.시간대별 진입과 청산식을 만들고 싶습니다 09시~10시 , 10시~11시 ,11시~13시,13시~15시 각 시간대별 정해진 진입과 청산식만 적용합니다.. 09시~10시(10시청산,단 진입후1p 수익이면즉시청산하고 이번시간대는 매매중지입니다) if var>var1 and var1>var2 then buy(); if var<var1 and var1<var2 ther sell(); 10시1분~11시(위의식은 무시하고 새로운포지션진입,,11시청산, 단 진입후1p 수익이면즉시청산하고 이번시간대는 매매중지입니다) if var>var1 and var1>var2 and c[1]>c[2] ther buy(); if var<var1 and var1<var2 and o[1]>o[2] ther sell(); 이런형태입니다.. 시간대별 진입청산식만 분리하여 사용하며 그 시간이 지나면 무시합니다. 2.각시간대별 청산을 별도로 당일고점,저점대비 +-3P 이면청산 . 전일고점과저점대비 +-3p청산 (진입가와는 별도로 당일,전일 고점,저점대비입니다) 설명을 맞게 했는지 모르겠습니다.. 늘 감사드리며.. 다시한번 부탁드립니다. 감사합니다
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2013-11-07 15:18:14

안녕하세요 예스스탁입니다. 1. 시간대별로 매수/매도진입이 동일조건이면 아래식 이용하시면 됩니다. var : TF(0); TF = TimeToMinutes(stime)%60; if dayindex == 0 or (TF < TF[1]) Then Condition1 = false; if MarketPosition == 0 and MarketPosition != MarketPosition[1] And IsExitName("StopProfittarget",1) == true Then Condition1 = true; if Condition1 == false and stime < 150000 Then{ if 매수조건 then buy(); if 매도조건 then sell(); } if dayindex > 0 and TF < TF[1] Then{ if MarketPosition == 1 Then ExitLong(); if MarketPosition == -1 Then ExitShort(); } SetStopProfittarget(1,PointStop); 각 시간대별로 진입조건이 다르면 아래와 같이 시간대로 나눠서 나열해 작성하셔야 합니다. var : TF(0); TF = TimeToMinutes(stime)%60; if dayindex == 0 or (TF < TF[1]) Then Condition1 = false; if MarketPosition == 0 and MarketPosition != MarketPosition[1] And IsExitName("StopProfittarget",1) == true Then Condition1 = true; if Condition1 == false Then{ if stime >= 090000 and stime < 100000 Then{ if 매수조건1 then buy(); if 매도조건1 then sell(); } if stime >= 100000 and stime < 110000 Then{ if 매수조건2 then buy(); if 매도조건2 then sell(); } if stime >= 110000 and stime < 120000 Then{ if 매수조건3 then buy(); if 매도조건3 then sell(); } if stime >= 120000 and stime < 130000 Then{ if 매수조건4 then buy(); if 매도조건4 then sell(); } if stime >= 130000 and stime < 140000 Then{ if 매수조건5 then buy(); if 매도조건5 then sell(); } if stime >= 140000 and stime < 150000 Then{ if 매수조건6 then buy(); if 매도조건6 then sell(); } } if dayindex > 0 and TF < TF[1] Then{ if MarketPosition == 1 Then ExitLong(); if MarketPosition == -1 Then ExitShort(); } SetStopProfittarget(1,PointStop); 2. if MarketPosition == 1 Then{ ExitLong("bx1",AtStop,dayhigh-3); ExitLong("bx2",AtStop,dayhigh(1)-3); } if MarketPosition == -1 Then{ ExitShort("sx1",AtStop,DayLow-3); ExitShort("sx2",AtStop,daylow(1)-3); } 즐거운 하루되세요 > 1개미 님이 쓴 글입니다. > 제목 : 부탁드립니다. > 안녕하세요.. 늘 감사드립니다.. 1.시간대별 진입과 청산식을 만들고 싶습니다 09시~10시 , 10시~11시 ,11시~13시,13시~15시 각 시간대별 정해진 진입과 청산식만 적용합니다.. 09시~10시(10시청산,단 진입후1p 수익이면즉시청산하고 이번시간대는 매매중지입니다) if var>var1 and var1>var2 then buy(); if var<var1 and var1<var2 ther sell(); 10시1분~11시(위의식은 무시하고 새로운포지션진입,,11시청산, 단 진입후1p 수익이면즉시청산하고 이번시간대는 매매중지입니다) if var>var1 and var1>var2 and c[1]>c[2] ther buy(); if var<var1 and var1<var2 and o[1]>o[2] ther sell(); 이런형태입니다.. 시간대별 진입청산식만 분리하여 사용하며 그 시간이 지나면 무시합니다. 2.각시간대별 청산을 별도로 당일고점,저점대비 +-3P 이면청산 . 전일고점과저점대비 +-3p청산 (진입가와는 별도로 당일,전일 고점,저점대비입니다) 설명을 맞게 했는지 모르겠습니다.. 늘 감사드리며.. 다시한번 부탁드립니다. 감사합니다