This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//@version=6 | |
strategy("MovingAvg Cross", overlay=true) | |
// === 回測期間設定 === | |
startDate = input.time(timestamp("2020-01-01T00:00:00"), "回測開始日") | |
endDate = input.time(timestamp("2025-10-01T00:00:00"), "回測結束日") | |
inRange = (time >= startDate) and (time <= endDate) | |
// === 策略參數 === | |
length = input.int(200, "Length") |