커뮤니티

문의드립니다.

프로필 이미지
아침한때비51
2015-09-11 21:25:13
106
글번호 90272
답변완료
1. input : 시작시간(210000),끝시간(043000); var : EntryStart(false); var1 = ma(c,120); var2 = ma(c,240); if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then EntryStart = true; if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then EntryStart = false; if MarketPosition == 0 and BarsSinceExit(1) == 1 and IsExitName("bx1",1) == true Then EntryStart = false; if var1 > var2 and C <= C[2] and EntryStart == true Then buy(); if MarketPosition == 1 Then{ ExitLong("bx1",Atlimit,EntryPrice+PriceScale*120); ExitLong("bx2",AtStop,daylow-PriceScale); if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then ExitLong(); } 2. input : 시작시간(210000),끝시간(043000); var : EntryStart(false); var1 = ma(c,120); var2 = ma(c,240); if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then EntryStart = true; if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then EntryStart = false; if MarketPosition == 0 and BarsSinceExit(1) == 1 and IsExitName("sx1",1) == true Then EntryStart = false; if var1 < var2 and C >= C[2] and EntryStart == true Then sell(); if MarketPosition == -1 Then{ ExitShort("sx1",atlimit,EntryPrice-PriceScale*120); ExitShort("sx2",AtStop,dayhigh+PriceScale); if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then ExitShort(); } 1번에서 당일저가 손절인데요.이거를 당일 아침 시작가에서 오후9시 전 사이의 있는 저가하향돌파를 손절로 넣어주세요. 손절되면 자동거래완전종료. 2번은 1번 반대로 아침시작가에서 오후9시전 사이의 있는 고가상향돌파를 손절로 넣어주세요. 손절되면 자동거래완전종료. 부탁드리겠습니다.
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-09-14 10:12:45

안녕하세요 예스스탁입니다. 당일아침시작이 몇시인지 정확치 않아 9시로 지정했습니다. 종목(해외/국내)별로 다르므로 다른 시간이면 9시를 수정하시면 됩니다. 1. input : 시작시간(210000),끝시간(043000); var : EntryStart(false),HH(0),LL(0); var1 = ma(c,120); var2 = ma(c,240); IF STIME == 090000 OR (STIME > 090000 AND stime[1] < 090000) Then{ HH = H; LL = L; } if stime >= 090000 and stime < 210000 Then{ if H > HH Then HH = H; if L < LL Then LL = L; } if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then{ EntryStart = true; } if EntryStart == true and TotalTrades > TotalTrades[1] and IsExitName("bx2",1) == true Then EntryStart = false; if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then EntryStart = false; if MarketPosition == 0 and BarsSinceExit(1) == 1 and IsExitName("bx1",1) == true Then EntryStart = false; if var1 > var2 and C <= C[2] and EntryStart == true Then buy(); if MarketPosition == 1 Then{ ExitLong("bx1",Atlimit,EntryPrice+PriceScale*120); ExitLong("bx2",AtStop,LL-PriceScale); if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then ExitLong(); } 2. input : 시작시간(210000),끝시간(043000); var : EntryStart(false),HH(0),LL(0); var1 = ma(c,120); var2 = ma(c,240); IF STIME == 090000 OR (STIME > 090000 AND stime[1] < 090000) Then{ HH = H; LL = L; } if stime >= 090000 and stime < 210000 Then{ if H > HH Then HH = H; if L < LL Then LL = L; } if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then{ EntryStart = true; } if EntryStart == true and TotalTrades > TotalTrades[1] and IsExitName("bx2",1) == true Then EntryStart = false; if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then EntryStart = false; if MarketPosition == 0 and BarsSinceExit(1) == 1 and IsExitName("sx1",1) == true Then EntryStart = false; if var1 < var2 and C >= C[2] and EntryStart == true Then sell(); if MarketPosition == -1 Then{ ExitShort("sx1",atlimit,EntryPrice-PriceScale*120); ExitShort("sx2",AtStop,HH+PriceScale); if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then ExitShort(); } 즐거운 하루되세요 > 아침한때비51 님이 쓴 글입니다. > 제목 : 문의드립니다. > 1. input : 시작시간(210000),끝시간(043000); var : EntryStart(false); var1 = ma(c,120); var2 = ma(c,240); if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then EntryStart = true; if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then EntryStart = false; if MarketPosition == 0 and BarsSinceExit(1) == 1 and IsExitName("bx1",1) == true Then EntryStart = false; if var1 > var2 and C <= C[2] and EntryStart == true Then buy(); if MarketPosition == 1 Then{ ExitLong("bx1",Atlimit,EntryPrice+PriceScale*120); ExitLong("bx2",AtStop,daylow-PriceScale); if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then ExitLong(); } 2. input : 시작시간(210000),끝시간(043000); var : EntryStart(false); var1 = ma(c,120); var2 = ma(c,240); if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then EntryStart = true; if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then EntryStart = false; if MarketPosition == 0 and BarsSinceExit(1) == 1 and IsExitName("sx1",1) == true Then EntryStart = false; if var1 < var2 and C >= C[2] and EntryStart == true Then sell(); if MarketPosition == -1 Then{ ExitShort("sx1",atlimit,EntryPrice-PriceScale*120); ExitShort("sx2",AtStop,dayhigh+PriceScale); if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then ExitShort(); } 1번에서 당일저가 손절인데요.이거를 당일 아침 시작가에서 오후9시 전 사이의 있는 저가하향돌파를 손절로 넣어주세요. 손절되면 자동거래완전종료. 2번은 1번 반대로 아침시작가에서 오후9시전 사이의 있는 고가상향돌파를 손절로 넣어주세요. 손절되면 자동거래완전종료. 부탁드리겠습니다.