Kieranj

S & R RSi strat

In this updated version, a trend filter is applied using the Simple Moving Average (SMA) on the 4-hour timeframe. The trend is considered up when the 50-period SMA is below the 200-period SMA (ta.sma(trendFilterSource, 50) < ta.sma(trendFilterSource, 200)).

The buy condition (buyCondition) is triggered when the RSI crosses above the oversold threshold (ta.crossover(rsi, oversoldThreshold)), the trend filter confirms an uptrend (isUptrend is true), and the close price is greater than or equal to the support level (close >= supportLevel).

The sell condition (sellCondition) is triggered when the RSI crosses below the overbought threshold (ta.crossunder(rsi, overboughtThreshold)), the trend filter confirms a downtrend (isUptrend is false), and the close price is less than or equal to the resistance level (close <= resistanceLevel).

With this implementation, the signals will only be generated in the direction of the trend on the 4-hour timeframe.
Açık kaynak kodlu komut dosyası

Gerçek TradingView ruhuyla, bu betiğin yazarı, yatırımcının anlayabilmesi ve doğrulayabilmesi için onu açık kaynak olarak yayınladı. Yazarın eline sağlık! Bunu ücretsiz olarak kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Kullanım Koşulları ile yönetilir. Bir grafikte kullanmak için favorilere ekleyebilirsiniz.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.

Bu komut dosyasını bir grafikte kullanmak ister misiniz?