커뮤니티
특정 신호의 진입횟수 제한
안녕하세요
아래의 식은 당일 1회만 진입시키기 위해서 사용하려고 하는데, 시뮬레이션 결과 2회 이상의 진입이 일어나는 경우가 빈번합니다.
무엇이 잘못되었는지 검증을 해주시면 감사하겠습니다. 챠트는 국내선물 600틱 챠트 기준입니다.
var : Scount(0);
var : T2(0);
if Bdate != Bdate[1] Then
T2 = TimeToMinutes(sTime);
if Bdate != Bdate[1] Then
Scount = 0;
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "매도" Then
Scount = Scount+1;
if CurrentContracts > CurrentContracts[1] and TotalTrades > TotalTrades[1] and IsEntryName("매도",1) == True Then
Scount = Scount+1;
if Scount < 1 Then
if H < DayOpen()
and (T2 > 0 and TimeToMinutes(Time) > T2 + 30)
and (T2 > 0 and TimeToMinutes(Time) < T2 + 360)
Then
{
Sell("매도", AtLimit,DayOpen() - PriceScale *2);
}
if MarketPosition == -1 Then
{
if IsEntryName("매도") == true Then
{
SetStopLoss(0.30,PointStop);
ExitShort("매도익절", Atlimit, EntryPrice - Pricescale*20, "매도", 1, 1);
}
}
답변 1
예스스탁 예스스탁 답변
2026-01-13 16:24:01