Edit Pine script

Техническое задание

I need to add custom backtesting dates script from FRAMA strategy to the FTSMA strategy (both are public strategies found on tradingview).

I copy pasted the following script from FRAMA and pasted it at the end of FTSMA strategy.

// === Backtesting Dates === thanks to Trost


testPeriodSwitch = input(false, "Custom Backtesting Dates")
testStartYear = input(2020, "Backtest Start Year")
testStartMonth = input(1, "Backtest Start Month")
testStartDay = input(1, "Backtest Start Day")
testStartHour = input(0, "Backtest Start Hour")
testPeriodStart = timestamp(testStartYear,testStartMonth,testStartDay,testStartHour,0)
testStopYear = input(2020, "Backtest Stop Year")
testStopMonth = input(12, "Backtest Stop Month")
testStopDay = input(31, "Backtest Stop Day")
testStopHour = input(23, "Backtest Stop Hour")
testPeriodStop = timestamp(testStopYear,testStopMonth,testStopDay,testStopHour,0)
testPeriod() =>
    time >= testPeriodStart and time <= testPeriodStop ? true : false
isPeriod = testPeriodSwitch == true ? testPeriod() : true
// === /END

if not isPeriod
    strategy.cancel_all()

    strategy.close_all()


The problem is that there is this error that i dont know how to fix:


Anyone who know pine script can fix it?


Откликнулись

1
Разработчик 1
Оценка
(3)
Проекты
3
0%
Арбитраж
2
50% / 50%
Просрочено
0
Свободен
2
Разработчик 2
Оценка
(3)
Проекты
4
0%
Арбитраж
2
0% / 100%
Просрочено
1
25%
Свободен
3
Разработчик 3
Оценка
(564)
Проекты
844
73%
Арбитраж
15
53% / 13%
Просрочено
193
23%
Свободен

Информация о проекте

Бюджет
30+ USD
Сроки выполнения
от 1 до 3 дн.