Donchian Trend V1The Donchian Trend strategy is a trend-following approach that uses the Donchian Channels indicator to identify potential entry and exit points in a security. The Donchian Channels are formed by taking the highest high and the lowest low prices over a specified period and plotting them as upper and lower channels around the current price. The width of the channels indicates the level of volatility in the market.
In this strategy, the Donchian Channels are used as a trend filter to determine the direction of the market. When the price is above the upper channel, it suggests an uptrend, and when the price is below the lower channel, it indicates a downtrend. The length of the Donchian Channels is a key parameter in the strategy, as it determines the look-back period for identifying the high and low prices.
Additional Logic: To further refine the entry and exit signals, The script uses two moving averages, a fast one (MA5) and a slow one (MA45), to identify trends and generate trading signals. When the fast moving average crosses above the slow moving average, a buy signal is generated, indicating that the market is trending upwards. Conversely, when the fast moving average crosses below the slow moving average, a sell signal is generated, indicating that the market is trending downwards.
Evaluation: The script was backtested on historical price data for the pair. The backtest results showed that the script was able to generate a net profit of , with a profit factor of and a Sharpe ratio of . The script also includes metrics such as the number of winning and losing trades, the average trade, and the largest winning and losing trades.
The strategy is evaluated based on its net profit, gross profit, gross loss, max run-up, max drawdown, buy & hold return, Sharpe ratio, Sortino ratio, and profit factor. The parameters used in the backtest include a Donchian Channel length of 42, which corresponds to a weekly time with divide of 4h time frame, and a short-term MA of 5 and a long-term MA of 45 for more accurate entry and exit signals.
Disclaimer: This script is for educational and research purposes only and should not be used for trading with real money without further testing and validation. Past performance is not indicative of future results.
Educational
Ticker Ratio LevelsIndicator for constructing levels of price ratios from other tickers.
The user can choose from predefined tickers such as Gold(XAU), DXY, BTC, etc.
How it works:
Takes the important extremum of the closing candle from your current chart and builds a level based on the chart selected in the settings.
This function allows you to determine the price level based on the current price and the price at the time of a certain date. To do this, it first determines the time when the last candle before the specified date occurred. Then the price at the time of this candle and at the current moment is calculated. Finally, the price level is calculated relative to the price at the time of the candle. The result of this calculation will be the price level.
How to Use:
By default, the indicator is set to 1D for the BTC chart. But you can adjust any levels on the assets you are interested in.
You can adjust the levels both in the settings and by moving them around the chart.
Simply click on the indicator name or level, and vertical lines will appear, which you can drag to any location. (The vertical lines serve as the beginning of the calculation point)
Example of work on ETH paired with DXY.
ARCHENS SHARESThis script marks the high and low of 9.45 to 10.15 price. When the price breaks high, then gives Buy signal. When the price breaks low, then it gives Sell Signal. These buy and sell signals are given with labels "ARCHENS BUY" or "ARCHENS SELL". With my observation in stock market, I have made this strategy.
This strategy works in normal candle pattern but i observed that it works well in heikenashi candle. For this strategy to work well, we have to select 5 mins heikenashi candles.
If this strategy gives "ARCHENS buy", then buy it. Target should be as per individuals mind. But Stop loss should be hitted when there are two continue opposite {red} heikenashi candle.
If this strategy gives "ARCHENS sell", then sell it. Target should be as per individuals mind. But Stop loss should be hitted when there are two continue opposite {green} heikenashi candle.
The Strat [LuxAlgo]The Strat indicator is a full toolkit regarding most of the concepts within "The Strat" methodology with features such as candle numbering, pivot machine gun (PMG) highlighting, custom combo highlighting, and various statistics included.
Alerts are also included for the detection of specific candle numbers, custom combos, and PMGs.
🔶 SETTINGS
Show Numbers on Chart: Shows candle numbering on the chart.
Style Candles: Style candles based on the detected number. Only effective on non-line charts and if the script is brought to the front.
🔹 Custom Combo Search
Combo: User defined combo to be searched by the script. Combos can be composed of any series of numbers including (1, 2, -2, 3), e.g : 2-21. No spaces or other characters should be used.
🔹 Pivot Machine Gun
Show Labels: Highlight detected PMGs with a label.
Min Sequence Length: Minimum sequence length of consecutive higher lows/lower highs required to detect a PMG.
Min Breaks: Minimum amount of broken previous highs/lows required to detect a PMG.
Show Levels: Show levels of the broken highs/lows.
🔹 Pivot Combos
Pivot Lookback: Lookback period used for detecting pivot points.
Right Bars Scan: Number of bars scanned to the right side of a detected pivot.
Left Bars Scan: Number of bars scanned to the left side of a detected pivot.
🔹 Dashboard
Show Dashboard: Displays statistics dashboard on chart.
Numbers Counter: Displays the numbers counter section on the dashboard.
Pivot Combos: Displays pivots combo section on the dashboard.
%: Display the percentage of detected pivot combos on the dashboard instead of absolute numbers.
Pivot Combos Rows: Number of rows displayed by the "Pivots Combo" dashboard section.
Show MTF: Showa MTF candle numbering on the dashboard.
Location: Location of the dashboard on the chart.
Size: Size of the displayed dashboard.
🔶 USAGE
This script allows users with an understanding of The Strat to quickly highlight elements such as candle numbers, pivot machine guns, and custom combos. The usage for these concepts is given in the sub-sections below.
🔹 Candle Numbers
The Strat assigns a number to individual candles, this number is determined by the current candle position relative to the precedent candle, these include:
Number 1 - Inside bar, occurs when the previous candle range engulfs the current one.
Number 2 Up - Upside Directional Bar, occurs when the current price high breaks the previous high while the current low is lower than the previous high.
Number 2 Down - Downside Directional Bar, occurs when the current price low breaks the previous low while the current high is higher than the previous low.
Number 3 - Outside bar, occurs when the current candle range engulfs the previous one.
The script can highlight the number of a candle by using labels but can also style candles by depending on the candle number. Inside bars (1) only have their candle wick highlighted, directional bars (2) (-2) only have their candle body highlighted. Outside bars have their candle range highlighted.
Note that downside directional bars are highlighted with the number -2.
Users can see the total amount of times a specific candle number is detected on the historical data on the dashboard available within the settings, as well as the number of times a candle number is detected relative to the total amount of detected candle numbers expressed as a percentage.
It is also possible to see the current candle numbers returned by multiple timeframes on the dashboard.
🔹 Searching For Custom Combos
Combos are made of a sequence of two or more candle numbers. These combos can highlight multiple reversals/continuation scenarios. Various common combos are documented by The Strat community.
This script allows users to search for custom combos by entering them on the Combo user setting field.
When a user combo is found, it is highlighted on the chart as a box highlighting the combo range.
🔹 Pivot Combos
It can be of interest to a user to display the combo associated with a pivot high/low. This script will highlight the location of pivot points on the chart and display its associated combo by default. These are based on the Pivot Combo lookback and not displayed in real-time.
Users can see on the dashboard the combos associated with a pivot high/low, these are ranked by frequency.
🔹 Pivot Machine Gun (PMG)
Pivot Machine Guns (PMG)s describe the scenario where a single price variation breaks the value of multiple past successive higher lows/lower highs. This can highlight a self-exciting behavior, where even more past successive higher lows/lower highs get broken.
Users can select the minimum sequence length of successive higher lows/lower highs required for a PMG to be detected, as well the amount of these successive higher lows/lower highs that must be broken.
Transmit signals to overlayThis indicator transmits signals from another indicator panel to the main panel through the chart.
It may be suitable when it is not possible to use the main indicator with the "overlay=true" attribute.
For the script to work, the input signal must be "1" for BUY and "0" for SELL.
Alternative words: transmit signals, send, connect, broadcast, copy signals, duplicate.
---
You can change display style:
---
You can use alerts:
Time of Day - Volatility Report█ OVERVIEW
The indicator analyses the volatility and reports statistics by the time of day.
█ CONCEPTS
Around the world and at various times, different market participants get involved in the markets. How does this affect the market?
Knowing this gets you better prepared and improves your trading. Here are some ideas to explore:
When is the market busy and quiet?
What time is it the most volatile?
Which pairs in your watchlist are moving while you are actively trading?
Should you adjust your trading time? Should you change your trading pairs?
When does your strategy perform the best?
What entry times do your winners have in common? What about the exit times of your losers?
Is it worth keeping your trade open overnight?
Bitcoin (UTC+0)
Gold (UTC+0)
Tesla, Inc. (UTC+0)
█ FEATURES
Selectable time zones
Display the statistics in your geographical time zone (or other market participants), the exchange time zone, or UTC+0.
Configurable outputs
Output the report statistics as mean or median.
█ HOW TO USE
Plot the indicator and visit the 1H timeframe.
█ NOTES
Gaps
The indicator includes the volatility from gaps.
Calculation
The statistics are not reported from absolute prices (does not favor trending markets) nor percentage prices (does not depict the different periods of volatility that markets can go through). Instead, the script uses the prices relative to the average range of previous days (daily ATR).
Extended trading session
The script analyses extended hours when activated on the chart.
Daylight Saving Time (DST)
The exchange time or geographical time zone selected may observe Daylight Saving Time. For example, NASDAQ:TSLA always opens at 9:30 AM New York time but may see different opening times in another part of the globe (New York time corresponds to UTC-4 and UTC-5 during the year).
TSG 5% Daily CalculatorThis is a calculator I've created to help visualize Target and Risk Levels based on leverage use to trade crypto.
How to use it ?
Basic Use:
- Set the Direction of your trade - either Long or Short
- Set the Leverage you use in your trade - it is crutial to define the risk and target levels
- Set the Risk Amount you want to risk (in %) of your total balance ( Advised 2-3% )
- Set the Target Amount you want to profit at the target (the idea of this is 5% daily, so 5%).
- Set Entry Price if you have opened a position, and you will visually see your progress. Otherwise the levels will be adjusted to the Close of the candle.
Additions:
- Set your Initial Balance - to help you visualize on the Table your progress
- Set your Current Balance - for visualization purposes on ongoing trades and on the Table
- Entry Date - Advised to set it when you open a trade - you will be tracking the progress of your trade since the candle on which you opened it
- Show Table - to show the table of 5% daily and the target it is set on per day
- Table Size - Set table to be small or normal
- Together with the Table you have a big blue area behind that ends on the day you will become a Millionaire based on the Initial Balance, Current balance and Target % in your inputs
Flare🔶 METHODS
• Pine Script™ introduces methods ( 1 , 2 )! Much kuddos for the developers, Tradingview, and all who has worked on it!
• This educational script will show the simplified way of writing built-in methods, not to create a new method.
🔹 Simplified way of writing built-in methods:
· Instead of:
newArray = array.new()
array.unshift(newArray, 1)
lin = line.new(na, na, na, na)
line.set_xy1(lin, bar_index , close)
line.set_xy2(lin, bar_index + 10, close)
label newLabel = label.new(bar_index, high)
if barstate.islast
label.delete(newLabel)
· We now can write it like this:
newArray = array.new()
newArray.unshift(1)
lin = line.new(na, na, na, na)
lin.set_xy1(bar_index , close)
lin.set_xy2(bar_index + 10, close)
label newLabel = label.new(bar_index, high)
if barstate.islast
newLabel.delete()
——————————————————————————————————————————————————————————
· When using sometimes brackets are necessary:
label lab = label.new(bar_index, high)
if barstate.islast
label.set_color(lab, color.red)
label.delete(lab )
· ->
label lab = label.new(bar_index, high)
if barstate.islast
lab.set_color(color.red)
(lab ).delete() // lab .delete() doesn't compile at the moment
——————————————————————————————————————————————————————————
🔶 OVERVIEW OF SCRIPT
• The basic principles are:
· Find 1 point ( close ) x bars back from current bar ( settings: 'x close back').
· Create a 'Flare' shaped object from that point to current bar or further (dependable of "Width of Flare").
· Calculate where current close is located versus the Flare lines.
· On that bases, change colour and draw plotshapes.
· Below bar if current close is located in the upper part of the Flare
· Above bar if current close is located in the lower part of the Flare
· Above & Below if located in the middle part of the Flare
-> Above & Below colours has 3 different colours (adjustable), dependable on the position
🔶 EXAMPLES
· Neutral zone:
· Light Bullish zone:
· Bullish zone:
· Very Bullish / Overbought zone:
· Light Bearish zone:
· Bearish zone:
· Very Bearish / Oversold zone:
🔶 TECHNIQUES
🔹 I. Make a User Defined Type (UDT) Flare, with:
· 5x linefill - array of linefill
· int iDir, which captures the direction (current location of close in Flare)
· color cCol, this is a colour variable in relation to the direction.
🔹 II. Different functions will add a new Flare object, and update the values on each bar.
· Explanation of each function can be found in the script.
🔶 EXTRA's
· The input.color() is located in the function set_flare_B(flare obj)
· Best to put the inputs at the beginning of the script, I included this alternative just to show it is possible (but mostly not ideal)
· Background colour (settings: Bgcolor) can be enabled for better visibility of colours
Global Unemployment RateThe Global Unemployment rate estimates what is the rate of unemployment of the whole world, taking same data from multiple countries and normalizing them.
It includes the Eurozone + 19 countries from all the continents, which are some of the richest countries as well as some of the most populous.
It sadly does not include India as its unemployment data on trading view as of today (Feb 2023) is only since year 2019, which is too short
Entry Percent: EssamThis Pine Script code is designed to perform the task of computing and showcasing the profit percentage, profit value, and the duration for which a specific asset is held, all in real-time. The script effectively leverages the built-in resources to provide a seamless and robust experience, as it presents the calculated figures in an easily readable format on the chart, without causing any lag or disruptions to the chart.
ICT MTF FVG [MK]FVGs (Fair Value Gaps) are significant levels that may act as support or resistance to price. The script finds FVGs as per ICT trading system, then plots the full FVG to the right side of the chart. FVG boxes do not change size when they are semi-mitigated as its important to know where the original FVG midpoint lies. Plotting to the right side of price allows for a cleaner chart. The script is MTF and can display FVG boxes for the following timeframes. Chart, 5,10,15,30,1hr,4hr,8hr,12hr,D,W,M.
Below shows 1hr FVGs marked out. NOTE: this is not what the script does, this is for explanation only.
Below shows what the script will do. 1hr FVGs shown on 15min chart
How To Import And Offset CSV DataExample method of how to import, offset, and plot CSV data using an array.
NOTICE: This is an example script and not meant to be used as an actual strategy. By using this script or any portion thereof, you acknowledge that you have read and understood that this is for research purposes only and I am not responsible for any financial losses you may incur by using this script!
Normalize [JOY] Normalize compares the price of an asset across different timeframes. I have used the daily, weekly, and monthly timeframes. The resulting plot shows the degree to which the instrument deviates from the timeframes. Users can choose their period if desired.
ICT Liquidty H/L [MK]indicator shows liquidity levels at pivot highs and lows on the chart timeframe. Levels are drawn as a horizontal line up to the last active bar. Once a level has been passed through, the level is highlighted. The liquidity level will remain highlighted until a pre determined amount of bars have closed after the level was passed. These liquidity levels can be used as targets for trades, or as potential reversal points. Liquidity (or resting orders) at key pivot points form a key part of the ICT trading system. Users can configure the indicator to display the untapped liquidity levels, or they can be completely hidden until they are passed through.
ICT Opening Gaps [MK]
The indicator plots levels which can act as magnets to price. The levels are gap areas which are used within the ICT (The Inner Circle Trader) trading system.
The indicator plots 5 areas of interest:
1: Daily Volume Imbalances - Referencing the Daily chart, boxes are calculated from close to open between all candles. Candles which have only 'wicks' between the close and open prices are considered 'volume imbalances. The boxes can then be shown on LTFs to aid in decision making for intraday traders. Imbalances can be limited to a maximum amount shown and mitigated imbalances can be removed from the chart. All colors can be customised.
Volume Imbalance example:
2: NWOG - New Week Opening Gap - Plotted from Friday Close at 1659 to Sunday Opening at 1800 (EST). The current NWOG can be displayed on its own, or previous weeks can also be shown (ICT recommends the previous 4 weeks also). Boxes are plotted with a midline and all colors can be customised.
New Week Opening Gaps example:
3. NDOG - New Day Opening Gaps - Plotted from day close at 1659 (EST) to restart at 1800 (EST). All colors can be customised. These gaps can be very small so line widths of 3+ are recommended if the lines are to be seen on HTFs
New Day Opening Gap example:
4. New Opening Gap - Plotted from close at 1659 to Session open at 0930 (EST). These areas can possibly be closed/filled after opening at some time. The indicator will draw box to the right of price which shows if the Opening Gap is UP or DOWN. The box will change color to show up or down, or text alone can be used instead of the box. All colors can be customised.
New Opening Gap Box example:
5. 0930 Opening Line - Draws a horizontal line from the opening price at 0930 (EST) to the last bar on the chart. This is the level used to calculate the New Opening Gap. All colors can be customised.
0930 Opening Line example:
ICT MacrosThis script allows traders to visualize the range of time when a macro (an automated series of instructions/trades from large fund traders, executed by an algorithm) will likely occur in the market. It does this by drawing vertical lines and labels on the chart at these specific times:
(Macro Open) - 9:50 AM EST
(Macro Close) - 10:10 AM EST
(Macro Open) - 10:50 AM EST
(Macro Close) - 11:10 AM EST
(Macro Open) - 1:10 PM EST
(Macro Close) - 1:40 PM EST
(Macro Open) - 3:15 PM EST
(Macro Close) - 3:45 PM EST
The theory behind the use of these macros - is that the market will either seek buy side or sell side liquidity, or seek to rebalance price at a point of interest in between the open and close of the macro. Traders who follow this theory can use that information to anticipate how price might behave.
When a macro occurs, the script draws a vertical line on the chart using a dotted line style with a user-defined color. Additionally, a label is placed above the line to indicate whether it is a Macro Open or Macro Close event.
To preserve space, the labels are abbreviated on chart - "Macro Open" (M.O.) and "Macro Close" (M.C.) for both the morning and afternoon trading sessions. The labels may be turned on/off by the user.
The script also includes alerts that can notify traders when a macro occurs. These alerts can be set to go off once per bar close, and the alert message indicates the specific macro type and time.
This script is entirely open-source, meaning that traders can read the code and modify it as needed. Credit to the foundation of this script goes to TradingView user @rickyzcarroll for his open source Strat Assistant Hour Flip script. Important changes include the specific time changes and alert function.
Pressure - Buying and SellingThis is the Pressure Indicator.
The Pressure Indicator analyzes a number of price ratios to measure the pressure of Buyers and Sellers.
I’ve also added to the indicator:
1) Moving Averages (MA) – You can choose 3 types of MA:
- Simple Moving Average (SMA)
- Exponential Moving Average (EMA) - default
- Volume Weighted Moving Average (VWMA)
- Arnaud Legoux Moving Average (ALMA)
By default the MA are not displayed. You can turn them on or off.
2) Standard Deviation Bands and MA Bands – Bands only for the MA type 1 selection. Usually, the Pressureis inside the Bands. If it is beyond the Bands that could mean the current trend is ending. The MA Bands are turned off by default but you can turn them on the Styles Tab Menu.
3) Levels for Overbought and Oversold Zones:
- Gray Overbought 60
- Gray Oversold 40
4) Levels for Buying and Selling Pressure (3 types of pressure + 1 more). If the Pressure is crossing various intermediate levels that means there is Buying or Selling Pressure at those levels.
5) Signals for Crossing Overbought and Oversold Levels:
- Top Red fills for Crossing Down Overbought Level
- Bottom Lime fills for Crossing Up Oversold Level
6) Signals for Buying and Selling Pressure:
- Buy Pressure 1 and 2 are the smaller lime dots.
- Buy Pressure 1 and 2 together are the bigger lime dots.
- Buy Pressure 3 (Crossing Deviation Bands Up) are the blue dots.
- Sell Pressure 1 and 2 are the smaller red dots.
- Sell Pressure 1 and 2 together are the bigger red dots.
- Sell Pressure 3 (Crossing Deviation Bands Down) are the orange dots.
If there are more than one dot appearing at the same moment they will appear displaced in a vertical way at the same time.
If there is something wrong with the code or its calculations, please let me know.
If you want to modify or improve the code, feel free to do that, but please let me know the changes you made.
This Indicator is very accurate when using the Weekly Timeframe . I hope you enjoy it!
Bitcoin Correlation MapHello everyone,
This indicator shows the correlation coefficients of altcoins with bitcoin in a table.
What is the correlation coefficient?
The correlation coefficient is a value that takes a value between 0 and 1 when a parity makes similar movements with the reference parity, and takes a value between 0 and -1 when it makes opposite movements.
In order to obtain more meaningful and real-time results in this indicator, the weighted average of the correlation values of the last 200bar was used. You can change the bar length as you wish. With the correlation value, you can see the parities that have similar movements with bitcoin and integrate them into your strategy.
You can change the coin list as you wish, and you can also calculate their correlation with etherium instead of bitcoin .
The indicator shows the correlation value of 36 altcoins at the moment.
The indicator indicates the color of the correlated parities as green and the color of the inversely correlated parities as red.
Cheers
TASC 2023.03 Every Little Bit Helps█ OVERVIEW
TASC's February 2023 edition of Traders' Tips includes an article titled "Every Little Bit Helps: Averaging The Open And Close To Reduce Noise" by John Ehlers. This code implements the numerical example from this article.
█ CONCEPTS
Using theories from digital signal processing as a starting point, John Ehlers argues that using the average of the open and close as the source time series of an indicator instead of using only the closing price can often lead to noise reduction in the output. This effect especially applies when there is no gap between the current bar's opening and the previous bar's closing prices. This trick can reduce noise in many common indicators such as the RSI, MACD, and Stochastic.
█ CALCULATIONS
Following the example presented in the original publication, this script illustrates the proposed strategy using the Relative Strength Index (RSI) as a test indicator. It plots two series:
RSI calculated using only closing prices as its source.
RSI of the same length as the first, but calculated using the average of open and close prices as its source, i.e. (open+close)/2 .
This script demonstrates that using the average of open and close as the calculation source results in a smoother indicator. To visually emphasize the advantage of this proposed trick, the script's color scheme is sensitive to both the RSI value and the difference between the two RSI data streams.
The Perfect Support & ResistanceSupport & Resistance drawn based on overbought & oversold RSI . where the overbought acts as resistance and oversold acts as support.
It has 2 levels (for support and resistance - i call them level_n_high or level_n_low) for each lookback period. it checks the highest pivot and the lowest pivot based on the lookback period then we compare if rsi is higher than the highest pivot or the lowest pivot and we also check if rsi is overbought or oversold and if the statement is true, then we assign the high to the variable level_n_high or level_n_low. n being the number of levels. in total there are 5 levels with both high & low for 5 lookback periods. This is basically how the code works.
these levels can be accessed at any timeframe. the defaults are 5m and 30m.
RSI settings: (default)
-------------------
length - 14
source - close
overbought - 70
oversold - 30
lookback settings: (default)
---------------------
lookback_0 - 200
lookback_1 - 100
lookback_2 - 50
lookback_3 - 20
lookback_4 - 10
Timeframe Settings: (default)
-------------------
htf1 - 5m
htf2 - 30m
Enjoy!
TOMMAR#TOMMAR #MultiMovingAverages #MMAR
Dear fellow traders, this is Tommy, and today I'd like to introduce you to the Multi-Moving Averages Ribbon (MMAR) indicator, which I believe to be one of the best MMAR indicators available on TradingView. Moving Averages is a popular technical analysis tool used to smooth out price data by creating an average of past price data points over a specified time period. They can be used to identify trends and provide a clearer view of price action, as well as generate buy and sell signals by observing crossovers between different moving average lines.
In the MMAR indicator, we have incorporated 12 different types of Moving Averages, including Simple Moving Averages (SMA), Exponential Moving Averages (EMA), Weighted Moving Averages (WMA), Hull Moving Averages (HMA), and Smoothed Moving Averages (SMMA), among others. This allows traders to choose the optimal type for their preferred trading commodities.
One common technique in technical analysis is using multiple Moving Averages with varying lengths, which provides a more comprehensive view of price action. By analyzing multiple Moving Averages with different timeframes, traders can better understand both short- and long-term trends and make more informed trading decisions. Some of the well-known combinations of multiple moving averages used by traders are (5, 9, 14, 21, 45), (6, 11, 16, 22, 51), [8, 13, 21, 55), (50, 100, 200), and (60, 120, 240).
Another way to gauge the strength of the market trend is to look for the arrangement of the Moving Averages. If they are in a sequential order, with the shortest on top and the longest on the bottom, it is most likely a bullish trend. On the other hand, if they are arranged in reverse order, with the shortest on the bottom and the longest on top, it is most likely a bearish trend. The 'Trend Light' in the indicator settings will automatically signal when the Moving Averages are in either an orderly or reverse arrangement.
Lastly, I have added a useful feature to the indicator: the 'MA Projection'. This feature projects and forecasts the Moving Averages in the future, allowing traders to easily identify confluence zones in future candlesticks. Please note that the projection levels may change in the case of extreme price action that significantly affects the Moving Averages.
This is free so any Tradingview users can use this indicator. Just search TOMMAR in the indicator section located on top of the chart.
#TOMMAR #MultiMovingAverages #MMAR
안녕하세요 트레이더 여러분, 토미입니다. 오늘 여러분들에게 소개드릴 지표는 다양한 길이의 이동평균선 조합을 사용할 수 있는 MMAR (Multiple Moving Averages Ribbon)입니다. 아마 제가 만든 MMAR 지표가 트레이딩뷰에서 가장 쓸만할 겁니다. 이동평균선, 줄여서 이평선은 말 그대로 특정 기간 범위 내의 주가들을 평균한 값들로 이루어진 선입니다. 제가 이평선 관련된 강의 자료는 예전에 올려드린 바 있으니 더 자세한 내용이 궁금하신 분들은 아래 링크/이미지 클릭하시길 바랍니다.
본 지표는 Simple Moving Averages (SMA), Exponential Moving Averages (EMA), Weighted Moving Averages (WMA), Hull Moving Averages (HMA), 그리고 Smoothed Moving Averages (SMMA) 등을 포함해 총 12개 종류의 이평선 지표를 사용할 수 있습니다. 또한 각 이평선의 길이들도 하나하나 일일이 설정하실 수 있습니다. 예를 들어 요즘에 자주 보이는 이평선들의 조합이 , , , , 그리고 등등이 존재하는데 여러분의 취향에 맞게 설정하여 사용하시면 됩니다.
몇 가지 주요 기능에 대해서 설명 드리겠습니다. 설정에서 ‘Trend Light’를 키면 이평선들의 정배열 혹은 역배열 여부를 쉽게 볼 수 있습니다. 이평선이 정배열일때는 맨 아래의 이평선에 초록불이, 역배열일때는 맨 위의 이평선에 빨간불이 켜지며 둘 다 아닐 땐 아무 불도 켜지지 않습니다. 또한 ‘MA Projection’을 키면 이평선들의 미래 예측 값들을 확장해줍니다. 당연히 가격 변동이 갑자기 크게 나오면 이평선 예측 확장 레벨들이 확 바뀌겠죠.
지표창에 TOMMAR 검색하시거나 아래 즐겨찾기 인디케이터에 넣기 클릭하시면 누구나 사용하실 수 있습니다~ 여러분의 구독, 좋아요, 댓글은 저에게 큰 힘이 됩니다.
Stochastic Oversold / Overbought Multi Time Frame on CandleAt the suggestion of a friend, I prepared this educational indicator to show how to use a Multi time frames on the chart based on the color of The Candle.
This Script calculates the stochastic oscillator for multiple timeframes and displays the overbought/oversold signals on the chart with color coding.
The stochastic oscillator is a momentum indicator that compares a security's closing price to its high-low range over a set number of periods. The indicator oscillates between 0 and 100, with readings above 80 considered overbought and readings below 20 considered oversold.
The indicator has the following input parameters:
%K Length: the number of periods used to calculate the stochastic oscillator (default is 14).
%K Smoothing: the number of periods used to smooth the stochastic oscillator (default is 1).
Three timeframes: The timeframes for which the stochastic oscillator is calculated can be set as 15-minute, 1-hour, or 4-hour intervals. For each timeframe, the user can choose to display the indicator (or not) and set the color of the candle. The user can also set the overbought and oversold levels (default is 80 and 20, respectively).
The indicator calculates the stochastic oscillator using the ta.stoch function from the built-in ta library in PineScript. It then uses the ta.sma function to smooth the stochastic oscillator if specified. Finally, the indicator uses the TimeframFuction to calculate the stochastic oscillator for different timeframes, which is then displayed on the chart using the barcolor function. The color of the candle is set based on whether the stochastic oscillator is overbought or oversold, as determined by the overbought/oversold levels specified by the user.
Note: This code is example for you to use multi timeframe in your indicator or Strategy , also prevent Repainting Calculation
Volume scaled Price + auto colour change light/dark mode🔶 OVERVIEW
🔹 This script shows price in a similar style as volume . To accomplish this we use the body of the candle ( close - open ), which is placed on a zero line.
This can be useful when comparing volume ~ price .
🔹 3 options are included to show additional lines, to make comparisons easier:
· Percentile nearest rank
· Bollinger Bands (BB)
· Simple Moving Average (SMA)
🔶 SETTINGS
🔹 Option : choose whether to show price (candles) or volume . Adding 2 versions of this indicator on the chart enables you to compare these 2 options:
🔹 Lines:
· (Percentile nearest rank (only the setting mult is used for this option).
· Bollinger Bands (BB) (only the setting % perc. nearest rank is used for this option).
· Simple Moving Average (SMA )
All 3 options will use length , this is the amount of bars used for calculations.
🔹 Show wick will show you... wicks :)
🔶 PERCENTILE NEAREST RANK
🔹 This script has 2 extra types of background color
dvP = volume > volume and z < z and z < prP_ and volume > prV
· In this case:
· volume is higher than previous volume ( volume > volume )
· volume is above 90th percentile rank ( volume > prV )
· price is lower than previous price ( z < z )
· price is below 10th percentile rank ( z < prP_ )
dvV = volume < volume and z > z and z > prP and volume < prV_
· The second type background color is reversed ( volume lower, price higher)
🔶 AUTOMATIC COLOUR CHANGE WHEN SWITCHING DARK/LIGHT MODE
🔹 chart.bg_color returns the color of the chart’s background from the "Chart settings/Appearance/Background" field, while chart.fg_color returns a color providing optimal contrast with chart.bg_color .
· Following technique gives you the possibility to pick your own colour for either dark/light time.
· We first retrieve separately the red, green and blue component of the measured chart.bg_color
r = color.r(chart.bg_color)
g = color.g(chart.bg_color)
b = color.b(chart.bg_color)
The following assumption states when all 3 colour components' values are below 80, we are in the dark mode:
isDark = r < 80 and g < 80 and b < 80
Now we can use isDark to automatically show your own dark/light mode colours (chosen at settings), dependable on the mode:
Cheers!