RSI-ATR Analyzer (overbought/oversold)Combine RSI and ATR insights for comprehensive market analysis.
Description:
The RSI-ATR Analyzer indicator integrates the Relative Strength Index (RSI) with Average True Range (ATR) analysis to provide traders with an enhanced understanding of price action. This tool is particularly useful for identifying overbought/oversold conditions and analyzing average price ranges relative to ATR.
Use ATR-based ranges to assess volatility and combine it with RSI signals to enhance your decision-making process.
Features:
RSI Analysis: Tracks RSI to identify overbought and oversold levels.
ATR-Based Ranges: Calculates and plots the average range from high to open and open to low based on ATR.
Customizable Parameters: Allows full customization of RSI length, ATR length, overbought/oversold levels, and line colors.
Alerts: Sends alerts when RSI enters overbought or oversold zones.
Inputs:
RSI Source: Choose the data source for RSI calculations (default: close price).
RSI Length: Set the length for RSI calculation (default: 14).
ATR Length: Adjust the ATR length for range calculations (default: 50).
Overbought/Oversold Levels: Define the RSI thresholds for overbought (default: 70) and oversold (default: 30) levels.
Line Color: Customize the RSI line color (default: blue).
Plots:
High to Open Range: Plots the average range from high to open in green.
Open to Low Range: Plots the average range from open to low in red.
RSI Line: Displays the RSI value over time with thresholds for overbought and oversold levels.
How to Use:
Add the indicator to your chart.
Customize the parameters to fit your trading strategy.
Use the plotted ranges to understand price movements and compare them with RSI readings.
Set alerts to monitor RSI entry into overbought or oversold zones.
Alerts:
"RSI is in overbought zone!"
Triggers when RSI crosses above the overbought level.
"RSI is in oversold zone!"
Triggers when RSI crosses below the oversold level.
Visualization:
Transparent green and red areas represent ATR-based ranges for high-to-open and open-to-low, respectively.
Blue line depicts the RSI, with clear markers for overbought (70) and oversold (30) levels.
Use Cases:
Identify potential reversals with RSI overbought/oversold signals.
Analyze price movement ranges relative to ATR.
Combine with other indicators to build a robust trading strategy.
อินดิเคเตอร์และกลยุทธ์
Breakout Master//@version=5
indicator('Breakout Master', overlay=true)
bullishBar = 1
bearishBar = -1
var inside_bar = array.new_int(0)
var inside_bar_high = array.new_float(0)
var inside_bar_low = array.new_float(0)
var motherCandleIndex = 0
var motherCandleHigh = 0.0
var motherCandleLow = 0.0
var motherCandleRange = 0.0
var target1Buy = 0.0
var target2Buy = 0.0
var target1Sell = 0.0
var target2Sell = 0.0
var motherCandleH = line.new(na, na, na, na, extend=extend.right, color=color.green)
var motherCandleL = line.new(na, na, na, na, extend=extend.right, color=color.red)
var motherCandleHLabel = label.new(na, na, style=label.style_label_left, textcolor=color.green, color=color.new(color.green, 80))
var motherCandleLLabel = label.new(na, na, style=label.style_label_left, textcolor=color.red, color=color.new(color.red, 80))
var longT1 = line.new(na, na, na, na, extend=extend.right)
var longT2 = line.new(na, na, na, na, extend=extend.right)
var shortT1 = line.new(na, na, na, na, extend=extend.right)
var shortT2 = line.new(na, na, na, na, extend=extend.right)
var longT1Label = label.new(na, na, textcolor=color.blue, style=label.style_label_left, color=color.new(color.blue, 80))
var longT2Label = label.new(na, na, textcolor=color.blue, style=label.style_label_left, color=color.new(color.blue, 80))
var shortT1Label = label.new(na, na, textcolor=color.blue, style=label.style_label_left, color=color.new(color.blue, 80))
var shortT2Label = label.new(na, na, textcolor=color.blue, style=label.style_label_left, color=color.new(color.blue, 80))
var longT1Line = input.bool(title='Show Long T1', defval=true, group='Long')
var longT2Line = input.bool(title='Show Long T2', defval=true, group='Long')
var shortT1Line = input.bool(title='Show Short T1', defval=true, group='Short')
var shortT2Line = input.bool(title='Show Short T2', defval=true, group='Short')
var longT1Range = input.float(title='Long T1', defval=1, group='Long (x times above range of mother candle)', tooltip='Line will be plotted above high of mother candle. If value entered is 1, then T1 = range of mother candle x 1')
var longT2Range = input.float(title='Long T2', defval=1.5, group='Long (x times above range of mother candle)', tooltip='Line will be plotted above high of mother candle. If value entered is 2, then T2 = range of mother candle x 2')
var shortT1Range = input.float(title='Short T1', defval=1, group='Short (x times below range of mother candle)', tooltip='Line will be plotted below low of mother candle. If value entered is 1, then T1 = range of mother candle x 1')
var shortT2Range = input.float(title='Short T2', defval=1.5, group='Short (x times below range of mother candle)', tooltip='Line will be plotted below low of mother candle. If value entered is 2, then T2 = range of mother candle x 1')
hi = high
lo = low
op = open
cl = close
isInside() =>
previousBar = 1
bodyStatus = cl >= op ? 1 : -1
isInsidePattern = hi < hi and lo > lo
isInsidePattern ? bodyStatus : 0
newDay = ta.change(time('D'))
if newDay
array.clear(inside_bar)
array.clear(inside_bar_high)
array.clear(inside_bar_low)
if isInside() and array.size(inside_bar) <= 0
array.push(inside_bar, bar_index)
array.push(inside_bar_high, hi )
array.push(inside_bar_low, lo )
if barstate.islast and array.size(inside_bar) > 0
motherCandleIndex := array.get(inside_bar, 0) - 1
motherCandleHigh := array.get(inside_bar_high, 0)
motherCandleLow := array.get(inside_bar_low, 0)
motherCandleRange := motherCandleHigh - motherCandleLow
target1Buy := motherCandleHigh + longT1Range * motherCandleRange
target2Buy := motherCandleHigh + longT2Range * motherCandleRange
target1Sell := motherCandleLow - shortT1Range * motherCandleRange
target2Sell := motherCandleLow - shortT2Range * motherCandleRange
// mother candle high
line.set_xy1(motherCandleH, motherCandleIndex, motherCandleHigh)
line.set_xy2(motherCandleH, bar_index, motherCandleHigh)
label.set_xy(motherCandleHLabel, bar_index + 5, motherCandleHigh)
label.set_text(id=motherCandleHLabel, text='Range High - ' + str.tostring(motherCandleHigh))
//mother candle low
line.set_xy1(motherCandleL, motherCandleIndex, motherCandleLow)
line.set_xy2(motherCandleL, bar_index, motherCandleLow)
label.set_xy(motherCandleLLabel, bar_index + 5, motherCandleLow)
label.set_text(id=motherCandleLLabel, text='Range Low - ' + str.tostring(motherCandleLow))
//long target 1
if longT1Line
line.set_xy1(longT1, motherCandleIndex, target1Buy)
line.set_xy2(longT1, bar_index, target1Buy)
label.set_xy(longT1Label, bar_index + 5, target1Buy)
label.set_text(id=longT1Label, text='T1 - ' + str.tostring(target1Buy) + ' (' + str.tostring(longT1Range * motherCandleRange) + ') points')
//long target 2
if longT2Line
line.set_xy1(longT2, motherCandleIndex, target2Buy)
line.set_xy2(longT2, bar_index, target2Buy)
label.set_xy(longT2Label, bar_index + 5, target2Buy)
label.set_text(id=longT2Label, text='T2 - ' + str.tostring(target2Buy) + ' (' + str.tostring(longT2Range * motherCandleRange) + ') points')
//short target 1
if shortT1Line
line.set_xy1(shortT1, motherCandleIndex, target1Sell)
line.set_xy2(shortT1, bar_index, target1Sell)
label.set_xy(shortT1Label, bar_index + 5, target1Sell)
label.set_text(id=shortT1Label, text='T1 - ' + str.tostring(target1Sell) + ' (' + str.tostring(shortT1Range * motherCandleRange) + ') points')
//short target 2
if shortT2Line
line.set_xy1(shortT2, motherCandleIndex, target2Sell)
line.set_xy2(shortT2, bar_index, target2Sell)
label.set_xy(shortT2Label, bar_index + 5, target2Sell)
label.set_text(id=shortT2Label, text='T2 - ' + str.tostring(target2Sell) + ' (' + str.tostring(shortT2Range * motherCandleRange) + ') points')
Cevval's Future Long Short Percentage PredictionThis script is designed to calculate and display the dynamic win rates of long and short trades based on historical price data and various indicators. It calculates the long and short signals using price change, volume, and the Relative Strength Index (RSI). The script uses a simple moving average (SMA) to smooth out price changes and volume over a given period (14 bars in this case).
Long Signal is triggered when the price change is positive, RSI is above 50, and the volume exceeds the average volume.
Short Signal is triggered when the price change is negative, RSI is below 50, and the volume exceeds the average volume.
The script then counts the occurrences of long and short signals over the last 14 bars and calculates the win rate for both long and short trades. These win rates are plotted on the chart as percentage values, with the long win rate shown in green and the short win rate in red.
Additionally, dynamic labels are created next to the most recent bar, displaying the long and short win rates. These labels adjust their position according to the price of the most recent bar, ensuring they stay positioned correctly even when the chart is scrolled or zoomed.
In essence, the script offers a dynamic, real-time representation of the potential success rates of long and short trades based on price and volume data, allowing traders to make more informed decisions.
Resistance - Support Level PredictionsThis indicator attempts to estimate potential resistance and support levels based on the previous day's closing, high, and low values, and displays them on the chart.
GROK - 40 Day High BreakoutTitle: GROK - Customizable High Breakout Detector
To scan base breakout with Pine Screener
Description:
This Pine Script indicator identifies high breakout patterns based on a user-defined lookback period. By default, it checks for a breakout of the 40-day high, but the period can be adjusted to suit your trading strategy. Key features include:
Custom Lookback Period: Easily modify the number of days for high breakout detection. Lookback period is length of base you want to scan using pine screener.
Visual Alerts: Displays a green triangle above the price bar when a breakout is detected.
Alert Conditions: Built-in alert notifications for automated breakout detection.
Screener Compatibility: Plots breakout signals as a histogram for screener use.
This script is ideal for traders looking to identify strong breakout patterns and incorporate them into their strategies.
How to Use:
Adjust the lookback period in the settings to match your desired breakout criteria.
Add alerts for automated notifications when a breakout is detected.
Use the visual markers and histogram to analyze breakout patterns on your chart.
Fibonacci Retracement and Target LevelsHighest and Lowest Price Points:
The script calculates the highest (high_price) and lowest (low_price) prices in the specified timeframe. These values are essential for computing the Fibonacci retracement and extension levels.
Fibonacci Retracement Levels:
fib_0: 0% level (highest price).
fib_236, fib_382, fib_50, fib_618, and fib_100: These are the classic Fibonacci retracement levels used to identify potential support or resistance areas as the price retraces from its highest point.
Fibonacci Extension Levels (Targets):
fib_1618, fib_2618, and fib_4236: These are Fibonacci extension levels used to predict potential price targets in the direction of the trend if the price breaks beyond its current range.
Drawing the Levels:
The line.new function is used to draw horizontal lines on the chart representing the Fibonacci retracement and extension levels.
Dashed lines represent retracement levels.
Dotted lines represent extension (target) levels.
How to Use:
Create a new Pine Script in TradingView.
Paste the code above into the Pine Script editor.
Save the script and apply it to your chart to see Fibonacci retracement and extension levels plotted.
SHAAKUNI INDICATO//@version=5
indicator("Simple Moving Average Crossover", overlay=true)
// Input for Moving Averages
fastLength = input.int(10, title="Fast MA Length")
slowLength = input.int(20, title="Slow MA Length")
// Calculating Moving Averages
fastMA = ta.sma(close, fastLength)
slowMA = ta.sma(close, slowLength)
// Plotting Moving Averages
plot(fastMA, color=color.green, title="Fast MA")
plot(slowMA, color=color.red, title="Slow MA")
// Highlight Buy/Sell Signals
buySignal = ta.crossover(fastMA, slowMA)
sellSignal = ta.crossunder(fastMA, slowMA)
plotshape(series=buySignal, title="Buy Signal", location=location.belowbar, color=color.new(color.green, 0), style=shape.labelup, text="BUY")
plotshape(series=sellSignal, title="Sell Signal", location=location.abovebar, color=color.new(color.red, 0), style=shape.labeldown, text="SELL")
Crypto - Relative Strength Strategy - LongCrypto - Relative Strength Strategy (Long Only, $100 Buy)
Overview
The " Crypto - Relative Strength Strategy (Long Only, $100 Buy) " is a trading strategy designed to capitalize on the relative strength of a cryptocurrency compared to its historical price movements. This strategy is tailored for long-only positions, meaning it only enters buy trades and exits when the strength indicator turns negative.
Key Features
Relative Strength Calculation : The strategy uses a custom function to calculate the relative strength of the cryptocurrency based on its performance against several moving averages (EMA 8, EMA 34, SMA 20, SMA 50, and SMA 200).
Long-Only Positions : The strategy exclusively enters long positions when the relative strength indicator turns positive.
Fixed $100 Buy Amount : Each time a buy signal is triggered, the strategy purchases $100 worth of the cryptocurrency.
Sell Signals : The strategy closes the entire position when the relative strength indicator turns negative.
Backtesting Date Range : Users can specify a custom date range for backtesting using the input.time function.
Visual Indicators : Green and red areas represent positive and negative strength. Minimal buy and sell signals are plotted on the chart.
Future Prediction Lines//@version=6
indicator("Future Prediction Lines", overlay=true)
/*
# **Future Prediction Lines v3 (Indicator Documentation)**
---
## **Purpose**
The **Future Prediction Lines Indicator** is a powerful tool designed to visualize potential future price movements based on historical trends and multi-timeframe analysis. By integrating **linear regression**, **momentum indicators (MACD and RSI)**, and **confidence bands**, this indicator helps traders anticipate where prices might move over the next ` ` bars.
---
## **Key Features**
1. **Future Price Prediction**:
- Forecasts price movements for a user-defined number of bars into the future.
- Combines trends from multiple timeframes for a more robust prediction.
2. **Confidence Bands**:
- Upper and lower bounds based on **ATR (Average True Range)** to estimate potential volatility around the predicted price.
3. **Customizable Parameters**:
- **Future Bars**: Adjust how far ahead the predictions extend.
- **Higher Timeframe Analysis**: Incorporate data from larger timeframes (e.g., Daily, Weekly).
4. **Visibility Toggles**:
- **Reference Lines**: Hide or display the local and higher timeframe trends.
- **Confidence Bands**: Optionally show or hide the volatility bands around the forecast.
5. **Visual Markers**:
- **Red prediction lines** start from the current price and extend into the future.
- A **label** displays the forecasted price at the furthest point.
---
## **How It Works**
### 1. **Linear Regression (Trend Analysis)**:
- The indicator calculates **linear regression (LR)** for the chart's current timeframe and a higher timeframe.
- It averages these trends to create a combined forecast.
### 2. **Momentum Adjustments**:
- **MACD**: Adjusts predictions based on short-term momentum.
- **RSI**: Accounts for overbought/oversold conditions, nudging forecasts accordingly.
### 3. **Confidence Bands**:
- Uses **ATR** to generate upper and lower bounds, highlighting potential price volatility around the central forecast.
---
## **Recommended Timeframes**
### **1. Day Trading**:
- **Chart Timeframe**: 5m, 15m, 1H
- **Higher TF**: 4H or Daily
- **Focus**: Captures intraday trends and micro-movements.
### **2. Swing Trading**:
- **Chart Timeframe**: 4H, Daily
- **Higher TF**: Weekly
- **Focus**: Anticipates multi-day price swings within trends.
### **3. Position Trading**:
- **Chart Timeframe**: Daily, Weekly
- **Higher TF**: Monthly
- **Focus**: Analyzes macro trends and large price movements over weeks or months.
---
## **Settings Overview**
| **Parameter** | **Description** |
|-----------------------|-----------------------------------------------------------------------------------------------------------------------------|
| **Future Bars** | Number of bars to project into the future. |
| **Higher TF** | Select a higher timeframe to incorporate larger trends (e.g., "D" for Daily, "W" for Weekly). |
| **Confidence Bands** | Option to show upper/lower bounds based on ATR. |
| **MACD Settings** | Fine-tune MACD lengths for momentum adjustment. |
| **RSI Settings** | Adjust RSI length and overbought/oversold levels to influence predictions. |
| **Show Reference** | Toggle local and higher timeframe regression lines for comparison (default: hidden). |
---
## **How to Use**
1. **Add the Indicator**:
- Copy the script into TradingView’s Pine Editor.
- Click **Add to Chart**.
2. **Adjust Settings**:
- Open the indicator settings to configure:
- Number of future bars.
- Higher timeframe for additional trend analysis.
- Confidence bands (toggle visibility and adjust width using ATR).
3. **Interpret the Predictions**:
- **Red Line**: The central forecast for future prices.
- **Shaded Bands**: Optional confidence bands show volatility ranges.
- **Final Label**: Displays the predicted price at the furthest bar.
---
## **Practical Tips**
- **For Day Traders**:
- Use **shorter chart timeframes (5m–1H)** combined with a higher timeframe like **4H or Daily**.
- Focus on quick intraday price movements.
- **For Swing Traders**:
- Use a **4H or Daily chart** with **Weekly higher timeframe trends** for multi-day analysis.
- **For Long-Term Traders**:
- Use **Daily or Weekly charts** combined with **Monthly timeframe trends** to analyze macro movements.
---
## **Example Workflow**
1. Set your **chart timeframe** based on your trading style.
2. Select a **higher timeframe** in the settings (e.g., Weekly for swing trading).
3. Observe the **red prediction line** for potential price trajectory and plan entries/exits based on:
- Alignment with existing support/resistance levels.
- Confidence band boundaries (volatility range).
- Momentum indicators (e.g., MACD/RSI) confirming direction.
---
## **Limitations**
1. **Lagging Nature**:
- Linear regression is based on historical data and may lag during high-impact events.
2. **Assumption of Continuity**:
- Forecast assumes trends continue uninterrupted, which may not account for sudden market reversals.
3. **No Guarantee**:
- Predictions are **probabilistic** and should always be used in conjunction with other tools and analysis.
---
## **Final Note**
The **Future Prediction Lines Indicator** is a tool for projecting possible price paths. While it provides insights into potential price movements, always validate predictions with **price action**, **support/resistance levels**, and other **technical indicators** for better decision-making.
*/
FBands-Parthiban_V2what is Faytterro Bands? it is a channel indicator like "Bollinger Bands". what it does? creates a channel using standard deviations and means. thus giving users an idea about the expensive and cheap zones.
Nadaraya-Watson Envelope + Chandelier ExitThis is the combination of Nadaraya-Watson Envelope and Chandelier Exit indicator
JCM_MadridTrend indicator, blue color indicates uptrend, red indicates downtrend, sell and buy points.
ORB Indicator and Moving Average (Anjaneya)Name: ORB Indicator with Adjustable Buffer, Moving Averages, and Center Line
Overview:
This indicator is designed for intraday traders using the Opening Range Breakout (ORB) strategy. It calculates the high and low levels during a specific session (e.g., the first 5 minutes of the trading day) and applies adjustable buffers to these levels. Additionally, it includes a center line between the buffered high and low levels, as well as multiple moving averages for further trend analysis.
Features:
Opening Range Breakout (ORB) Levels:
High and Low: Identified during the configured session time (default: 9:15 AM to 9:20 AM).
Buffered Levels:
Calculated dynamically using the range between ORB high and ORB low.
A new percentage buffer is computed as half of the percentage change from the low to the high.
Buffered levels: Upside Buffer and Downside Buffer.
Center Line:
A visual midpoint between the Upside Buffer and Downside Buffer.
Displayed in light blue with 50% opacity and a thin line style.
Helps traders visualize the equilibrium point.
Crossover and Crossunder Signals:
Buy Signal (B): When the price crosses above the Upside Buffer.
Sell Signal (S): When the price crosses below the Downside Buffer.
Configurable for either close price or touch-based detection.
Moving Averages:
Includes Exponential Moving Averages (EMA) and Simple Moving Averages (SMA).
Configurable lengths for short-term, medium-term, and long-term trends.
Can be hidden or displayed as per user preference.
Customization Options:
ORB Session Time: Configurable to define the range for ORB calculation (default: 9:15 AM to 9:20 AM).
Signal Detection: Option to use Close or Touch for signal generation.
Moving Average Lengths: Adjustable for EMA (7, 14, 26) and SMA (50, 100, 200, 1000).
Buffer Calculation: Automatically calculates the buffer levels based on the ORB range.
Visual Elements:
Buffered Levels:
Green: Upside Buffer.
Red: Downside Buffer.
Center Line:
Light blue, 50% opacity.
Signals:
Buy: Green label below the bar.
Sell: Red label above the bar.
Moving Averages:
Color-coded and customizable for trend visualization.
Use Case:
This indicator is ideal for:
Breakout Trading: Identifying potential breakouts using buffered ORB levels.
Reversal Trading: Spotting price rejections near the ORB levels.
Trend Analysis: Leveraging moving averages to confirm or invalidate breakout signals.
Brijesh TTrades candle plot"Brijesh TTrades candle plot" is a powerful and customizable indicator that allows you to overlay higher timeframe candles directly on your chart. Choose your desired timeframe (e.g., Daily, Hourly) and plot up to 10 recent candles with precise control over color, wick style, and width. The candles are offset by 40 bars to the right, providing a clear and unobstructed view of the current price action. Ideal for multi-timeframe analysis and gaining deeper insights into market trends.
McClellan A-D Volume Integration ModelThe strategy integrates the McClellan A-D Oscillator with an adjustment based on the Advance/Decline (A-D) volume data. The McClellan Oscillator is calculated by taking the difference between the short-term and long-term exponential moving averages (EMAs) of the A-D line. This strategy introduces an enhancement where the A-D volume (the difference between the advancing and declining volume) is factored in to adjust the oscillator value.
Inputs:
• ema_short_length: The length for the short-term EMA of the A-D line.
• ema_long_length: The length for the long-term EMA of the A-D line.
• osc_threshold_long: The threshold below which the oscillator must drop for an entry signal to trigger.
• exit_periods: The number of periods after which the position is closed.
• Data Sources:
• ad_advance and ad_decline are the data sources for advancing and declining issues, respectively.
• vol_advance and vol_decline are the volume data for the advancing and declining issues. If volume data is unavailable, it defaults to na (Not Available), and the fallback logic ensures that the strategy continues to function.
McClellan Oscillator with Volume Adjustment:
• The A-D line is calculated by subtracting the declining issues from the advancing issues. Then, the volume difference is applied to this line, creating a “weighted” A-D line.
• The short and long EMAs are calculated for the weighted A-D line to generate the McClellan Oscillator.
Entry Condition:
• The strategy looks for a reversal signal, where the oscillator falls below the threshold and then rises above it again. The condition is designed to trigger a long position when this reversal happens.
Exit Condition:
• The position is closed after a set number of periods (exit_periods) have passed since the entry.
Plotting:
• The McClellan Oscillator and the threshold are plotted on the chart for visual reference.
• Entry and exit signals are highlighted with background colors to make the signals more visible.
Scientific Background:
The McClellan A-D Oscillator is a popular market breadth indicator developed by Sherman and Marian McClellan. It is used to gauge the underlying strength of a market by analyzing the difference between the number of advancing and declining stocks. The oscillator is typically calculated using exponential moving averages (EMAs) of the A-D line, with the idea being that crossovers of these EMAs indicate potential changes in the market’s direction.
The integration of A-D volume into this model adds another layer of analysis, as volume is often considered a leading indicator of price movement. By factoring in volume, the strategy becomes more sensitive to not just the number of advancing or declining stocks but also how significant those movements are based on trading volume, as discussed in Schwager, J. D. (1999). Technical Analysis of the Financial Markets. This enhanced version aims to capture stronger and more sustainable trends in the market, helping to filter out false signals.
Additionally, volume analysis is often used to confirm price movements, as described in Wyckoff, R. (1931). The Day Trading System. Therefore, incorporating the volume of advancing and declining stocks in the McClellan Oscillator offers a more robust signal for trading decisions.
Breakout Master//@version=5
indicator('Breakout Master', overlay=true)
bullishBar = 1
bearishBar = -1
var inside_bar = array.new_int(0)
var inside_bar_high = array.new_float(0)
var inside_bar_low = array.new_float(0)
var motherCandleIndex = 0
var motherCandleHigh = 0.0
var motherCandleLow = 0.0
var motherCandleRange = 0.0
var target1Buy = 0.0
var target2Buy = 0.0
var target1Sell = 0.0
var target2Sell = 0.0
var motherCandleH = line.new(na, na, na, na, extend=extend.right, color=color.green)
var motherCandleL = line.new(na, na, na, na, extend=extend.right, color=color.red)
var motherCandleHLabel = label.new(na, na, style=label.style_label_left, textcolor=color.green, color=color.new(color.green, 80))
var motherCandleLLabel = label.new(na, na, style=label.style_label_left, textcolor=color.red, color=color.new(color.red, 80))
var longT1 = line.new(na, na, na, na, extend=extend.right)
var longT2 = line.new(na, na, na, na, extend=extend.right)
var shortT1 = line.new(na, na, na, na, extend=extend.right)
var shortT2 = line.new(na, na, na, na, extend=extend.right)
var longT1Label = label.new(na, na, textcolor=color.blue, style=label.style_label_left, color=color.new(color.blue, 80))
var longT2Label = label.new(na, na, textcolor=color.blue, style=label.style_label_left, color=color.new(color.blue, 80))
var shortT1Label = label.new(na, na, textcolor=color.blue, style=label.style_label_left, color=color.new(color.blue, 80))
var shortT2Label = label.new(na, na, textcolor=color.blue, style=label.style_label_left, color=color.new(color.blue, 80))
var longT1Line = input.bool(title='Show Long T1', defval=true, group='Long')
var longT2Line = input.bool(title='Show Long T2', defval=true, group='Long')
var shortT1Line = input.bool(title='Show Short T1', defval=true, group='Short')
var shortT2Line = input.bool(title='Show Short T2', defval=true, group='Short')
var longT1Range = input.float(title='Long T1', defval=1, group='Long (x times above range of mother candle)', tooltip='Line will be plotted above high of mother candle. If value entered is 1, then T1 = range of mother candle x 1')
var longT2Range = input.float(title='Long T2', defval=1.5, group='Long (x times above range of mother candle)', tooltip='Line will be plotted above high of mother candle. If value entered is 2, then T2 = range of mother candle x 2')
var shortT1Range = input.float(title='Short T1', defval=1, group='Short (x times below range of mother candle)', tooltip='Line will be plotted below low of mother candle. If value entered is 1, then T1 = range of mother candle x 1')
var shortT2Range = input.float(title='Short T2', defval=1.5, group='Short (x times below range of mother candle)', tooltip='Line will be plotted below low of mother candle. If value entered is 2, then T2 = range of mother candle x 1')
hi = high
lo = low
op = open
cl = close
isInside() =>
previousBar = 1
bodyStatus = cl >= op ? 1 : -1
isInsidePattern = hi < hi and lo > lo
isInsidePattern ? bodyStatus : 0
newDay = ta.change(time('D'))
if newDay
array.clear(inside_bar)
array.clear(inside_bar_high)
array.clear(inside_bar_low)
if isInside() and array.size(inside_bar) <= 0
array.push(inside_bar, bar_index)
array.push(inside_bar_high, hi )
array.push(inside_bar_low, lo )
if barstate.islast and array.size(inside_bar) > 0
motherCandleIndex := array.get(inside_bar, 0) - 1
motherCandleHigh := array.get(inside_bar_high, 0)
motherCandleLow := array.get(inside_bar_low, 0)
motherCandleRange := motherCandleHigh - motherCandleLow
target1Buy := motherCandleHigh + longT1Range * motherCandleRange
target2Buy := motherCandleHigh + longT2Range * motherCandleRange
target1Sell := motherCandleLow - shortT1Range * motherCandleRange
target2Sell := motherCandleLow - shortT2Range * motherCandleRange
// mother candle high
line.set_xy1(motherCandleH, motherCandleIndex, motherCandleHigh)
line.set_xy2(motherCandleH, bar_index, motherCandleHigh)
label.set_xy(motherCandleHLabel, bar_index + 5, motherCandleHigh)
label.set_text(id=motherCandleHLabel, text='Range High - ' + str.tostring(motherCandleHigh))
//mother candle low
line.set_xy1(motherCandleL, motherCandleIndex, motherCandleLow)
line.set_xy2(motherCandleL, bar_index, motherCandleLow)
label.set_xy(motherCandleLLabel, bar_index + 5, motherCandleLow)
label.set_text(id=motherCandleLLabel, text='Range Low - ' + str.tostring(motherCandleLow))
//long target 1
if longT1Line
line.set_xy1(longT1, motherCandleIndex, target1Buy)
line.set_xy2(longT1, bar_index, target1Buy)
label.set_xy(longT1Label, bar_index + 5, target1Buy)
label.set_text(id=longT1Label, text='T1 - ' + str.tostring(target1Buy) + ' (' + str.tostring(longT1Range * motherCandleRange) + ') points')
//long target 2
if longT2Line
line.set_xy1(longT2, motherCandleIndex, target2Buy)
line.set_xy2(longT2, bar_index, target2Buy)
label.set_xy(longT2Label, bar_index + 5, target2Buy)
label.set_text(id=longT2Label, text='T2 - ' + str.tostring(target2Buy) + ' (' + str.tostring(longT2Range * motherCandleRange) + ') points')
//short target 1
if shortT1Line
line.set_xy1(shortT1, motherCandleIndex, target1Sell)
line.set_xy2(shortT1, bar_index, target1Sell)
label.set_xy(shortT1Label, bar_index + 5, target1Sell)
label.set_text(id=shortT1Label, text='T1 - ' + str.tostring(target1Sell) + ' (' + str.tostring(shortT1Range * motherCandleRange) + ') points')
//short target 2
if shortT2Line
line.set_xy1(shortT2, motherCandleIndex, target2Sell)
line.set_xy2(shortT2, bar_index, target2Sell)
label.set_xy(shortT2Label, bar_index + 5, target2Sell)
label.set_text(id=shortT2Label, text='T2 - ' + str.tostring(target2Sell) + ' (' + str.tostring(shortT2Range * motherCandleRange) + ') points')
PineTree-Colors-V6Merry Christmas!!!
This is PineScript Version Tree in COLORS....as a Pine Tree (Christmas Tree) !!! This is how it all started from Version1 (V1) to Version 6 (V6) and on and on....
Enjoy :)
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.
XYZ
1. Elder Impulse System
The Elder Impulse System uses two indicators:
EMA (to determine trend direction)
MACD Histogram (to measure momentum)
Application:
Green bar: Trend is upward, and momentum is increasing (buy signal).
Red bar: Trend is downward, and momentum is decreasing (sell signal).
Blue bar: Indecision or range-bound movement.
2. VWAP (Volume Weighted Average Price)
VWAP is used to assess whether the price is overvalued or undervalued relative to volume.
3 Volume Wighted Moving Average -trend-Macd3 Volume Wighted Moving Average
With Main trend
With MACD