커뮤니티

문의드립니다.

프로필 이미지
마식
2023-01-08 23:30:04
1018
글번호 165204
답변완료
if MarketPosition == 1 Then { ExitLong("반익+1",AtLimit,EntryPrice*1.1,"",1,1); ExitLong("완익+1",AtLimit,EntryPrice*(1.2),"",1,1); if CurrentContracts == MaxContracts Then ExitLong("손절+1",AtStop,EntryPrice*0.9); Else ExitLong("진입가손절+1",AtStop,EntryPrice*1); } 안녕하세요 위 수식에서 위쪽에 두줄은 data1로 진행하고 아래쪽 손절 2줄은 data2로 진행 가능할까요??
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2023-01-09 11:33:58

안녕하세요. 예스스탁 입니다. Data2가 동일 종목인지 혹은 타 종목인지에 따라 조건 만족 시 바로 진입/청산하는 Atstop, AtLimit을 활용하지 못하실 수 있습니다. 동일 종목 여부가 중요하며 주기는 달라도 상관없습니다. 아래 수식을 상황에 맞게 활용하시기 바랍니다. 즐거운 하루 보내세요. VAR : C2(0,Data1); c2 = Data2(C); if MarketPosition == 1 Then { ExitLong("반익+1",AtLimit,EntryPrice*1.1,"",1,1); ExitLong("완익+1",AtLimit,EntryPrice*(1.2),"",1,1); #1. 기본차트와 참조데이타가 같은 종목일 경우 if CurrentContracts == MaxContracts Then ExitLong("손절+1",AtStop,c2[BarsSinceEntry]*0.9); Else ExitLong("진입가손절+1",AtStop,c2[BarsSinceEntry]*1); #2. 기본차트와 참조데이타가 다른 종목일 경우 if CurrentContracts == MaxContracts Then { IF data2(c) <= c2[BarsSinceEntry]*0.9 TheN ExitLong(); } Else { IF data2(c) <= c2[BarsSinceEntry]*1 TheN ExitLong(); } } > 마식 님이 쓴 글입니다. > 제목 : 문의드립니다. > if MarketPosition == 1 Then { ExitLong("반익+1",AtLimit,EntryPrice*1.1,"",1,1); ExitLong("완익+1",AtLimit,EntryPrice*(1.2),"",1,1); if CurrentContracts == MaxContracts Then ExitLong("손절+1",AtStop,EntryPrice*0.9); Else ExitLong("진입가손절+1",AtStop,EntryPrice*1); } 안녕하세요 위 수식에서 위쪽에 두줄은 data1로 진행하고 아래쪽 손절 2줄은 data2로 진행 가능할까요??