커뮤니티

진입명에 따른 재진입 질문입니다.

프로필 이미지
yanartas
2015-06-14 11:17:50
93
글번호 87178
답변완료
선물시스템에서 진입에 관한 질문입니다. 예를들어 진입식이 다음과 같고, input : A1(10), B1(20); if marketposition(0) == 0 and crossup(c, ma(A1)) then { buy("L1", atmarket, def, 1); } if marketposition(0) == 0 and crossup(c, ma(B1)) then { buy("L2", atmarket, def, 1); } 청산식이 다음과 같을때, input : C1(15), D1(25); if marketpostion(0) == 1 and isentryname("L1") == true and crossdown(c, ma(C1)) then { exitlong("X1", atmarket); } if marketpostion(0) == 1 and isentryname("L1") == true and crossdown(c, ma(C1)) then { exitlong("X2", atmarket); } 이와 같은 시스템이 있다고 가정할때, 질문입니다. 진입신호 "L1"과 청산신호 "X1"이 끝난 후 3point 상승하면 "L11"이라는 이름으로 재진입, 진입신호 "L2"와 청산신호 "X2"가 끝난 후 5point 상승하면 "L22"라는 이름으로 재진입, 하는 시스템을 작성하고 싶습니다. 즉, "L1", "X1" 거래 후 나올 수 있는 거래는 "L1", "L2", 그리고 "L11" 뿐이고, "L2", "X2" 거래 후 나올 수 있는 거래는 "L1", "L2", 그리고 "L22" 뿐이도록 시스템을 작성하고 싶습니다. 간단한 예시를 통해서 설명 부탁드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-06-15 10:09:46

안녕하세요 예스스탁입니다. input : A1(10), B1(20); if marketposition(0) == 0 and crossup(c, ma(c,A1)) then { buy("L1", atmarket, def, 1); } if marketposition(0) == 0 and crossup(c, ma(c,B1)) then { buy("L2", atmarket, def, 1); } input : C1(15), D1(25); if MarketPosition(0) == 1 and isentryname("L1") == true and crossdown(c, ma(c,C1)) then { exitlong("X1", atmarket); } if MarketPosition(0) == 1 and isentryname("L1") == true and crossdown(c, ma(c,C1)) then { exitlong("X2", atmarket); } if MarketPosition == 0 and IsentryName("L1",1) == true and IsExitName("X1",1) == true Then buy("L11",AtStop,ExitPrice(1)+3); if MarketPosition == 0 and IsentryName("L2",1) == true and IsExitName("X2",1) == true Then buy("L22",AtStop,ExitPrice(1)+5); 즐거운 하루되세요 > yanartas 님이 쓴 글입니다. > 제목 : 진입명에 따른 재진입 질문입니다. > 선물시스템에서 진입에 관한 질문입니다. 예를들어 진입식이 다음과 같고, input : A1(10), B1(20); if marketposition(0) == 0 and crossup(c, ma(A1)) then { buy("L1", atmarket, def, 1); } if marketposition(0) == 0 and crossup(c, ma(B1)) then { buy("L2", atmarket, def, 1); } 청산식이 다음과 같을때, input : C1(15), D1(25); if marketpostion(0) == 1 and isentryname("L1") == true and crossdown(c, ma(C1)) then { exitlong("X1", atmarket); } if marketpostion(0) == 1 and isentryname("L1") == true and crossdown(c, ma(C1)) then { exitlong("X2", atmarket); } 이와 같은 시스템이 있다고 가정할때, 질문입니다. 진입신호 "L1"과 청산신호 "X1"이 끝난 후 3point 상승하면 "L11"이라는 이름으로 재진입, 진입신호 "L2"와 청산신호 "X2"가 끝난 후 5point 상승하면 "L22"라는 이름으로 재진입, 하는 시스템을 작성하고 싶습니다. 즉, "L1", "X1" 거래 후 나올 수 있는 거래는 "L1", "L2", 그리고 "L11" 뿐이고, "L2", "X2" 거래 후 나올 수 있는 거래는 "L1", "L2", 그리고 "L22" 뿐이도록 시스템을 작성하고 싶습니다. 간단한 예시를 통해서 설명 부탁드립니다.