“최대 주문 수(9000개)에 다다랐습니다.” 에러가 납니다

이 오류는 전략이 허용된 최대 주문 수보다 더 많은 주문을 넣거나 더 많은 거래를 체결했음을 의미합니다. 이러한 제한은 플랜에 따라 다르며 서버가 더 효율적으로 작동할 수 있도록 합니다.

이 에러를 막으려면 파인 스크립트 v6로 전략을 변환하세요. v6에서는 한도를 넘는 모든 주문이 잘립니다. 새 주문이 거래 목록에 표시되고 주문 한도를 넘는 가장 오래된 주문이 제거됩니다.

또는 주문 조건에서 시간 범위를 확인하여 전략이 주문하는 날짜를 제한할 수 있습니다. 다음 보기 스크립트는 현재 바의 타임이 두 타임스탬프 사이에 있는지 확인하여 주문 시간 범위를 설정합니다.

Pine Script®
//@version=6
strategy("My strategy", overlay = true)

enableFilter = input(true,  "Enable Backtesting Range Filtering")
fromDate     = input.time(timestamp("20 Jul 2023 00:00 +0300"), "Start Date")
toDate       = input.time(timestamp("20 Jul 2099 00:00 +0300"), "End Date")

tradeDateIsAllowed = not enableFilter or (time >= fromDate and time <= toDate)

longCondition =  ta.crossover(ta.sma(close, 14),  ta.sma(close, 28))
shortCondition = ta.crossunder(ta.sma(close, 14), ta.sma(close, 28))

if longCondition and tradeDateIsAllowed
    strategy.entry("Long", strategy.long)

if shortCondition and tradeDateIsAllowed
    strategy.entry("Short", strategy.short)
HTML