Jalambi Paul modelKey Components
Inputs:
Window Length (window): The number of periods for calculating the rolling statistics. Default is set to 50.
Risk Percentage (risk_percentage): The percentage of capital risked per trade. Default is 1.0%.
Stop Loss and Take Profit Levels:
Stop Loss: Default is 2% of the entry price.
Take Profit: Default is 4% of the entry price.
Logarithmic Returns:
Calculates the logarithmic return of the price series using:
log_return
=
log
(
close
close
)
log_return=log(
close
close
)
This helps in normalizing price changes.
Rolling Statistics:
Mean (rolling_mean): Calculated over the rolling window using the Simple Moving Average (SMA).
Standard Deviation (rolling_std): Measured over the rolling window to understand volatility.
Shiryaev-Zhou Index (SZI):
The SZI is a standardized z-score:
SZI
=
log_return
−
rolling_mean
rolling_std
SZI=
rolling_std
log_return−rolling_mean
This metric is used to detect overbought or oversold conditions.
Signal Generation:
Buy Signal (long_signal): Triggered when SZI is below a fixed threshold (-2.0).
Sell Signal (short_signal): Triggered when SZI is above a fixed threshold (2.0).
Visuals on the Chart:
Buy signals are plotted below the price bars with green upward-pointing labels.
Sell signals are plotted above the price bars with red downward-pointing labels.
Trade Execution:
Entry Conditions:
Long positions are opened when long_signal is true.
Short positions are opened when short_signal is true.
Exit Conditions:
Stop Loss and Take Profit levels are calculated based on the entry price and the respective percentage inputs.
Positions are closed automatically when these levels are hit.
Visualization:
Plots the stop-loss (red line) and take-profit (green line) levels on the chart for easier tracking.
Moving Averages
3PA RULES+ EMA + DI Crossover1st set
Ema cross of 50 and 200
2nd set
Give buy signal when price cross above buy alert candle and sell signal when price cross below sell alert candle
Buy alert candle:
Current candle high > previous candle high
Current candle low > previous candle low
Current candle close > previous candle high
Sell alert candle :
Current candle high < previous candle high
Current candle low < previous candle low
Current candle close < previous candle low
3rd set
DI crossover
4 MAsThe 4 MAs indicator is a moving average crossover tool designed to identify market trends and provide potential entry and exit signals. By plotting four simple moving averages (SMAs) of different periods, this indicator helps traders understand both short-term and long-term market dynamics. It is particularly suited for trend-following strategies and can be applied across various timeframes, such as daily, hourly, or intraday charts.
Features:
1. Moving Average Visualization:
- Short-term Moving Averages (MA 5 and MA 10): Highlight short-term market fluctuations.
- Mid-term Moving Average (MA 15): Serves as a reference for medium-term trends.
- Long-term Moving Average (MA 30): Represents the broader market trend.
2. Trend Signal Detection:
- Bullish Signal: When the 5-period moving average crosses above the 30-period moving average (golden cross), a yellow upward arrow is displayed below the price bar, indicating a potential uptrend.
- Bearish Signal: When the 5-period moving average crosses below the 30-period moving average (death cross), a red downward arrow is displayed above the price bar, signaling a potential downtrend.
Key Advantages:
- Multi-timeframe Versatility: Works well on various timeframes, making it suitable for both short-term scalping and long-term trend analysis.
- Simple Visualization: Clear signals and trend identification through color-coded moving averages and signal arrows.
- Customizable: The SMA periods can be adjusted to align with the trader's preferred strategy or market conditions.
7 Exponential Moving Averages with ATR & Volume VolatilityThis indicator features 7 EMA lines based on Fibonacci sequences, along with rising ATR and volume data, highlighting increased volatility by changing the background color of candlesticks.
It aims to assist users in tracking price movements while showing whether volatility increases during EMA crossovers.
Users can easily customize the indicator by adjusting parameters such as EMA, ATR, and volume lengths, as well as colors, in the settings menu to suit their personal preferences.
5 EMA/SMA by LookTajChỉ báo 5 đường MA/EMA
- Đường MA dốc lên thể hiện bằng nét liền
- Đường MA dốc xuống thể hiện bằng nét đứt
- Điểm bắt đầu dốc lên đánh dấu bằng dấu + màu trắng
- Điểm bắt đầu dốc xuống đánh dấu bằng dấu . màu vàng
XRP/USD Scalping Strategy with Alerts
The strategy in your script is designed for scalping XRP/USD, utilizing a combination of Exponential Moving Averages (EMAs), Relative Strength Index (RSI), Volume analysis, and N-Bar detection to identify potential buy and sell signals. It aims to make quick, small profits by taking advantage of short-term price movements. Here's a detailed breakdown:
Key Components of the Strategy:
Exponential Moving Averages (EMAs):
Short EMA (8-period) and Long EMA (21-period) are used to identify the trend.
A buy signal is generated when the Short EMA crosses above the Long EMA (bullish crossover).
A sell signal is generated when the Short EMA crosses below the Long EMA (bearish crossunder).
Relative Strength Index (RSI):
The RSI (with a 14-period) is used to assess whether the market is in an overbought or oversold condition.
For a long position, the strategy checks if the RSI is above 50 to ensure that the market is not in an oversold condition.
For a short position, the strategy checks if the RSI is below 50, which signals a weaker or bearish market.
Volume Analysis:
The strategy checks if the current volume is greater than the average volume over a defined period (20 bars in this case).
Higher volume indicates stronger market participation and gives more confidence in the signals.
N-Bar Detection:
The strategy uses a custom function to detect the price action of the last n bars.
Bullish N-bars: If the lowest low of the last n_bars is higher than the lowest low of the previous 2*n_bars (indicating a bullish reversal pattern).
Bearish N-bars: If the highest high of the last n_bars is lower than the highest high of the previous 2*n_bars (indicating a bearish reversal pattern).
Buy (Long) Condition:
EMA Crossover: The Short EMA crosses above the Long EMA, indicating a potential upward trend.
RSI > 50: The market is not in an oversold state (indicating that the market is bullish).
Volume > Average Volume: The current volume is higher than the average volume, signaling increased market activity.
Bullish N-bars: The price action of the last n_bars shows a bullish reversal, providing additional confirmation for a buy.
Sell (Short) Condition:
EMA Crossunder: The Short EMA crosses below the Long EMA, indicating a potential downward trend.
RSI < 50: The market is not in an overbought state (indicating that the market is bearish).
Volume > Average Volume: The current volume is higher than the average volume, signaling increased market activity.
Bearish N-bars: The price action of the last n_bars shows a bearish reversal, providing additional confirmation for a sell.
Take Profit and Stop Loss:
The strategy includes a take profit and stop loss mechanism to limit the risk and secure profits.
Take Profit: Set at 1.5% of the entry price.
Stop Loss: Set at 0.7% of the entry price.
Alerts:
The strategy has alerts for both buy and sell signals.
When the buy or sell conditions are met, it triggers an alert, sending notifications (pop-up, email, etc.) to the user.
Summary of the Strategy:
Trend Following with EMA: The strategy relies on the crossover of short and long EMAs to determine the trend direction.
Momentum Analysis with RSI: The RSI confirms that the market is not overbought or oversold, ensuring that the trade is made in favorable conditions.
Volume Confirmation: Only signals with increased market participation (higher volume than the average) are considered valid.
Reversal Patterns with N-bars: The N-bar detection adds a layer of confirmation for potential reversals, improving the accuracy of entry signals.
Risk Management: The take profit and stop loss levels are designed to capture small, profitable moves while protecting from large losses.
This scalping strategy aims for quick, small profits with controlled risk, making it suitable for highly liquid markets like XRP/USD. The use of EMAs, RSI, volume analysis, and N-bar patterns increases the reliability of the signals and helps minimize false entries.
Critical MA's for Osiris(50, 111, 200)Indicator Name: Critical MAs for Osiris (50, 111, 200)
This indicator plots three critical Simple Moving Averages (SMA) — 50, 111, and 200 periods — directly on the chart. It provides a clear visual representation of these key moving averages, which are widely used for analyzing market trends, identifying potential support and resistance levels, and assessing overall market direction.
Features:
1-Moving Average Calculation:
50-period SMA: Represents the short-term trend.
111-period SMA: Serves as a medium-term trend line.
200-period SMA: Indicates the long-term trend and is often used as a critical benchmark for trend reversals.
2-Visualization:
The 50-period SMA is displayed in blue, providing a quick reference for short-term price movements.
The 111-period SMA is displayed in orange, offering insights into medium-term price behavior.
The 200-period SMA is displayed in red, signifying the long-term market direction.
3-Customizable Parameters:
Each moving average length is defined as a constant, making it easy to adjust the indicator for different strategies.
Use Cases:
-Trend Analysis:
The alignment and slopes of these moving averages help identify the direction of the trend (bullish, bearish, or sideways).
-Support and Resistance:
Price reactions around these moving averages can signal potential support or resistance levels.
-Market Strength:
The position of the price relative to the moving averages can provide insights into the strength or weakness of the current trend.
This indicator is particularly useful for traders seeking to incorporate a multi-timeframe perspective into their trading strategies. It is simple, effective, and applicable across various financial instruments, including stocks, forex, and cryptocurrencies.
Bull Bear Power EMAAdded an EMA moving average to the built-in BBP indicator to facilitate identification of BBP trends
CI, RSI & EMA StrategyTo be used with simple lines and triangles to confirm enter and exit strategy. Currently testing this script for when market is more choppy due to low volume eg. during weekends. Choppiness Index can give you an overall view on whether the market is hard or easy to trade. Script is originally written by LLM.
MTF EMA Cloud // Multi Time Frame Expodential Moving AveragesTo work properly, You should select the option from the dropdown menu >>> PIN TO SCALE > PIN TO RIGHT SCALE.
You can adjust the length of the EMAs and the timeframe to fit Your strategy.
Good Luck, Friends !
Trend Followermix of trader_xo and btc_charlie EMAs.
charlie_slowEMA_period = 50
charlie_fastEMA_period = 10
xo_slowEMA_period = 21
xo_fastEMA_period = 12
uses above EMAs to publish the trend. feel free to copy and update
13 EMA Cross - Next Day High/Low//@version=6
indicator("13 EMA Cross - Next Day High/Low", overlay=true)
// Inputs for EMAs
length1 = input.int(13, title="Short EMA (13 EMA)")
length2 = input.int(34, title="Long EMA (34 EMA)")
// Input for support line properties
supportColor = input.color(#A52A2A, title="Support Line Color") // Brown color
lineWidth = input.int(2, title="Line Width")
// Calculate EMAs
ema13 = ta.ema(close, length1)
ema34 = ta.ema(close, length2)
// Detect Crosses
crossAbove = ta.crossover(ema13, ema34)
crossBelow = ta.crossunder(ema13, ema34)
// Track when a crossover happens
var float nextDayHigh = na
var float nextDayLow = na
var int crossoverBarIndex = na
if crossAbove or crossBelow
crossoverBarIndex := bar_index
nextDayHigh := na
nextDayLow := na
// Capture next day candle's high and low after crossover
if bar_index == crossoverBarIndex + 1
nextDayHigh := high
nextDayLow := low
// Draw horizontal lines at the next day's high and low
if not na(nextDayHigh) and not na(nextDayLow)
line.new(x1=crossoverBarIndex + 1, y1=nextDayHigh, x2=bar_index, y2=nextDayHigh, color=supportColor, width=lineWidth)
line.new(x1=crossoverBarIndex + 1, y1=nextDayLow, x2=bar_index, y2=nextDayLow, color=supportColor, width=lineWidth)
3 EMA Cross 9 EMA with Close ConfirmationThe 3x Exponential Moving Average Crosses the 9x Exponential Moving Average. Once the 3x closes above the 9x and then a subsequent candle closes above the 9x, this strategy goes long. This strategy exits once the candle closes below the 9x.
200SMA & 8EMA IndicatorsHere’s a script for TradingView in Pine Script that implements the indicators you requested:
- **SMA (200) of High, Low, and (High + Low + Close)/3**
- **EMA (8) of High, Low, and (High + Low + Close)/3**
Below is the code:
### Explanation of the Code:
1. **Inputs**: Allows customization of the lengths for SMA and EMA.
2. **Calculations**:
- SMA(200) is calculated for High, Low, and (High + Low + Close)/3.
- EMA(8) is calculated for the same parameters.
3. **Plotting**:
- Each SMA and EMA series is plotted on the chart with distinct colors for easy identification.
BT Custom Moving Averages (410, 130, 150, 770 Days)Custom Moving Averages: This refers to a set of moving averages calculated over specific time periods, tailored to unique analytical needs. The moving averages in this case are based on the following day intervals:
410-Day Moving Average: Tracks the trend over a long-term period of 410 days.
130-Day Moving Average: Represents a medium-term trend, offering insight into shorter fluctuations compared to the 410-day average.
150-Day Moving Average: Similar to the 130-day average but slightly longer, providing a nuanced view of medium-term movements.
770-Day Moving Average: Captures ultra-long-term trends, smoothing out the effects of seasonal or cyclical variations.
These moving averages are customized to provide a comprehensive view of trends across multiple time horizons, often used for specialized analysis in fields like finance, trading, or data science.
MACD + EMA Strategy by RHMACD and EMA Trend Strategy
This strategy combines the MACD and 200-period EMA for trend-following trades.
Long Entry:
MACD Line crosses above Signal Line.
Price is above 200 EMA.
Short Entry:
MACD Line crosses below Signal Line.
Price is below 200 EMA.
Exits:
Opposite signals close positions.
It captures trends and avoids false signals by filtering with EMA.
EMA 50/SMA 200 CrossoverJust your basic Cross Over of the 50EMA and 200SMA with indication of the crossover.
Custom Sell Signal IndicatorThis indicator generates a sell signal when the following conditions are met: #1: The 9-day moving average crosses below the 21-day moving average. #2: RSI is above 70. #3: MACD line crosses below the signal line.
Adjust the settings to fit your desired specifics.
Custom Signal IndicatorThis indicator generates a buy signal when the following conditions are met: #1: The 9-day moving average crosses above the 21-day moving average. #2: RSI is below 30. #3: MACD line crosses above the signal line. #4: Volume is higher than usual. Adjust the parameters to customize.
This is my first script, so bear with me and any suggestions on improving it are highly welcome!
SMA y HMA PersonalizablesEste indicador puede ser útil para observar cómo se comportan diferentes tipos de medios móviles (SMA y HMA) con distintos períodos en un gráfico de precios. Las SMA son buenas para ver tendencias a largo plazo, mientras que la HMA es conocida por su capacidad para reducir el retraso.
SMA 20/50/100/200 by TPThis calculates the SMA 20/50/100/200 and changes the color when it falls through the support level.