커뮤니티

수식 부탁드립니다.

프로필 이미지
spek
2015-05-21 12:15:58
139
글번호 86275
답변완료

첨부 이미지

안녕하세요? 매번 성의있는 답변 감사드립니다. 그 동안 잘 작동 했던 것 같은데 또 안되네요. 아래식은 짜주셨던 식입니다. 그림에서 보시면 가운데 가장 긴 장대양봉이 16시 봉입니다. 봉이 길어서 저 봉안에서 진입신호가 걸렸습니다. (10분 봉을 사용합니다.) 그런데 진입 신호가 다음 봉에서 걸리면 잘 되는데, 이 경우 처럼 봉이 매우 길어서 바로 그 봉안에서 신호가 걸려야 될때는 신호가 걸리지를 않네요. 그래서 그냥 감지 못하고 넘어갑니다. 15시 50분봉의 시고저종과 16시 봉의 시가를 사용하니, 16시 봉에서 진입신호가 나오면 바로 걸려야 되는 것 아닌가요? input : N(1); var : loss(0); if stime == 160000 or (stime > 160000 and stime[1] < 160000) Then{ var1 = O; Loss = 0; } if MarketPosition == 0 and CurrentContracts < CurrentContracts[1] and (IsExitName("bx",1) == true or IsExitName("sx",1) == true) Then loss = loss+1; if loss < N then{ if MarketPosition == 0 and stime == 155000 Then buy("b",AtStop,round(NextBarOpen*1.01,3)); if MarketPosition == 0 and stime == 155000 Then sell("s",AtStop,round(NextBarOpen*0.99,3)); if MarketPosition == 0 and NextBarOpen <= round(var1*1.01,3) Then buy("b1",AtStop,round(var1*1.01,3)); if MarketPosition == 0 and NextBarOpen > round(var1*1.01,3) Then buy("b2",Atlimit,round(var1*1.01,3)); if MarketPosition == 0 and NextBarOpen >= round(var1*0.99,3) Then sell("s1",AtStop,round(var1*0.99,3)); if MarketPosition == 0 and NextBarOpen < round(var1*0.99,3) Then sell("s2",AtLimit,round(var1*0.99,3)); } if MarketPosition == 1 Then ExitLong("bx",AtStop,round(EntryPrice*0.99,3)); if MarketPosition == -1 Then ExitShort("sx",AtStop,round(EntryPrice*1.01,3));
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-05-21 18:07:05

안녕하세요 예스스탁입니다. loss < N 이라는 조건이 15시 50분에 셋팅되는 식까지 포함을 시켜서 신호가 나오지 않았습니다. 아래수정한 식입니다. input : N(1); var : loss(0); if stime == 160000 or (stime > 160000 and stime[1] < 160000) Then{ var1 = O; Loss = 0; } if MarketPosition == 0 and CurrentContracts < CurrentContracts[1] and (IsExitName("bx",1) == true or IsExitName("sx",1) == true) Then loss = loss+1; if MarketPosition == 0 and stime == 155000 Then buy("b",AtStop,round(NextBarOpen*1.01,3)); if MarketPosition == 0 and stime == 155000 Then sell("s",AtStop,round(NextBarOpen*0.99,3)); if loss < N then{ if MarketPosition == 0 and NextBarOpen <= round(var1*1.01,3) Then buy("b1",AtStop,round(var1*1.01,3)); if MarketPosition == 0 and NextBarOpen > round(var1*1.01,3) Then buy("b2",Atlimit,round(var1*1.01,3)); if MarketPosition == 0 and NextBarOpen >= round(var1*0.99,3) Then sell("s1",AtStop,round(var1*0.99,3)); if MarketPosition == 0 and NextBarOpen < round(var1*0.99,3) Then sell("s2",AtLimit,round(var1*0.99,3)); } if MarketPosition == 1 Then ExitLong("bx",AtStop,round(EntryPrice*0.99,3)); if MarketPosition == -1 Then ExitShort("sx",AtStop,round(EntryPrice*1.01,3)); 즐거운 하루되세요 > spek 님이 쓴 글입니다. > 제목 : 수식 부탁드립니다. > 안녕하세요? 매번 성의있는 답변 감사드립니다. 그 동안 잘 작동 했던 것 같은데 또 안되네요. 아래식은 짜주셨던 식입니다. 그림에서 보시면 가운데 가장 긴 장대양봉이 16시 봉입니다. 봉이 길어서 저 봉안에서 진입신호가 걸렸습니다. (10분 봉을 사용합니다.) 그런데 진입 신호가 다음 봉에서 걸리면 잘 되는데, 이 경우 처럼 봉이 매우 길어서 바로 그 봉안에서 신호가 걸려야 될때는 신호가 걸리지를 않네요. 그래서 그냥 감지 못하고 넘어갑니다. 15시 50분봉의 시고저종과 16시 봉의 시가를 사용하니, 16시 봉에서 진입신호가 나오면 바로 걸려야 되는 것 아닌가요? input : N(1); var : loss(0); if stime == 160000 or (stime > 160000 and stime[1] < 160000) Then{ var1 = O; Loss = 0; } if MarketPosition == 0 and CurrentContracts < CurrentContracts[1] and (IsExitName("bx",1) == true or IsExitName("sx",1) == true) Then loss = loss+1; if loss < N then{ if MarketPosition == 0 and stime == 155000 Then buy("b",AtStop,round(NextBarOpen*1.01,3)); if MarketPosition == 0 and stime == 155000 Then sell("s",AtStop,round(NextBarOpen*0.99,3)); if MarketPosition == 0 and NextBarOpen <= round(var1*1.01,3) Then buy("b1",AtStop,round(var1*1.01,3)); if MarketPosition == 0 and NextBarOpen > round(var1*1.01,3) Then buy("b2",Atlimit,round(var1*1.01,3)); if MarketPosition == 0 and NextBarOpen >= round(var1*0.99,3) Then sell("s1",AtStop,round(var1*0.99,3)); if MarketPosition == 0 and NextBarOpen < round(var1*0.99,3) Then sell("s2",AtLimit,round(var1*0.99,3)); } if MarketPosition == 1 Then ExitLong("bx",AtStop,round(EntryPrice*0.99,3)); if MarketPosition == -1 Then ExitShort("sx",AtStop,round(EntryPrice*1.01,3));