I see 'Order's limit (9000) was reached' error

This error means that the number of orders the strategy can execute on the chart has reached the max level of 9000. The limitation is enabled for our servers to work more efficiently. 

The only alternative we can suggest is to plot a strategy with the fixed start date rather than from the beginning of the data history. You can add a date filtering by using timestamp function the order condition, where time is the time of the current bar and timestamp() is the feature converting date and time to UNIX format. Please see the function description in the Pine Reference Manual.

Here's an example:

strategy("My strategy", overlay=true, margin_long=100, margin_short=100)

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)