커뮤니티

수정부탁드립니다.

프로필 이미지
왈라스
2023-04-27 10:21:26
883
글번호 168538
답변완료
작성해주신 시스템식이 매도만 진입합니다. 매수도 진입할수 잇도록 수정 부탁드립니다. /////////////////////////////////////////// input : P1(20),P2(60),조정틱(5),감시틱수(10); var : mav1(0),mav2(0),T(0),B(0),S(0); mav1 = ma(C,P1); mav2 = ma(C,P2); if CrossUp(mav1,mav2) Then { T = 1; B = C; } if CrossDown(mav1,mav2) Then { T = -1; S = C; } if T == 1 and S > 0 Then Buy("b",AtStop,S+PriceScale*조정틱); if T == -1 Then Sell("S",AtStop,S-PriceScale*조정틱); if MarketPosition == 1 Then { B = 0; if highest(H,BarsSinceEntry) >= EntryPrice+감시틱수 Then ExitLong("bx",AtStop,EntryPrice); } if MarketPosition == -1 Then { S = 0; if Lowest(L,BarsSinceEntry) <= EntryPrice-감시틱수 Then ExitShort("sx",AtStop,EntryPrice); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2023-04-27 13:03:51

안녕하세요 예스스탁입니다. input : P1(20),P2(60),조정틱(5),감시틱수(10); var : mav1(0),mav2(0),T(0),B(0),S(0); mav1 = ma(C,P1); mav2 = ma(C,P2); if CrossUp(mav1,mav2) Then { T = 1; B = C; } if CrossDown(mav1,mav2) Then { T = -1; S = C; } if T == 1 and B > 0 Then Buy("b",AtStop,B+PriceScale*조정틱); if T == -1 and S > 0 Then Sell("S",AtStop,S-PriceScale*조정틱); if MarketPosition == 1 Then { B = 0; if highest(H,BarsSinceEntry) >= EntryPrice+감시틱수 Then ExitLong("bx",AtStop,EntryPrice); } if MarketPosition == -1 Then { S = 0; if Lowest(L,BarsSinceEntry) <= EntryPrice-감시틱수 Then ExitShort("sx",AtStop,EntryPrice); } SetStopEndofday(150000); 즐거운 하루되세요 > 왈라스 님이 쓴 글입니다. > 제목 : 수정부탁드립니다. > 작성해주신 시스템식이 매도만 진입합니다. 매수도 진입할수 잇도록 수정 부탁드립니다. /////////////////////////////////////////// input : P1(20),P2(60),조정틱(5),감시틱수(10); var : mav1(0),mav2(0),T(0),B(0),S(0); mav1 = ma(C,P1); mav2 = ma(C,P2); if CrossUp(mav1,mav2) Then { T = 1; B = C; } if CrossDown(mav1,mav2) Then { T = -1; S = C; } if T == 1 and S > 0 Then Buy("b",AtStop,S+PriceScale*조정틱); if T == -1 Then Sell("S",AtStop,S-PriceScale*조정틱); if MarketPosition == 1 Then { B = 0; if highest(H,BarsSinceEntry) >= EntryPrice+감시틱수 Then ExitLong("bx",AtStop,EntryPrice); } if MarketPosition == -1 Then { S = 0; if Lowest(L,BarsSinceEntry) <= EntryPrice-감시틱수 Then ExitShort("sx",AtStop,EntryPrice); }