Skip to content

Instantly share code, notes, and snippets.

View Softfree38's full-sized avatar

William-Softfree38 Softfree38

View GitHub Profile
//@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")