커뮤니티

다시 문의드립니다

프로필 이미지
파파리리
2016-03-28 22:26:52
66
글번호 96656
답변완료
input : DD(0.3);//0.5이상 수익후 최고/최저에서 0.3반대로 움직이면 청산 var : LL(0),HH(0); LL = lowest(L,2); HH = highest(H,2); if stime >= 090500 and stime < 133000 then{ if MarketPosition == 0 and h[1] > h[2] and C < (H[1]+L[2])/2 Then sell(); if MarketPosition == 0 and L[1] < L[2] and C > (L[1]+H[2])/2 Then buy(); } if MarketPosition == 1 Then{ ExitLong("수손절",AtStop,LL[BarsSinceEntry]-PriceScale); if highest(H,BarsSinceEntry) >= EntryPrice+0.5 Then ExitLong("수수익2",AtLimit,highest(H,BarsSinceEntry)-dd); } if MarketPosition == -1 Then{ ExitShort("도손절",AtStop,HH[BarsSinceEntry]+PriceScale); if Lowest(L,BarsSinceEntry) <= EntryPrice-0.5 Then ExitShort("도수익2",AtLimit,Lowest(L,BarsSinceEntry)+dd); } 위식을 만드어 주신것입니다 손절신호는 잘나오고요 진입후 0.50찍고 반대로 움질여서0.30이 다음면 청산해야하나 매수 와 도매 둘다 진입후에 그냥 0.5에 수익청산되고 있습니다 아무리 dd(0)조정해봐도요 다시검도 부탁드립니다
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-03-29 10:42:49

안녕하세요 예스스탁입니다. 죄송합니다.신호의 타입이 잘못되어 있습니다. 수정해서 올려드립니다. input : DD(0.3);//0.5이상 수익후 최고/최저에서 0.3반대로 움직이면 청산 var : LL(0),HH(0); LL = lowest(L,2); HH = highest(H,2); if stime >= 090500 and stime < 133000 then{ if MarketPosition == 0 and h[1] > h[2] and C < (H[1]+L[2])/2 Then sell(); if MarketPosition == 0 and L[1] < L[2] and C > (L[1]+H[2])/2 Then buy(); } if MarketPosition == 1 Then{ ExitLong("수손절",AtStop,LL[BarsSinceEntry]-PriceScale); if highest(H,BarsSinceEntry) >= EntryPrice+0.5 Then ExitLong("수수익2",AtStop,highest(H,BarsSinceEntry)-dd); } if MarketPosition == -1 Then{ ExitShort("도손절",AtStop,HH[BarsSinceEntry]+PriceScale); if Lowest(L,BarsSinceEntry) <= EntryPrice-0.5 Then ExitShort("도수익2",AtStop,Lowest(L,BarsSinceEntry)+dd); } 즐거운 하루되세요 > 파파리리 님이 쓴 글입니다. > 제목 : 다시 문의드립니다 > input : DD(0.3);//0.5이상 수익후 최고/최저에서 0.3반대로 움직이면 청산 var : LL(0),HH(0); LL = lowest(L,2); HH = highest(H,2); if stime >= 090500 and stime < 133000 then{ if MarketPosition == 0 and h[1] > h[2] and C < (H[1]+L[2])/2 Then sell(); if MarketPosition == 0 and L[1] < L[2] and C > (L[1]+H[2])/2 Then buy(); } if MarketPosition == 1 Then{ ExitLong("수손절",AtStop,LL[BarsSinceEntry]-PriceScale); if highest(H,BarsSinceEntry) >= EntryPrice+0.5 Then ExitLong("수수익2",AtLimit,highest(H,BarsSinceEntry)-dd); } if MarketPosition == -1 Then{ ExitShort("도손절",AtStop,HH[BarsSinceEntry]+PriceScale); if Lowest(L,BarsSinceEntry) <= EntryPrice-0.5 Then ExitShort("도수익2",AtLimit,Lowest(L,BarsSinceEntry)+dd); } 위식을 만드어 주신것입니다 손절신호는 잘나오고요 진입후 0.50찍고 반대로 움질여서0.30이 다음면 청산해야하나 매수 와 도매 둘다 진입후에 그냥 0.5에 수익청산되고 있습니다 아무리 dd(0)조정해봐도요 다시검도 부탁드립니다