커뮤니티

수식부탁드립니다-----

프로필 이미지
leekss1
2011-03-08 08:05:37
702
글번호 36338
답변완료
청산식에서 포지션있을때 Condition1 = highest(h,x1) >= lowest(L,x1)*(1+(Per1/100)); Condition1 이면 5틱익절,10틱손절 하고 아니면 아래와같이청산하게 식좀 결합해주세요 if MarketPosition == 1 Then{ if Highest(H,BarsSinceEntry) < EntryPrice+3 Then ExitLong("bx1",AtStop,Highest(H,BarsSinceEntry)-1.4); Else ExitLong("bx2",AtStop,Highest(H,BarsSinceEntry)-2); } if MarketPosition == -1 Then{ if Lowest(L,BarsSinceEntry) > EntryPrice-3 Then ExitShort("sx1",AtStop,Lowest(L,BarsSinceEntry)+1.4); Else ExitShort("sx2",AtStop,Lowest(L,BarsSinceEntry)+2); } }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2011-03-08 09:28:19

안녕하세요 예스스탁입니다. Condition1 = highest(h,x1) >= lowest(L,x1)*(1+(Per1/100)); if Condition1 == true Then{ if MarketPosition == 1 Then{ ExitLong("bx3",AtStop,EntryPrice-PriceScale*10); ExitLong("bx4",AtLimit,EntryPrice+PriceScale*5); } if MarketPosition == -1 Then{ ExitShort("sx3",AtStop,EntryPrice+PriceScale*10); ExitShort("sx4",AtLimit,EntryPrice-PriceScale*5); } } if Condition1 == false Then{ if MarketPosition == 1 Then{ if Highest(H,BarsSinceEntry) < EntryPrice+3 Then ExitLong("bx1",AtStop,Highest(H,BarsSinceEntry)-1.4); Else ExitLong("bx2",AtStop,Highest(H,BarsSinceEntry)-2); } if MarketPosition == -1 Then{ if Lowest(L,BarsSinceEntry) > EntryPrice-3 Then ExitShort("sx1",AtStop,Lowest(L,BarsSinceEntry)+1.4); Else ExitShort("sx2",AtStop,Lowest(L,BarsSinceEntry)+2); } } 즐거운 하루되세요 > leekss1 님이 쓴 글입니다. > 제목 : 수식부탁드립니다----- > 청산식에서 포지션있을때 Condition1 = highest(h,x1) >= lowest(L,x1)*(1+(Per1/100)); Condition1 이면 5틱익절,10틱손절 하고 아니면 아래와같이청산하게 식좀 결합해주세요 if MarketPosition == 1 Then{ if Highest(H,BarsSinceEntry) < EntryPrice+3 Then ExitLong("bx1",AtStop,Highest(H,BarsSinceEntry)-1.4); Else ExitLong("bx2",AtStop,Highest(H,BarsSinceEntry)-2); } if MarketPosition == -1 Then{ if Lowest(L,BarsSinceEntry) > EntryPrice-3 Then ExitShort("sx1",AtStop,Lowest(L,BarsSinceEntry)+1.4); Else ExitShort("sx2",AtStop,Lowest(L,BarsSinceEntry)+2); } }