커뮤니티
수식 부탁드립니다.
// 09시 02분 이후 진입 조건 검사
If sTime >= 090300 and sTime < 150000 Then
{
CurrMin = TimeToMinutes(sTime);
// [조건] 오늘 청산이 없었거나 OR 청산 후 60분 이상 경과했을 때
If HasExitedToday == False Or (CurrMin - LastExitMin >= 60) Then
{
// 매수 진입
If (Value8+0.0) - (Value8+0.0)[5] > 0.5
And Value18 > Value18[20]
and (bx==0 or cx==1)
Then Buy("B");
// 매도 진입
If (Value8+0.0) - (Value8+0.0)[5] < -0.5
And Value18 < Value18[20]
and (cx==0 or bx==1)
Then Sell("S");
}
}
if PositionProfit(1) >= 40 or PositionProfit(2) >= 40 Then
{
if MarketPosition==1
and MaxPositionProfit > 10
//and ma(c,2) < ma(c,4)
and c < o
Then {ExitLong("big-eb");bx=1;}
if MarketPosition==-1
and MaxPositionProfit > 10
//and ma(c,2) > ma(c,4)
and c > o
Then {ExitShort("big-es");cx=1;}
}
수익이 났을 때 수익확정하면 기존 진입로직이 살아있어서 같은봉에 2번씩 매매가 되는데 청산이없으면 두번매매없는데 청산이 들어가면 1분봉인데 2번이 매매됨
이리저리 엄청 고쳐보는데 수정이 안됩니다. 부탁드립니다.
답변 2
예스스탁 예스스탁 답변
2026-07-24 09:48:31
구름달
2026-07-27 12:54:20