커뮤니티

질문드립니다.

프로필 이미지
stockric
2017-07-03 23:20:15
156
글번호 110965
답변완료

첨부 이미지

밑의 질문과 구분이 어려울 수 있어 따로올립니다. 작성자님이 올려준 로직대로 해보았는데요. Condition2 = (Close+PriceScale*2); If p < P[5] Then If Condition2 and MRO(Condition2,3,2)= = -1 Then{ If Close < h range value Then If Close > l range value Then If MarketPosition = = 0 Then Sell("중돌매도");} if MarketPosition = = -1 then{ If Close < l range value Then ExitShort(); if CountIF(CrossDown(c,m3),BarsSinceEntry) >= 1 and CrossUp(C,m3) Then // H1 ExitShort("h1청산",OnClose,EntryPrice); if CountIF(CrossDown(c,r1+m3/2),BarsSinceEntry) >= 1 and CrossUp(C,r1+m3/2) Then // H2 ExitShort("h2청산",OnClose,EntryPrice); if CountIF(CrossDown(c,r1),BarsSinceEntry) >= 1 and CrossUp(C,r1) Then // H3 ExitShort("h3short",OnClose,EntryPrice); SetStopLoss(12*PriceScale); If sTime== 050000 or(sTime > 050000 and 050000 < sTime) Then{ ExitLong(); ExitShort();} } if marketposition == 0 then 조건을 주어도 바로 청산이되네요. 그리고 매수에 stoploss로 12틱을 걸었는데 청산지점이 희한한 곳에서 됩니다. 2.각 라인에서 crossup과 crossdown이 같이 일어나는 에러가 나는걸까요. 전혀 그럴일은 barssinceentry때문에 그럴일은 없는데 말이지요.. 3. condition1~ then 매도로 12틱 손절하였는데 손절한 캔들 바로 한 캔들 전이 매수신호 였다면 현재캔들에서 추격매수 이건 로직으로 할려면 어떻게 해야할까요? 총 첨부하겠습니다. 늘 노고에 감사드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-07-04 14:28:33

> stockric 님이 쓴 글입니다. > 제목 : 질문드립니다. > 밑의 질문과 구분이 어려울 수 있어 따로올립니다. 작성자님이 올려준 로직대로 해보았는데요. Condition2 = (Close+PriceScale*2); If p < P[5] Then If Condition2 and MRO(Condition2,3,2)= = -1 Then{ If Close < h range value Then If Close > l range value Then If MarketPosition = = 0 Then Sell("중돌매도");} if MarketPosition = = -1 then{ If Close < l range value Then ExitShort(); if CountIF(CrossDown(c,m3),BarsSinceEntry) >= 1 and CrossUp(C,m3) Then // H1 ExitShort("h1청산",OnClose,EntryPrice); if CountIF(CrossDown(c,r1+m3/2),BarsSinceEntry) >= 1 and CrossUp(C,r1+m3/2) Then // H2 ExitShort("h2청산",OnClose,EntryPrice); if CountIF(CrossDown(c,r1),BarsSinceEntry) >= 1 and CrossUp(C,r1) Then // H3 ExitShort("h3short",OnClose,EntryPrice); SetStopLoss(12*PriceScale); If sTime== 050000 or(sTime > 050000 and 050000 < sTime) Then{ ExitLong(); ExitShort();} } if marketposition == 0 then 조건을 주어도 바로 청산이되네요. 그리고 매수에 stoploss로 12틱을 걸었는데 청산지점이 희한한 곳에서 됩니다. 2.각 라인에서 crossup과 crossdown이 같이 일어나는 에러가 나는걸까요. 전혀 그럴일은 barssinceentry때문에 그럴일은 없는데 말이지요.. 3. condition1~ then 매도로 12틱 손절하였는데 손절한 캔들 바로 한 캔들 전이 매수신호 였다면 현재캔들에서 추격매수 이건 로직으로 할려면 어떻게 해야할까요? 총 첨부하겠습니다. 늘 노고에 감사드립니다.