커뮤니티

올려준 글을 보고 수정을 해보았는데 ?

프로필 이미지
kjdkdh
2021-04-07 01:54:30
863
글번호 147765
답변완료
앞전 게시글 71083 입니다 올려준 글을 보고 수정을 해보았습니다 그런데 중간 중간에 될때가 있고 않될때가 나온는 듯 합니다 확인좀 부탁합니다 input : 완전청산 (1010); var : mav1(0),mav2(0),Lcnt(0),Hcnt(0),BH(0),SL(0); #손절식 조건 #매수 손절식 if MarketPosition == 1 Then { BH = Highest(H,BarsSinceEntry); if BH >= EntryPrice+PriceScale*60 and BH < EntryPrice+PriceScale*100 Then ExitLong("bx2",AtStop,EntryPrice+PriceScale*10); if BH >= EntryPrice+PriceScale*150 and BH < EntryPrice+PriceScale*200 Then ExitLong("bx1",AtStop,EntryPrice+PriceScale*80); if BH >= EntryPrice+PriceScale*500 and BH < EntryPrice+PriceScale*600 Then ExitLong("bx1",AtStop,EntryPrice+PriceScale*300); if BH >= EntryPrice+PriceScale*700 and BH < EntryPrice+PriceScale*900 Then ExitLong("bx1",AtStop,EntryPrice+PriceScale*400); ExitLong("bx4",AtLimit,EntryPrice+PriceScale*완전청산,"",5,1); ExitLong("bx3",AtStop,EntryPrice-PriceScale*55); } Else Lcnt = 0; #매도 손절식 if MarketPosition == -1 Then { SL = Lowest(L,BarsSinceEntry); if SL <= EntryPrice-PriceScale*60 and SL > EntryPrice-PriceScale*100 Then ExitShort("sx2",AtStop,EntryPrice-PriceScale*10); if SL <= EntryPrice-PriceScale*150 and SL > EntryPrice-PriceScale*200 Then ExitShort("sx1",AtStop,EntryPrice-PriceScale*80); if SL <= EntryPrice-PriceScale*500 and SL > EntryPrice-PriceScale*600 Then ExitShort("sx1",AtStop,EntryPrice-PriceScale*300); if SL <= EntryPrice-PriceScale*700 and SL > EntryPrice-PriceScale*900 Then ExitShort("sx1",AtStop,EntryPrice-PriceScale*400); ExitShort("sx4",AtLimit,EntryPrice-PriceScale*완전청산,"",5,1); ExitShort("sx3",AtStop,EntryPrice+PriceScale*55); } Else Hcnt = 0;
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-04-07 14:41:42

안녕하세요 예스스탁입니다. 1 작성하신 수식에 비는 수익구간이 있습니다. 100틱~150틱 200틱~500틱 600틱~750틱 900틱~완전청산직전 최고수익이 위 구간이면 청산할 내용이 없습니다. 해당 구간에 대한 내용을 추가하시거나 기존식 구간 조절하셔서 비는 구간이 없게 만드셔야 합니다. 해당 부분은 어떤 값을 지정해야 할지 알수 없어 저희가 추가 해드릴수 없습니다. 2 청산의 이름은 겹치지 않아야 합니다. 겹치는 청산이름을 다른 이름으로 지정하시기 바랍니다. 즐거운 하루되세요 > kjdkdh 님이 쓴 글입니다. > 제목 : 올려준 글을 보고 수정을 해보았는데 ? > 앞전 게시글 71083 입니다 올려준 글을 보고 수정을 해보았습니다 그런데 중간 중간에 될때가 있고 않될때가 나온는 듯 합니다 확인좀 부탁합니다 input : 완전청산 (1010); var : mav1(0),mav2(0),Lcnt(0),Hcnt(0),BH(0),SL(0); #손절식 조건 #매수 손절식 if MarketPosition == 1 Then { BH = Highest(H,BarsSinceEntry); if BH >= EntryPrice+PriceScale*60 and BH < EntryPrice+PriceScale*100 Then ExitLong("bx2",AtStop,EntryPrice+PriceScale*10); if BH >= EntryPrice+PriceScale*150 and BH < EntryPrice+PriceScale*200 Then ExitLong("bx1",AtStop,EntryPrice+PriceScale*80); if BH >= EntryPrice+PriceScale*500 and BH < EntryPrice+PriceScale*600 Then ExitLong("bx1",AtStop,EntryPrice+PriceScale*300); if BH >= EntryPrice+PriceScale*700 and BH < EntryPrice+PriceScale*900 Then ExitLong("bx1",AtStop,EntryPrice+PriceScale*400); ExitLong("bx4",AtLimit,EntryPrice+PriceScale*완전청산,"",5,1); ExitLong("bx3",AtStop,EntryPrice-PriceScale*55); } Else Lcnt = 0; #매도 손절식 if MarketPosition == -1 Then { SL = Lowest(L,BarsSinceEntry); if SL <= EntryPrice-PriceScale*60 and SL > EntryPrice-PriceScale*100 Then ExitShort("sx2",AtStop,EntryPrice-PriceScale*10); if SL <= EntryPrice-PriceScale*150 and SL > EntryPrice-PriceScale*200 Then ExitShort("sx1",AtStop,EntryPrice-PriceScale*80); if SL <= EntryPrice-PriceScale*500 and SL > EntryPrice-PriceScale*600 Then ExitShort("sx1",AtStop,EntryPrice-PriceScale*300); if SL <= EntryPrice-PriceScale*700 and SL > EntryPrice-PriceScale*900 Then ExitShort("sx1",AtStop,EntryPrice-PriceScale*400); ExitShort("sx4",AtLimit,EntryPrice-PriceScale*완전청산,"",5,1); ExitShort("sx3",AtStop,EntryPrice+PriceScale*55); } Else Hcnt = 0;