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が提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?