커뮤니티

수식부탁합니다

프로필 이미지
시골길
2009-06-23 10:01:59
545
글번호 22991
답변완료
for cnt = 0 to 10{ if sdate == EntryDate(cnt) and IsEntryName("Long",cnt) == True Then bcnt1 = bcnt1+1; if sdate == EntryDate(cnt) and IsEntryName("bb2",cnt) == True Then bcnt1 = bcnt1+1; if sdate == EntryDate(cnt) and IsEntryName("bb3",cnt) == True Then bcnt1 = bcnt1+1; if sdate == EntryDate(cnt) and IsEntryName("Short",cnt) == True Then scnt1 = scnt1+1; if sdate == EntryDate(cnt) and IsEntryName("ss2",cnt) == True Then scnt1 = scnt1+1; if sdate == EntryDate(cnt) and IsEntryName("ss3",cnt) == True Then scnt1 = scnt1+1; } 상기식에 따라 청산조건을 다르게 작성하려고합니다. "long과 short"은 3포인트 이익에 0.5포인트 추적손실//손실은 진입가의 0.5포인트 또한 Long의 경우는 가격이 40MA을 하향하면 ExitLong BB2와BB3는 진입가격의 0.4포인트 손절 이익청산은 1.5포인트 SS2와 SS3은 진입가격의 0.6포인트 이익청산은 1포인트 마지막으로 bb3의 진입의 경우는 13시부터 14시사이에서만 한정하고 싶습니다. 미리감사드립니다
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2009-06-23 13:25:35

안녕하세요 예스스탁입니다. if MarketPosition == 1 Then{ if IsEntryName("long") == True Then{ exitlong("LongLoss",AtStop,EntryPrice-0.5); if highest(H,BarsSinceEntry) >= EntryPrice+3 Then exitlong("LongTr",AtStop,highest(H,BarsSinceEntry)-0.5); } if IsEntryName("BB2") == True Then{ exitlong("BB2Loss",AtStop,EntryPrice-0.4); exitlong("BB2Profit",AtLimit,EntryPrice+1.5); } if IsEntryName("BB2") == True Then{ exitlong("BB3Loss",AtStop,EntryPrice-0.4); exitlong("BB3Profit",AtLimit,EntryPrice+1.5); } } if MarketPosition == -1 Then{ if IsEntryName("short") == True Then{ ExitShort("ShortLoss",AtStop,EntryPrice+0.5); if Lowest(L,BarsSinceEntry) <= EntryPrice-3 Then ExitShort("ShortTr",AtStop,Lowest(L,BarsSinceEntry)+0.5); } if IsEntryName("SS2") == True Then{ ExitShort("SS2Loss",AtStop,EntryPrice-0.6); ExitShort("SS2Profit",AtLimit,EntryPrice+1); } if IsEntryName("SS2") == True Then{ ExitShort("SS3Loss",AtStop,EntryPrice-0.6); ExitShort("SS3Profit",AtLimit,EntryPrice+1); } } bb3 신호의 진입제한은 진입식에 stime >= 130000 and stime < 140000을 추하시기 바랍니다. 즐거운 하루되세요 > 시골길 님이 쓴 글입니다. > 제목 : 수식부탁합니다 > for cnt = 0 to 10{ if sdate == EntryDate(cnt) and IsEntryName("Long",cnt) == True Then bcnt1 = bcnt1+1; if sdate == EntryDate(cnt) and IsEntryName("bb2",cnt) == True Then bcnt1 = bcnt1+1; if sdate == EntryDate(cnt) and IsEntryName("bb3",cnt) == True Then bcnt1 = bcnt1+1; if sdate == EntryDate(cnt) and IsEntryName("Short",cnt) == True Then scnt1 = scnt1+1; if sdate == EntryDate(cnt) and IsEntryName("ss2",cnt) == True Then scnt1 = scnt1+1; if sdate == EntryDate(cnt) and IsEntryName("ss3",cnt) == True Then scnt1 = scnt1+1; } 상기식에 따라 청산조건을 다르게 작성하려고합니다. "long과 short"은 3포인트 이익에 0.5포인트 추적손실//손실은 진입가의 0.5포인트 또한 Long의 경우는 가격이 40MA을 하향하면 ExitLong BB2와BB3는 진입가격의 0.4포인트 손절 이익청산은 1.5포인트 SS2와 SS3은 진입가격의 0.6포인트 이익청산은 1포인트 마지막으로 bb3의 진입의 경우는 13시부터 14시사이에서만 한정하고 싶습니다. 미리감사드립니다