ryanf51

SMA Crossover demo

Hi I'm currently in the process of learning to write a script. Here's a very basic SMA 34/5 crossover script. Is somebody able to help me with adding the following functions to the script.

1. Add an alert and indicator to close a short or long trade whenever any candle touches the SMA 34 line?

2. When a SMA 34/5 Crossover has been executed (a Short Trade condition) add an alert/indicator (Titled “Add”) every time a Green bullish candle has closed.

3. When a SMA 34/5 Crossunder has been executed (a Long Trade condition) add an alert/indicator (Titled “Add) every time a Red bearish candle has closed.

4. To used on 15m/30m/1hr/2hr/4hr/1D/1W timeframe charts?
開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?