커뮤니티

수식 부탁드립니다.

프로필 이미지
시나리오
2022-09-06 21:31:41
1854
글번호 162037
답변완료
국내 선물에서 특정 조건이 되면 매수 또는 매도로 30개 진입 후 진입가격으로부터 매수집입 대비 5, 10, 15 pt 상승시 각 10개씩 분할 매도 매도진입 대비 -5, -10, 15 하락시 각 10개씩 분할 매수 하며, (각 조건별 중복 청산 없음) 조건 미달성으로 남은 잔액은 당일 종가 청산하는 식 부탁드립니다. 감사합니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2022-09-07 14:33:57

안녕하세요 예스스탁입니다. if MarketPosition <= 0 and 매수진입조건 Then Buy("b",OnClose,Def,30); if MarketPosition >= 0 and 매도진입조건 Then Sell("s",OnClose,Def,30); if MarketPosition == 1 Then { if highest(H,BarsSinceEntry) < EntryPrice+5 Then ExitLong("bx1",AtLimit,EntryPrice+5,"",10,1); if highest(H,BarsSinceEntry) < EntryPrice+10 Then ExitLong("bx2",AtLimit,EntryPrice+10,"",10,1); if highest(H,BarsSinceEntry) < EntryPrice+15 Then ExitLong("bx3",AtLimit,EntryPrice+15,"",10,1); } if MarketPosition == -1 Then { if lowest(L,BarsSinceEntry) > EntryPrice-5 Then ExitShort("sx1",AtLimit,EntryPrice-5,"",10,1); if lowest(L,BarsSinceEntry) > EntryPrice-10 Then ExitShort("sx2",AtLimit,EntryPrice-10,"",10,1); if lowest(L,BarsSinceEntry) > EntryPrice-15 Then ExitShort("sx3",AtLimit,EntryPrice-15,"",10,1); } SetStopEndofday(153000); 즐거운 하루되세요 > 시나리오 님이 쓴 글입니다. > 제목 : 수식 부탁드립니다. > 국내 선물에서 특정 조건이 되면 매수 또는 매도로 30개 진입 후 진입가격으로부터 매수집입 대비 5, 10, 15 pt 상승시 각 10개씩 분할 매도 매도진입 대비 -5, -10, 15 하락시 각 10개씩 분할 매수 하며, (각 조건별 중복 청산 없음) 조건 미달성으로 남은 잔액은 당일 종가 청산하는 식 부탁드립니다. 감사합니다.