OPEN-SOURCE SCRIPT

Narpavi Profit AI

106
1. Script Metadata

License: The script is licensed under the Mozilla Public License 2.0.

Author: The script is created by Jagadeesh from India

Version: The script uses Pine Script version 5.

Indicator Name: The indicator is named "Narpavi Profit AI" and is overlaid on the price chart Give Signal Alert on Long and Short Entry on 15 Min Time with 80% Accuracy.

2. Inputs

The script allows users to customize various parameters through inputs:
OHLC Source

src: The price source for calculations (default is close).

EMA Inputs

i_fastEMA: Period for the Fast EMA (default: 12).

i_slowEMA: Period for the Slow EMA (default: 25).

i_defEMA: Period for the Consolidated EMA (default: 25).

i_bothEMAs: Toggle to show both Fast and Slow EMAs (default: true).

Risk Management Inputs

stopLossPerc: Stop loss percentage (default: 1%).

takeProfitPerc: Take profit percentage (default: 2%).

Stochastic RSI Inputs

smoothK: Smoothing period for the %K line (default: 3).

smoothD: Smoothing period for the %D line (default: 3).

lengthRSI: RSI period (default: 14).

lengthStoch: Stochastic period (default: 14).

bandno0: Upper band level (default: 80).

bandno1: Lower band level (default: 20).

bandno2: Middle band level (default: 50).

Multi-Timeframe Input

higherTF: Higher timeframe for EMA calculations (default: 'D' for daily).

3. Functions

The script defines two custom functions:
f_ema(src, period)

Calculates the Exponential Moving Average (EMA) for a given source (src) and period.

f_stochRSI(src, lengthRSI, lengthStoch, smoothK, smoothD)

Calculates the Stochastic RSI:

Computes the RSI of the source.

Applies the Stochastic formula to the RSI.

Smooths the %K and %D lines using the specified smoothing periods.

4. Calculations

The script performs the following calculations:
EMAs

v_fastEMA: Fast EMA calculated using the f_ema function.

v_slowEMA: Slow EMA calculated using the f_ema function.

v_biasEMA: Consolidated EMA calculated using the f_ema function.

Stochastic RSI

[k, d]: The %K and %D values of the Stochastic RSI are calculated using the f_stochRSI function.

Higher Timeframe EMAs

higherFastEMA: Fast EMA calculated on the higher timeframe.

higherSlowEMA: Slow EMA calculated on the higher timeframe.

5. How It Works

The script calculates EMAs and Stochastic RSI values.

Buy/sell signals are generated based on EMA crossovers.

Stop loss and take profit levels are calculated based on user-defined percentages.

The script visualizes the EMAs, signals, and risk levels on the chart.

Alerts are triggered when buy/sell signals occur.

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.