커뮤니티

감사드리며 재부탁드립니다

프로필 이미지
오동도물개
2014-04-01 14:24:33
162
글번호 73996
답변완료
아래의 식에 조건문을 하나더 추가로 넣고싶은데 내용은,,,이미있는 조건문은 그대로 두고요.. 바로앞에 청산된 진입가보다 커야만 재매수신호가 나오고 바로앞에 청산된 진입가보다 작아야만 재매도신호가 나와라는 조건문을 달고 싶습니다 예를들어 앞에 매도진입후 청산된것이 있는데 그다음 매수신호가 나오면 매수진입가는 앞의 매도진입가보다 커야만 재매수신호가 성립되는 것이고 예를들어 앞에 매수진입후 청산된것이 있는데 그다음 매도신호가 나오면 매도진입가는 앞의 매수진입가보다 작아야만 재매도신호가 성립된다는 것입니다 암튼 바로앞의 진입가보다 크거나 작아야만 재진입신호가 성립되게끔 조건문을 설정하여 주시면 감사하겠습니다. 결국 앞의 진입가와 청산가보다 커야만 재매수신호가 나오고 앞의 진입가와 청산가보다 작아야만 재매도신호가 나오는 조건문입니다. if CrossUp(c,r1) and stime >= 090100 and stime < 145000 and r1>=DayOpen+0.45 and r19>=fr[2] and count < N Then{ if count == 0 or (count >= 1 and MarketPosition == -1) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C > ExitPrice(1)) or (count >= 1 and MarketPosition == 0 and C > ExitPrice(1) and MarketPosition(1) == 1 and PositionProfit(1) > 0) or (count >= 1 and MarketPosition == 0 and C > ExitPrice(1) and MarketPosition(1) == 1 and PositionProfit(1) <= 0 and Fr[2] != Fr[2][BarsSinceEntry(1)]) Then buy("매수1"); } if CrossUp(c,r2) and stime >= 090100 and stime < 145000 and r20>=DayOpen+0.45 and r2>=fr[2] and count < N Then{ if count == 0 or (count >= 1 and MarketPosition == -1) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C > ExitPrice(1)) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == 1 and C > ExitPrice(1) and PositionProfit(1) > 0) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == 1 and C > ExitPrice(1) and PositionProfit(1) <= 0 and Fr[2] != Fr[2][BarsSinceEntry(1)]) Then buy("매수2"); } if CrossDown(c,s1) and stime >= 090100 and stime < 145000 and s1==DayOpen-0.45 and s1==fr[4] and count < N Then{ if count == 0 or (count >= 1 and MarketPosition == 1) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == 1 and C < ExitPrice(1)) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C < ExitPrice(1) and PositionProfit(1) > 0) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C < ExitPrice(1) and PositionProfit(1) <= 0 and Fr[4] != Fr[4][BarsSinceEntry(1)]) Then Sell("매도1"); } if CrossDown(c,s2) and stime >= 090100 and stime < 145000 and s2==DayOpen-0.45 and s2==fr[4] and count < N Then{ if count == 0 or (count >= 1 and MarketPosition == 1) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == 1 and C < ExitPrice(1)) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C < ExitPrice(1) and PositionProfit(1) > 0) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C < ExitPrice(1) and PositionProfit(1) <= 0 and Fr[4] != Fr[4][BarsSinceEntry(1)]) Then Sell("매도2"); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2014-04-01 15:37:45

안녕하세요 예스스탁입니다. if CrossUp(c,r1) and stime >= 090100 and stime < 145000 and r1>=DayOpen+0.45 and r19>=fr[2] and count < N Then{ if count == 0 or (count >= 1 and MarketPosition == -1) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C > ExitPrice(1)and C > EntryPrice(1)) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == 1 and C > ExitPrice(1) and C > EntryPrice(1) and PositionProfit(1) > 0) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == 1 and C > ExitPrice(1) and C > EntryPrice(1) and PositionProfit(1) <= 0 and Fr[2] != Fr[2][BarsSinceEntry(1)]) Then buy("매수1"); } if CrossUp(c,r2) and stime >= 090100 and stime < 145000 and r20>=DayOpen+0.45 and r2>=fr[2] and count < N Then{ if count == 0 or (count >= 1 and MarketPosition == -1) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C > ExitPrice(1)and C > EntryPrice(1)) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == 1 and C > ExitPrice(1) and C > EntryPrice(1) and PositionProfit(1) > 0) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == 1 and C > ExitPrice(1) and C > EntryPrice(1) and PositionProfit(1) <= 0 and Fr[2] != Fr[2][BarsSinceEntry(1)]) Then buy("매수2"); } if CrossDown(c,s1) and stime >= 090100 and stime < 145000 and s1==DayOpen-0.45 and s1==fr[4] and count < N Then{ if count == 0 or (count >= 1 and MarketPosition == 1) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == 1 and C < ExitPrice(1) and C < EntryPrice(1)) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C < ExitPrice(1) and C < EntryPrice(1) and PositionProfit(1) > 0) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C < ExitPrice(1) and C < EntryPrice(1) and PositionProfit(1) <= 0 and Fr[4] != Fr[4][BarsSinceEntry(1)]) Then Sell("매도1"); } if CrossDown(c,s2) and stime >= 090100 and stime < 145000 and s2==DayOpen-0.45 and s2==fr[4] and count < N Then{ if count == 0 or (count >= 1 and MarketPosition == 1) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == 1 and C < ExitPrice(1) and C < EntryPrice(1)) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C < ExitPrice(1) and C < EntryPrice(1) and PositionProfit(1) > 0) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C < ExitPrice(1) and C < EntryPrice(1) and PositionProfit(1) <= 0 and Fr[4] != Fr[4][BarsSinceEntry(1)]) Then Sell("매도2"); } 즐거운 하루되세요 > 오동도물개 님이 쓴 글입니다. > 제목 : 감사드리며 재부탁드립니다 > 아래의 식에 조건문을 하나더 추가로 넣고싶은데 내용은,,,이미있는 조건문은 그대로 두고요.. 바로앞에 청산된 진입가보다 커야만 재매수신호가 나오고 바로앞에 청산된 진입가보다 작아야만 재매도신호가 나와라는 조건문을 달고 싶습니다 예를들어 앞에 매도진입후 청산된것이 있는데 그다음 매수신호가 나오면 매수진입가는 앞의 매도진입가보다 커야만 재매수신호가 성립되는 것이고 예를들어 앞에 매수진입후 청산된것이 있는데 그다음 매도신호가 나오면 매도진입가는 앞의 매수진입가보다 작아야만 재매도신호가 성립된다는 것입니다 암튼 바로앞의 진입가보다 크거나 작아야만 재진입신호가 성립되게끔 조건문을 설정하여 주시면 감사하겠습니다. 결국 앞의 진입가와 청산가보다 커야만 재매수신호가 나오고 앞의 진입가와 청산가보다 작아야만 재매도신호가 나오는 조건문입니다. if CrossUp(c,r1) and stime >= 090100 and stime < 145000 and r1>=DayOpen+0.45 and r19>=fr[2] and count < N Then{ if count == 0 or (count >= 1 and MarketPosition == -1) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C > ExitPrice(1)) or (count >= 1 and MarketPosition == 0 and C > ExitPrice(1) and MarketPosition(1) == 1 and PositionProfit(1) > 0) or (count >= 1 and MarketPosition == 0 and C > ExitPrice(1) and MarketPosition(1) == 1 and PositionProfit(1) <= 0 and Fr[2] != Fr[2][BarsSinceEntry(1)]) Then buy("매수1"); } if CrossUp(c,r2) and stime >= 090100 and stime < 145000 and r20>=DayOpen+0.45 and r2>=fr[2] and count < N Then{ if count == 0 or (count >= 1 and MarketPosition == -1) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C > ExitPrice(1)) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == 1 and C > ExitPrice(1) and PositionProfit(1) > 0) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == 1 and C > ExitPrice(1) and PositionProfit(1) <= 0 and Fr[2] != Fr[2][BarsSinceEntry(1)]) Then buy("매수2"); } if CrossDown(c,s1) and stime >= 090100 and stime < 145000 and s1==DayOpen-0.45 and s1==fr[4] and count < N Then{ if count == 0 or (count >= 1 and MarketPosition == 1) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == 1 and C < ExitPrice(1)) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C < ExitPrice(1) and PositionProfit(1) > 0) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C < ExitPrice(1) and PositionProfit(1) <= 0 and Fr[4] != Fr[4][BarsSinceEntry(1)]) Then Sell("매도1"); } if CrossDown(c,s2) and stime >= 090100 and stime < 145000 and s2==DayOpen-0.45 and s2==fr[4] and count < N Then{ if count == 0 or (count >= 1 and MarketPosition == 1) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == 1 and C < ExitPrice(1)) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C < ExitPrice(1) and PositionProfit(1) > 0) or (count >= 1 and MarketPosition == 0 and MarketPosition(1) == -1 and C < ExitPrice(1) and PositionProfit(1) <= 0 and Fr[4] != Fr[4][BarsSinceEntry(1)]) Then Sell("매도2"); }