---
# System prepended metadata

title: Untitled

---

#TradindView 指數移動平均線交叉
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © din37054

strategy('My Script',overlay=true)
longCondition=crossover(ema(close,7),ema(close,21))
if (longCondition)
    strategy.entry('My long entry ID',strategy.long,10)

shortCondition=crossunder(ema(close,7),ema(close,21))
if (shortCondition)
    strategy.entry('My short entry ID',strategy.short,10)