커뮤니티

문의드립니다.

프로필 이미지
카르마다
2023-01-16 16:15:54
668
글번호 165476
답변완료
5, 20선 골든/데드 선물매매에서 골든 신호를 만족했으나 신호나온 봉이 30틱이상 상승한 장대양봉의 경우 일반적인 청산(30틱 이상 하락시 손절, 20틱 이상 상승후 15틱 하락시 트레일링스탑, 5/10선 데드시 청산등)과 달리 해당 봉의 고가와 저가 중간가격을 이탈하면 전량 청산되는 별도 수식을 부탁 드립니다. 매도는 그 반대입니다. 미리 노고에 감사드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2023-01-17 13:41:26

안녕하세요. 예스스탁 입니다. var : mav1(0),mav2(0),mav3(0); mav1 = ma(C,5); mav2 = ma(C,10); mav3 = ma(C,20); if MarketPosition <= 0 and CrossUp(mav1,mav3) Then { Buy("b"); } if MarketPosition == 1 Then { if C[BarsSinceEntry] >= O[BarsSinceEntry]+(PriceScale*30) Then { ExitLong("bx12",AtStop,(H[BarsSinceEntry]+L[BarsSinceEntry])/2); # 진입봉 조건에 따라 다른 청산 } Else { ExitLong("bl",AtStop,EntryPrice-PriceScale*30); # 손절 if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*20 Then # 익절 ExitLong("btr",AtStop,highest(H,BarsSinceEntry)-PriceScale*10); if CrossDown(mav1,mav2) Then # 데드크로스 청산 ExitLong("bx"); } } if MarketPosition >= 0 and CrossDown(mav1,mav3) Then { Sell("s"); } if MarketPosition == -1 Then { if C[BarsSinceEntry] <= O[BarsSinceEntry]-(PriceScale*30) Then { ExitShort("sx12",AtStop,(H[BarsSinceEntry]+L[BarsSinceEntry])/2); } Else { ExitShort("sl",AtStop,EntryPrice+PriceScale*30); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*20 Then ExitShort("str",AtStop,lowest(L,BarsSinceEntry)+PriceScale*10); if CrossUp(mav1,mav2) Then ExitShort("sx"); } } 즐거운 하루 보내세요. > 카르마다 님이 쓴 글입니다. > 제목 : 문의드립니다. > 5, 20선 골든/데드 선물매매에서 골든 신호를 만족했으나 신호나온 봉이 30틱이상 상승한 장대양봉의 경우 일반적인 청산(30틱 이상 하락시 손절, 20틱 이상 상승후 15틱 하락시 트레일링스탑, 5/10선 데드시 청산등)과 달리 해당 봉의 고가와 저가 중간가격을 이탈하면 전량 청산되는 별도 수식을 부탁 드립니다. 매도는 그 반대입니다. 미리 노고에 감사드립니다.