Edit Pine script

MQL5 스크립트 컨설팅

명시

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
등급
(550)
프로젝트
827
73%
중재
15
53% / 13%
기한 초과
193
23%
작업중

프로젝트 정보

예산
30+ USD
VAT (19%): 5.7 USD
총: 35.7 USD
개발자에게
27 USD
기한
에서 1  3 일