10 EMA HTF LTF10 EMA HTF LTF – Exponential Moving Averages Indicator
📌 Indikator haqida
Ushbu indikator joriy vaqt oralig‘ida (LTF – Lower Timeframe) va yuqori vaqt oralig‘ida (HTF – Higher Timeframe) trendni tahlil qilish uchun 10 ta Exponential Moving Average (EMA) chizadi. Har bir EMA o‘zining uzunligiga qarab, harakatlanish tezligiga ega bo‘lib, trendlardagi o‘zgarishlarni kuzatish va trend davomiyligini aniqlash imkonini beradi.
📊 Xususiyatlar
✅ 10 ta EMA: (10, 15, 20, 25, 30, 35, 40, 45, 50, 55)
✅ Trendlardagi o‘zgarishlarni kuzatish uchun mos
✅ Rangli va aniq grafik tasvir
✅ Qisqa va uzoq muddatli trendlarni aniqlashga yordam beradi
📈 Foydalanish usuli
EMA’lar fanning shakliga kirsa, bu kuchli trend mavjudligini bildiradi.
Narx EMA’lardan yuqorida bo‘lsa – bullish trend (o‘sish), pastda bo‘lsa – bearish trend (pasayish).
EMA’lar bir-biriga yaqinlashsa – konsolidatsiya yoki trend o‘zgarishi ehtimoli bor.
🔔 Qaysi treyderlar uchun mos?
✔ Skalperlar va intraday treyderlar – qisqa muddatli trendlarni kuzatish uchun.
✔ Swing treyderlar – uzoq muddatli trendlarga asoslangan strategiyalar uchun.
✔ Yangi boshlovchilar – asosiy trend tahlil qilishni o‘rganish uchun oddiy va tushunarli indikator.
💡 Qo‘shimcha fikrlar
Bu indikator har qanday aktiv (forex, aksiyalar, kriptovalyuta) uchun ishlaydi va boshqa indikatorlar bilan birga qo‘llash mumkin.
Multitimeframe
MTF- Standard Deviation ChannelWhat Is Standard Deviation?
Standard deviation is a statistical measurement that looks at how far individual points in a dataset are dispersed from the mean of that set. If data points are further from the mean, there is a higher deviation within the data set. It is calculated as the square root of the variance.
Key Takeaways:
Standard deviation measures the dispersion of a dataset relative to its mean.
It is calculated as the square root of the variance.
Standard deviation, in finance, is often used as a measure of the relative riskiness of an asset.
A volatile stock has a high standard deviation, while the deviation of a stable blue-chip stock is usually rather low.
Standard deviation is also used by businesses to assess risk, manage business operations, and plan cash flows based on seasonal changes and volatility.
Source: Investopedia
--------------- UPDATE ---------------
The deviation is calculated automatically. (via stdev function).
--
The targeted timeframe is available in the options (recalculation cycle).
--
If the selected security is a contract the number of days before expiration is automatically managed, otherwise it will use the 'default' options.
---------------------------------------
50% Candle RetraceThis custom indicator draws a horizontal line at the 50% retracement level of each candlestick on the chart. It calculates the midpoint between the high and low of each candle, which is often used by traders to identify potential entry, exit and take-profit levels. Once price action returns to an untouched level, the line will be removed, leaving only the levels where price action is still missing.
Key Features:
Timeframe: Works on all timeframes.
Line Color: Customize the line color to suit your charting preferences.
Line Width: Adjust the thickness of the retracement line for better visibility.
Line Style: Choose between solid, dotted, or dashed lines.
Up/Down Candle Selection: Option to only display retracement lines for up (bullish) candles, down (bearish) candles, or both.
Full Customization: Control the transparency (opacity) of the line for enhanced visual clarity.
Simple Setup: No complicated settings – simply choose your preferred color, line style, and visibility options.
This indicator is perfect for traders who prefer to use price action and retracement levels to identify potential trade opportunities.
How It Works:
The indicator automatically calculates the 50% level (midpoint) for each candlestick, drawing a line at this level. It will only draw lines for candles that match your chosen criteria (up or down candles), ensuring the chart remains clean and relevant to your trading strategy. Lines are automatically removed as soon as price crosses them.
BOĞA VE AYI GÜCÜ-TREND ÖLÇEN GÖSTERGE //@version=5
indicator("Boğa ve Ayı Etkinliği - Multi-Timeframe", overlay=true)
// Parametreler
rsiPeriod = input.int(14, title="RSI Periyodu")
emaShortPeriod = input.int(9, title="Kısa EMA Periyodu")
emaLongPeriod = input.int(21, title="Uzun EMA Periyodu")
macdShort = input.int(12, title="MACD Kısa Periyot")
macdLong = input.int(26, title="MACD Uzun Periyot")
macdSignal = input.int(9, title="MACD Sinyal Periyodu")
// Her Zaman Dilimi İçin Hesaplamalar
// 1 Dakika (1M) verisi
rsi1M = request.security(syminfo.tickerid, "1", ta.rsi(close, rsiPeriod))
emaShort1M = request.security(syminfo.tickerid, "1", ta.ema(close, emaShortPeriod))
emaLong1M = request.security(syminfo.tickerid, "1", ta.ema(close, emaLongPeriod))
= request.security(syminfo.tickerid, "1", ta.macd(close, macdShort, macdLong, macdSignal))
// 5 Dakika (5M) verisi
rsi5M = request.security(syminfo.tickerid, "5", ta.rsi(close, rsiPeriod))
emaShort5M = request.security(syminfo.tickerid, "5", ta.ema(close, emaShortPeriod))
emaLong5M = request.security(syminfo.tickerid, "5", ta.ema(close, emaLongPeriod))
= request.security(syminfo.tickerid, "5", ta.macd(close, macdShort, macdLong, macdSignal))
// 1 Saat (1H) verisi
rsi1H = request.security(syminfo.tickerid, "60", ta.rsi(close, rsiPeriod))
emaShort1H = request.security(syminfo.tickerid, "60", ta.ema(close, emaShortPeriod))
emaLong1H = request.security(syminfo.tickerid, "60", ta.ema(close, emaLongPeriod))
= request.security(syminfo.tickerid, "60", ta.macd(close, macdShort, macdLong, macdSignal))
// 4 Saat (4H) verisi
rsi4H = request.security(syminfo.tickerid, "240", ta.rsi(close, rsiPeriod))
emaShort4H = request.security(syminfo.tickerid, "240", ta.ema(close, emaShortPeriod))
emaLong4H = request.security(syminfo.tickerid, "240", ta.ema(close, emaLongPeriod))
= request.security(syminfo.tickerid, "240", ta.macd(close, macdShort, macdLong, macdSignal))
// Günlük (1D) verisi
rsi1D = request.security(syminfo.tickerid, "D", ta.rsi(close, rsiPeriod))
emaShort1D = request.security(syminfo.tickerid, "D", ta.ema(close, emaShortPeriod))
emaLong1D = request.security(syminfo.tickerid, "D", ta.ema(close, emaLongPeriod))
= request.security(syminfo.tickerid, "D", ta.macd(close, macdShort, macdLong, macdSignal))
// Trend Yönü Hesaplamaları
isBullish(rsi, emaShort, emaLong, macdLine, signalLine) =>
(rsi > 50) and (emaShort > emaLong) and (macdLine > signalLine)
isBearish(rsi, emaShort, emaLong, macdLine, signalLine) =>
(rsi < 50) and (emaShort < emaLong) and (macdLine < signalLine)
// Durumları Belirleme
trend1M = isBullish(rsi1M, emaShort1M, emaLong1M, macdLine1M, signalLine1M) ? "Boğalar Etkin" : isBearish(rsi1M, emaShort1M, emaLong1M, macdLine1M, signalLine1M) ? "Ayılar Etkin" : "Kararsız"
trend5M = isBullish(rsi5M, emaShort5M, emaLong5M, macdLine5M, signalLine5M) ? "Boğalar Etkin" : isBearish(rsi5M, emaShort5M, emaLong5M, macdLine5M, signalLine5M) ? "Ayılar Etkin" : "Kararsız"
trend1H = isBullish(rsi1H, emaShort1H, emaLong1H, macdLine1H, signalLine1H) ? "Boğalar Etkin" : isBearish(rsi1H, emaShort1H, emaLong1H, macdLine1H, signalLine1H) ? "Ayılar Etkin" : "Kararsız"
trend4H = isBullish(rsi4H, emaShort4H, emaLong4H, macdLine4H, signalLine4H) ? "Boğalar Etkin" : isBearish(rsi4H, emaShort4H, emaLong4H, macdLine4H, signalLine4H) ? "Ayılar Etkin" : "Kararsız"
trend1D = isBullish(rsi1D, emaShort1D, emaLong1D, macdLine1D, signalLine1D) ? "Boğalar Etkin" : isBearish(rsi1D, emaShort1D, emaLong1D, macdLine1D, signalLine1D) ? "Ayılar Etkin" : "Kararsız"
// Tabloyu Göster
var table trendTable = table.new(position.top_right, 2, 5)
if (bar_index % 10 == 0) // Tabloyu her 10 bar'da bir güncelle
table.cell(trendTable, 0, 0, "1M Trend", text_color=color.white, bgcolor=color.blue)
table.cell(trendTable, 1, 0, trend1M, text_color=color.white, bgcolor=color.blue)
table.cell(trendTable, 0, 1, "5M Trend", text_color=color.white, bgcolor=color.blue)
table.cell(trendTable, 1, 1, trend5M, text_color=color.white, bgcolor=color.blue)
table.cell(trendTable, 0, 2, "1H Trend", text_color=color.white, bgcolor=color.blue)
table.cell(trendTable, 1, 2, trend1H, text_color=color.white, bgcolor=color.blue)
table.cell(trendTable, 0, 3, "4H Trend", text_color=color.white, bgcolor=color.blue)
table.cell(trendTable, 1, 3, trend4H, text_color=color.white, bgcolor=color.blue)
table.cell(trendTable, 0, 4, "1D Trend", text_color=color.white, bgcolor=color.blue)
table.cell(trendTable, 1, 4, trend1D, text_color=color.white, bgcolor=color.blue)
// İndikatörleri Ekle
plot(emaShort1H, color=color.blue, title="Kısa EMA 1H", linewidth=2)
plot(emaLong1H, color=color.orange, title="Uzun EMA 1H", linewidth=2)
plot(macdLine1H - signalLine1H, color=color.purple, style=plot.style_histogram, title="MACD Histogram 1H")
Long and Short Term Highs and LowsLong and Short Term Highs and Lows
Overview:
This indicator is designed to help traders identify significant price points by marking new highs and lows over two distinct timeframes—a long-term and a short-term period. It achieves this by drawing optional channel lines that outline the highest highs and lowest lows over the chosen time periods and by plotting visual markers (triangles) on the chart when a new high or low is detected.
Key Features:
Dual Timeframe Analysis:
Long Term: Uses a user-defined “Time Period” (default 52) and “Time Unit” (default: Weekly) to determine long-term high and low levels.
Short Term: Uses a separate “Time Period” (default 50) and “Time Unit” (default: Daily) to compute short-term high and low levels.
Optional Channel Display:
For both long and short term periods, you have the option to display a channel by plotting the highest and lowest values as lines. This visual channel helps to delineate the range within which the price has traded over the selected period.
New High/Low Markers:
The indicator identifies moments when the highest high or lowest low is updated relative to the previous bar.
When a new high is established, an up triangle is plotted above the bar.
Conversely, when a new low occurs, a down triangle is plotted below the bar.
Separate input toggles allow you to enable or disable these markers independently for the long-term and short-term setups.
Inputs and Settings:
Long Term High/Low Period Settings:
Show New High/Low? (STW): Toggle to enable or disable the plotting of new high/low markers for the long-term period.
Time Period: The number of bars used to calculate the highest high and lowest low (default is 52).
Time Unit: The timeframe on which the long-term calculation is based (default is Weekly).
Show Channel? (SCW): Toggle to display the channel lines that connect the long-term high and low levels.
Short Term High/Low Period Settings:
Show New High/Low?: Toggle to enable or disable the plotting of new high/low markers for the short-term period.
Time Period: The number of bars used for calculating the short-term extremes (default is 50).
Time Unit: The timeframe on which the short-term calculations are based (default is Daily).
Show Channel?: Toggle to display the channel lines for the short-term highs and lows.
Indicator Logic:
Channel Calculation:
The script uses the request.security function to pull data from the specified timeframes. For each timeframe:
It calculates the lowest low over the defined period using ta.lowest.
It calculates the highest high over the defined period using ta.highest.
These values can be optionally plotted as channel lines when the “Show Channel?” option is enabled.
New High/Low Detection:
For each timeframe, the indicator compares the current high (or low) with its immediate previous value:
New High: When the current high exceeds the previous bar’s high, an up triangle is drawn above the bar.
New Low: When the current low falls below the previous bar’s low, a down triangle is drawn below the bar.
Usage and Interpretation:
Trend Identification:
When new highs (or lows) occur, they can signal the start of a strong upward (or downward) movement. The indicator helps you visually track these critical turning points over both longer and shorter periods.
Channel Breakouts:
The optional channel display offers additional context. Price movement beyond these channels may indicate a breakout or a significant shift in trend.
Customizable Timeframes:
You can adjust both the time period and time unit to fit your trading style—whether you’re focusing on longer-term trends or short-term price action.
Conclusion:
This indicator provides a dual-layer analysis by combining long-term and short-term perspectives, making it a versatile tool for identifying key highs and lows. Whether you are looking to confirm trend strength or spot potential breakouts, the “Long and Short Term Highs and Lows” indicator adds a valuable visual element to your TradingView charts.
NTS (NewStrategy)One of the best Strategies that works with market structure!
note: The usage of this great strategy is so complex so do not buy/sell when plot color turns blue/red
To learn using this great strategy, go ahead and watch these tutorials on our YT Channel: www.youtube.com
We also have a community. Share your live trades to be approved in NTS second layer private team. You can also ask questions there:
t.me
This will work for Forex and crypto
Please report bugs in community
Pre-Market High & LowIndicator: Pre-Market High & Low
This indicator tracks the high and low price levels of a stock during the pre-market session (4:00 AM - 9:30 AM EST), before the official market open. It dynamically updates during pre-market hours, identifying the highest and lowest prices reached. Once the pre-market session ends, these levels are saved and plotted on the chart as reference points for the regular market session.
Key Features:
Dynamic Updates: Continuously tracks the high and low during pre-market hours.
Visual Indicators: Plots horizontal lines representing the pre-market high (green) and low (red).
Post-Market Reference: Once pre-market ends, these levels remain visible for the regular market session as reference points for potential breakout or breakdown levels.
How to Use:
Use this indicator to identify potential breakout or breakdown levels that may happen at the market open.
The green line represents the highest price reached during pre-market, while the red line indicates the lowest price.
The indicator will stop updating once the pre-market session closes (9:30 AM EST) and will remain visible as reference levels throughout the trading day.
Ideal for:
Day traders looking for pre-market support and resistance levels.
Traders analyzing the initial market reaction based on pre-market price action.
EMA9/EMA20 Crossover Signalssimple and best do not complicate trading, just take action on sell and buy signal make sure the rsi is closer to overbought and oversold level for longer trades and scalping if closer to 50, stay till it crosses back, should work best in trending market, range bound market add bbollinger band to see if it makes sense. enjoy and recommend.
MTF Pivots with lines (Nearest to the Price)In this indicator, I demonstrate the MTF pivots with lines connecting each pivot. These pivots are represented by lines, and there is a filter to display the nearest line to the current price.
C&P MA/KT Compare & Predict Moving average / Current market price.
This is simple table indicator. Located at right-top of chart. Shows which way will MA's head go.
I made this indicator for automate candle countings & compare price. With this friend, you will be know trend more faster then waiting traditional MA golden / dead crossing.
In factory settings, current market price will be compared with closing price of the candle, corresponding to previous number 7, 25, 60, 99, 130, 240. If Current market price is lower then past, the box for the corresponding MA is highlighted in red and appears as Down. In opposite case, it will be highlighted in green and indicates Up.
MA와 시장가 차이로 MA의 머리 방향을 예측해주는 간단한 지표입니다.
수동으로 캔들 되돌려서 종가와 시장가 비교하는게 너무 번거로워서 자동화를 위해 제작되었습니다. 해당 지표를 이용하시면 MA의 골든/데드 크로스를 기다리는 것보다 더 빠른 예측이 가능합니다.
차트 우측 상단에 예측 값이 표시되며, 기본 설정에선 7, 25, 60, 99, 130, 240개 전 캔들의 종가와 시장가가 비교됩니다. 시장가가 비교 값보다 높을 때는 초록 배경에 Up 텍스트가 출력됩니다. 반대의 경우엔 빨간색 배경에 Down 표기가 나타납니다.
RCI Strategy by BahaminThis strategy helpful with someone wants trade with RSI and CCI over bought and over sell ... with + 60% win rate about inside tradingview strategy tester .. u can handle it with +80 % win rate by the way .... i hope this is use full for you guys .... please give me feedback after use this ... Email : BahaminStream@gmail.com
Arbitrage SpreadThis indicator was originally published by I_Leo_I
The moving average was modified from EMA to SMA. EMA responds more quickly to recent price changes. It captures short price movements. If you are a day trader or using quick scalping strategies, the EMA tends to be more effective as it provides faster signals.
This indicator helps to find spreads between cryptocurrencies, assess their correlation, spread, z score and atr z score.
The graphs are plotted as a percentage. Because of the limitation in pine tradingview for 5000 bars a period was introduced (after which a new starting point of the graph construction will be started), if you want it can be disabled
The multiplier parameter affects only the construction of the joint diagram on which z score and atr z score are calculated (construction of the diagram is done by dividing one pair by another and multiplying by the multiplier parameter) is shown with a red line
To create a notification you have to specify the data for parameters other than zero which you want to monitor. For parameters z score and atr z score data are counted in both directions
The data can be tracked via the data window
Link to image of the data window prnt.sc/93fKELKSQOhB
Trust The Process - Defaultthis is my personal indicator, please use it with you own risk and do your analysis before making any trade. This indicator is to help you with your analysis. Profit loss depends upon your executions
Bitcoin Log Growth Regression Curve (Tommy)1. Introduction
Bitcoin’s price had historically exhibited exponential growth, meaning its growth rate increased over time rather than remaining constant. To analyze this behavior, I employed a logarithmic scale. The logarithmic transformation converted the exponential growth pattern into a linear relationship, which was easier to analyze using linear regression techniques.
2. What Is a Logarithmic Function?
A logarithmic function (in this case, using base 10) transforms a number x into log10(x). For example, log10(100) = 2 because 10^2 = 100. This transformation compresses data that spans several orders of magnitude into a smaller, more manageable scale. In my analysis, the logarithmic transformation was applied to both the time variable (expressed as “weekly bar numbers”) and the price. This approach converted an exponential relationship into a linear one.
3. Selection of Key Coordinates
Key turning points in Bitcoin’s historical price were selected, representing the cycle peaks and bottoms. Since TradingView charts begin on 2009 10 05, I converted these dates into “weekly bar numbers. The chosen coordinates were as follows:
- Cycle Peaks (Highs):
(2011-06 06-$32) -> (80, $32)
(2013-11-25, $1240) -> (208, $1240)
(2017-12-11, $19804) -> (451, $19804)
(2021-11-08, $68997) -> (623, $68997)
- Cycle Bottoms (Lows):
(2011-11-21, $2) -> (102, $2)
(2015-08-17, $162) -> (298, $162)
(2018-12-10, $3124) -> (471, $3124)
(2022-11-21, $15473) -> (677, $15473)
These points were chosen because they marked significant turning points in Bitcoin’s price cycles.
4. Conversion to Linear Form
The values then were converted to their linear form by applying the base 10 logarithm. This transformation allowed the function to be expressed in a linear state as:
y = a * x + b
where:
- x is the logarithm of the weekly bar number, and
- y is the logarithm of the price.
This step was essential for enabling linear regression on these values. After applying the base 10 logarithm, the coordinates became:
- Cycle Peaks (Highs):
(1.903, 1.505)
(2.318, 3.093)
(2.654, 4.296)
(2.795, 4.839)
- Cycle Bottoms (Lows):
(2.009, 0.301)
(2.474, 2.210)
(2.673, 3.494)
(2.830, 4.190)
5. Linear Regression
A linear regression was then performed on these log transformed points separately for the highs and lows. The best fit lines obtained were:
- Cycle Peaks (Highs):
y = 3.711 * x – 5.541
In exponential form, this translates to:
Price = 10^(3.711 * log(x)-5.541)
- Cycle Bottoms (Lows):
y = 4.782 * x – 9.385
In exponential form, this translates to:
Price = 10^(4.782 * log(x)-9.385)
6. Visualization through Log Channel with Offsets
To provide additional context and to visually assess potential overextensions or undervaluations relative to the long term trend, channels were drawn around the regression lines by applying a percentage offset. For example, with a 20% offset:
- Upper Channel:
Upper=Regression Value * (1 + 0.2)
- Lower Channel:
Lower=Regression Value * (1 - 0.2)
These channels help illustrate how far the current price deviates from the trend line and can signal potential reversal points if the price moves significantly outside these boundaries.
7. Meaning and Application of the Model
This model was designed to analyze Bitcoin’s long term trend by:
• Assessing Market Conditions:By comparing the current Bitcoin price to the regression channels, one can gauge whether Bitcoin is trading above (potentially overextended) or below (potentially undervalued) its long term trend.
• Forecasting Reversal Points: Significant deviations from the channel boundaries may indicate that a price correction or reversal is imminent.
• Supporting Investment Decisions: The regression function, together with its channels, provides a quantitative framework for evaluating the current market state and estimating future price targets, helping to guide strategic entry or exit decisions.
Based on the derived model and current market conditions, today's analysis indicates that Bitcoin's support levels lie approximately between $24,000 and $36,000, while its resistance levels are in the range of about $134,000 to $202,000.
8. Summary
This model came together by pinpointing key turning points in Bitcoin’s price history and converting the dates into weekly bar numbers. I then applied a base 10 logarithm to both the time and price data, which transformed Bitcoin’s exponential growth into a straight-line relationship. Using linear regression on these log transformed values, I derived trend equations for the peaks and bottoms, and added channels with a set offset to highlight areas of potential support and resistance. Overall, this approach offers a clear, data-driven way to gauge Bitcoin’s long-term trend and anticipate potential market turning points.
1. 서론
비트코인은 창시 이후 상상할 수 없을 정도의 상승세를 보여주었으며, 그 폭발적인 성장률은 시간이 흐를수록 걷잡을 수 없이 가속화되었습니다. 이러한 현상은 단순한 우연이 아니라, 전 세계 투자자들과 주요 기관들의 열렬한 관심을 이끌어내며 비트코인이 주요 자산으로 자리잡게 된 배경이 되었습니다. 저는 최근에 이 비범한 상승세의 이면을 보다 깊이 이해하고자 로그 기반으로 간단한 비트코인 추세 채널링 모델을 만들어봤습니다.
2. 로그함수란?
로그함수는 어떤 숫자를, 특정 밑을 기준으로 그 크기를 지수 형태로 표현해 주는 함수입니다. 예를 들어, 100이라는 숫자는 10의 몇 제곱인지 나타내면 10^2 = 100이므로, log(100)는 2가 됩니다. 즉, 로그함수는 아주 크거나 작은 값을 다루기 쉽게 숫자 범위를 압축해 주는 역할을 합니다. 제 분석에서는 ‘주간 바 번호’라는 시간 변수와 가격 데이터에 모두 로그 변환을 적용하여, 본래 기하급수적으로 증가하는 데이터를 선형 관계로 바꿔서 보다 쉽게 이해하고 분석할 수 있도록 하였습니다. 참고로 본 분석에서는 로그 10진법을 사용하였습니다.
3. 주요 고점/저점 선택
역대 비트코인의 가격 사이클에서 중요한 변곡점들을 고점 저점 각각 4개씩 도출했습니다. 트레이딩뷰의 BTCUSD:INDEX 차트는 2009년 10월 05일부터 시작되므로, 각 날짜가 차트 상에서 몇 번째 봉에 해당하는지를 계산하였습니다. 좌표는 다음과 같습니다:
사이클 상단 (고점):
(2011-06 06-$32) -> (80, $32)
(2013-11-25, $1240) -> (208, $1240)
(2017-12-11, $19804) -> (451, $19804)
(2021-11-08, $68997) -> (623, $68997)
사이클 하단 (저점):
(2011-11-21, $2) -> (102, $2)
(2015-08-17, $162) -> (298, $162)
(2018-12-10, $3124) -> (471, $3124)
(2022-11-21, $15473) -> (677, $15473)
해당 변곡점들은 차트 분석 좀 하시는 분들은 아시겟지만, 역대 비트코인 가격 사이클에서 가장 중요한 고점과 저점들입니다.
4. 데이터 변환
이후 선택된 값들에 10진 로그를 적용하여 기하급수적으로 증가하는 데이터를 선형 관계로 전환하였습니다. 자, 우리 어렸을 때 수학시간에 다 배운 1차 방정식인데, 기억하시죠? 다음과 같이 선형적 함수로 표현될 수 있습니다:
y = a * x + b
- x: 날짜(몇 번째 주봉인지)
- y: 비트코인 로그 값
로그를 적용한 결과, 좌표는 다음과 같이 바뀌었습니다. 이제 선형 회귀 분석이 가능한 데이터 포맷이 되었네요.
사이클 상단 (고점):
(1.903, 1.505)
(2.318, 3.093)
(2.654, 4.296)
(2.795, 4.839)
사이클 하단 (저점):
(2.009, 0.301)
(2.474, 2.210)
(2.673, 3.494)
(2.830, 4.190)
5. 선형 회귀 분석
고점과 저점 데이터를 로그 스케일로 변환한 후 각각 선형 회귀 분석을 수행하여 최적화된 추세선을 도출해봤습니다. 그 결과, 아래와 같은 방정식이 나왔네요:
사이클 상단 (고점):
y = 3.711 * x – 5.541
지수 함수로 변환하면:
가격 = 10^(3.711 * log(x)-5.541)
사이클 하단 (저점):
y = 4.782 * x – 9.385
지수 함수로 변환하면:
가격 = 10^(4.782 * log(x)-9.385)
6. 로그 채널에 편차 적용
하나의 회귀선으로 모든 변곡점을 정확히 포착하는 것은 어렵기 때문에, 육안으로 확인했을 때 주요 고점과 저점들이 어느 정도 포함될 수 있도록 적절한 범위를 설정하였습니다. 이를 위해 회귀선 위아래로 일정 비율의 편차(오프셋)을 적용하여 채널을 형성하였습니다. 예를 들어, 20%의 오프셋을 적용하면 다음과 같이 계산됩니다:
사이클 상단 = 회귀 값 * (1 + 0.2)
사이클 하단 = 회귀 값 * (1 - 0.2)
이 채널을 활용하면 비트코인의 가격이 장기 추세 대비 어느 정도 위치해 있는지 한눈에 파악할 수 있습니다. 만약 가격이 채널을 크게 벗어난다면, 시장이 과열되었거나 반대로 저평가되었을 가능성이 높다고 해석할 수 있습니다.
7. 해당 모델의 시사점
- 시장 상황 평가: 현재 비트코인 가격이 본 채널과 비교했을 때 과열(고평가) 상태인지, 혹은 침체(저평가) 상태인지 어느정도 큰 그림에서 가늠해볼 수 있습니다.
- 변곡점 예측: 가격이 채널의 상단이나 하단에 도달할 경우, 일정 수준의 조정이나 방향 전환이 나타날 가능성이 높습니다.
현재 시장 상황과 모델이 도출한 결과를 바탕으로 보면, 장기적으로 비트코인의 주요 지지 구간은 약 $24,000 ~ $36,000, 저항 구간은 $134,000 ~ $202,000 수준으로 나타납니다.
8. 결론
이번 회귀 모델을 구축하면서, 비트코인의 가격 움직임이 단순한 우연이 아니라 일정한 패턴을 따르고 있음을 다시 한번 확인할 수 있었습니다. 단순히 과거 데이터를 대입해 본 것이지만, 로그 스케일과 선형 회귀를 활용하니 꽤 직관적인 추세선이 도출되었고, 이를 통해 장기적인 흐름에서 가격이 어디쯤 위치해 있는지를 객관적으로 볼 수 있었습니다.
물론, 이 채널이 절대적인 예측 도구는 아닙니다. 시장은 항상 변수가 많고, 예상치 못한 이벤트가 터질 수도 있습니다. 하지만 적어도 큰 그림에서 시장이 과열되었는지, 혹은 저평가된 구간에 들어섰는지를 판단하는 데는 유용한 프레임워크가 될 수 있다고 생각합니다.
선형 차트로 보면, 시간이 갈수록 채널이 시사하는 지지/저항 구간의 범위가 넓어집니다. 따라서 미래로 갈수록 예측이 더욱 어려워지는 것이 이 시장의 본질일지도 모릅니다. 결국, 시장이 어느 방향으로든 극단적인 움직임을 보일 가능성은 점점 커지며, 이런 불확실성을 감안한 대응 전략이 더욱 중요하고 생각합니다.
HMA 15M and 4HR Overlay Notes:
HMA Calculation: We calculate three HMAs for the 15-minute timeframe (ma1, ma2, ma3) based on the settings from your original script, but only ma3 is plotted to keep it consistent with your initial setup.
4-hour HMA: An additional HMA is calculated for the 4-hour timeframe (hma4h) using the hma3 period since it was the longest in your original setup, which might be suitable for a 4-hour chart comparison.
Plotting: Both the 15-minute ma3 and 4-hour hma4h HMAs are plotted with distinct colors for easy visual differentiation.
Timeframe Security: request.security() is used to fetch data from different timeframes. Remember, using request.security() with historical data can sometimes lead to misalignments or delayed data, especially during live trading.
This script will overlay the 15-minute HMA (using the ma3 from your settings) with a new 4-hour HMA on any chart timeframe you apply it to. Remember, if you're looking at a chart timeframe that's not 15 minutes or 4 hours, the HMAs might appear less smooth or aligned due to how Pine Script handles different timeframes.
HMA Scalping Strategy with Heiken AshiNotes:
Heiken Ashi Calculation: The script now computes Heiken Ashi candles using the standard formula. These candles are used for both plotting and generating signals, which can smooth out price action, potentially reducing noise in short-term scalping.
HMA Calculation with HA Close: Instead of using the raw close price, we now use haClose for calculating the Hull Moving Averages. This aligns the HMA with the smoothed price action of Heiken Ashi candles.
Signal Generation:
Sell Signal: Generated when ma3 crosses above ma2 based on Heiken Ashi close prices.
Buy Signal: Triggered when ma3 crosses below ma2 or if there's a small loss cut based on the Heiken Ashi close price.
Entry and Exit Prices: The entryPrice is now based on haClose to keep consistency with the Heiken Ashi framework.
Visuals: Heiken Ashi candles are plotted on the chart, providing a smoother price action view which might help in spotting trends or reversals more clearly in a scalping context.
Using Heiken Ashi candles can lead to different trade signals compared to traditional candles because they alter how price data is presented. This might result in fewer, but potentially more reliable, signals due to the smoothing effect. However, remember that this also means you might miss some very short-lived price movements that regular candlesticks would capture. Backtesting with this adjustment is crucial to understand how it changes the strategy's performance.
HMA 4H and 15M overlay Notes:
HMA Calculation: We calculate three HMAs for the 15-minute timeframe (ma1, ma2, ma3) based on the settings from your original script, but only ma3 is plotted to keep it consistent with your initial setup.
4-hour HMA: An additional HMA is calculated for the 4-hour timeframe (hma4h) using the hma3 period since it was the longest in your original setup, which might be suitable for a 4-hour chart comparison.
Plotting: Both the 15-minute ma3 and 4-hour hma4h HMAs are plotted with distinct colors for easy visual differentiation.
Timeframe Security: request.security() is used to fetch data from different timeframes. Remember, using request.security() with historical data can sometimes lead to misalignments or delayed data, especially during live trading.
This script will overlay the 15-minute HMA (using the ma3 from your settings) with a new 4-hour HMA on any chart timeframe you apply it to. Remember, if you're looking at a chart timeframe that's not 15 minutes or 4 hours, the HMAs might appear less smooth or aligned due to how Pine Script handles different timeframes.
16 LONDON - By TYMEFX detects and labels market structure points based on swing highs and lows. It identifies, marks these levels on the chart with color-coded labels and highlights BOS/CHoCH events. It helps traders analyze market trends and anticipate potential reversals.
EMA/MA i Year Open Price (4h/1D/1W)This script calculates and plots various Exponential Moving Averages (EMAs) and Simple Moving Averages (MAs) for different timeframes on a TradingView chart. It also calculates the MACD (Moving Average Convergence Divergence) and highlights significant crossovers as buy or sell signals. Additionally, the script marks the first opening price of the year and differentiates between periods when the closing price is above or below certain moving averages.
JMA Quantum Edge: Adaptive Precision Trading System JMA Quantum Edge: Adaptive Precision Trading System - Enhanced Visuals & Risk Management
Get ready to experience a groundbreaking trading strategy that adapts in real-time to market conditions! This powerful, open-source script combines advanced technical analysis with state-of-the-art risk management tools, designed to give you the edge you need in today's dynamic markets.
What It Does:
Adaptive JMA Indicator:
Utilizes a custom Jurik Moving Average (JMA) that adjusts its sensitivity based on market volatility, ensuring you get precise signals even in the most fluctuating environments.
Dynamic Risk Management:
Features built-in support for partial exits (scaling out) to secure profits, along with an optional Kelly Criterion-based position sizing that tailors your exposure based on historical performance metrics.
Robust Error Handling:
Incorporates market condition filters—like minimum volume and maximum allowed gap percentage—to ensure trades are only executed under favorable conditions.
Vivid Visual Enhancements:
Enjoy an animated background that reflects market momentum, dynamic pivot markers, and clearly drawn trend channels. Plus, interactive tables provide real-time performance analytics and detailed error metrics.
Fully Customizable:
With a comprehensive set of inputs, you can easily tailor the strategy to your personal trading style and market preferences. Adjust everything from JMA parameters to refresh intervals for tables and labels!
How to Use It:
Add the Script:
Copy and paste the script into the Pine Script Editor on TradingView and click “Add to Chart.”
Configure Your Settings:
Customize your risk management (capital, commission, position sizing, partial exits, etc.) and tweak the JMA settings to match your preferred trading style. Use the extensive input panel to adjust visuals, alerts, and more.
Backtest & Optimize:
Run the strategy in the Strategy Tester to analyze its historical performance. Monitor real-time analytics and error metrics via the interactive tables, and fine-tune your parameters for optimal performance.
Go Live with Confidence:
Once you're satisfied with the backtest results, use the generated signals for live trading, and let the system help you stay ahead in fast-paced markets!
How to use the imputs:
This cutting-edge strategy is designed to adapt to changing market conditions and offers you complete control over your trading parameters. Here’s a breakdown of what each group of inputs does and how you should use them:
Risk Management & Trade Settings
Recalculate on Every Tick:
What it does: When enabled, the strategy recalculates on every price update.
Recommendation: Leave it true for fast charts.
Initial Capital:
What it does: Sets your starting capital for backtesting, which influences position sizing and performance metrics.
Recommendation: Start with $10,000 (or adjust according to your trading capital).
Commission (%):
What it does: Simulates the cost per trade.
Recommendation: Use a realistic rate (e.g., 0.04%).
Position Size & Quantity Type:
What they do: Define how large each trade will be. Choose between a fixed unit amount or a percentage of equity.
Recommendation: For beginners, the default fixed value is a good start. Experiment later with percentage-based sizing if needed.
Order Comment:
What it does: Adds a label to your orders for easier tracking.
Allow Reverse Orders:
What it does: If disabled, the strategy will close opposing positions before entering a new trade, reducing conflicts.
Enable Dynamic Position Sizing:
What it does: Adjusts trade size based on current volatility.
Recommendation: Beginners may start with this disabled until they understand basic sizing.
Partial Exit Inputs:
What they do:
Enable Partial Exits: When turned on, you can scale out of your position to lock in profits.
Partial Exit Profit (%): The profit percentage that triggers a partial exit.
Partial Exit Percentage: The percentage of your current position to exit. Recommendation: Use defaults (e.g., 5% profit, 50% exit) to secure profits gradually.
Kelly Criterion Option:
What it does: When enabled, adjusts your position sizing using historical performance (win rate and profit factor).
Recommendation: Beginners might leave this disabled until comfortable with backtest performance metrics.
Market Condition Filters:
What they do:
Minimum Volume: Ensures trades occur only when there’s sufficient market activity.
Maximum Gap (%): Prevents trading if there’s an unusually large gap between the previous close and current open. Recommendation: Defaults work well for most markets. If trades seem erratic, consider tightening these limits.
JMA Settings
Price Source:
What it does: The input series for the JMA calculation, typically set to the closing price.
JMA Length:
What it does: Controls the smoothing period of the JMA. Lower values are more sensitive; higher values smooth out the noise. Recommendation: Start with 21.
JMA Phase & Power:
What they do: Adjust how responsive the JMA is. Phase controls timing; power adjusts the intensity. Recommendation: Default settings (63 phase and 3 power) are a balanced starting point.
Visual Settings & Style
Show JMA Line, Pivot Lines, and Pivot Labels:
What they do: Toggle visual elements on your chart for easier signal identification.
Pivot History Count:
What it does: Limits how many historical pivot markers are displayed.
Color Settings (Up/Down Neon Colors):
What they do: Set the visual cues for buy and sell signals.
Pivot Marker & Line Style:
What they do: Choose the style and thickness of your pivot markers and lines.
Show Stats Panel:
What it does: Displays real-time performance and error metrics.
Dynamic Background & Visual Enhancements
Animate Background:
What it does: Changes the background color based on market momentum.
Show Trend Channels & Volume Zones:
What they do: Draw trend channels and highlight areas of high volatility/volume.
Show Data-Rich Labels:
What it does: Displays key metrics like volume, error percentage, and momentum on the chart.
High Volatility Threshold:
What it does: Determines the multiplier for when the chart background should change due to high volatility.
Multi-Timeframe Settings
Higher Timeframe:
What it does: Uses a higher timeframe’s JMA for trend confirmation. Recommendation: Use Daily ('D') or Weekly ('W') for broader trend analysis.
Show HTF Trend Zone & Opacity:
What they do: Display a visual zone from the higher timeframe to help confirm trends.
6. Trailing Stop Settings
Trailing Stop ATR Factor & Offset Multiplier:
What they do: Calculate trailing stops based on the Average True Range (ATR), adjusting stop distances dynamically. Recommendation: Default settings are a good balance but can be fine-tuned based on asset volatility.
Alerts & Notifications
Alerts on Pivot Formation & JMA Crossover:
What they do: Notify you when key events occur.
Dynamic Power Threshold:
What it does: Sets the sensitivity for dynamic alerts.
8. Static Stop Loss / Take Profit
Static Stop Loss (%) & Take Profit (%):
What they do: Allow you to set fixed stop loss or take profit levels. Recommendation: Leave them at 0 to disable if you prefer dynamic risk management, or set them if you have strict risk/reward preferences.
Advanced Settings
ATR Length:
What it does: Determines the period for ATR calculation, impacting trailing stop sensitivity. Recommendation: Start with 14.
Optimization Feedback & Enhanced Error Analysis
Error Metric Length & Error Threshold (%):
What they do: Calculate error metrics (like average error, skewness, and kurtosis) to help you fine-tune the JMA. Recommendation: Use the defaults and adjust if the error metrics seem off during backtesting.
UI - User-Driven Tweaking & Table Customization
Parameter Tweaker Panel, Debug/Performance Table Settings:
What they do: Provide interactive tables that display real-time performance, error metrics, and allow you to monitor strategy parameters.
Refresh Frequency Options (Table & Label Refresh Intervals):
What they do: Set how often the tables and labels update.
Recommendation: Start with an interval of 1 bar; increase it if your chart is too busy.
Important for Beginners:
Default Settings:
All default values have been chosen for balanced performance across different markets. If you ever experience unexpected behavior, start by resetting the inputs to their defaults.
Step-by-Step Adjustments:
Experiment by changing one setting at a time while observing how the strategy’s signals and performance metrics change. This will help you understand the impact of each parameter.
Resetting to Defaults:
If things seem off or you’re not getting the expected results, you can always reset the indicator. Either reload the script or use the “Reset Inputs” option (if available) to revert to the default settings.
Jump in, experiment, and enjoy the power of adaptive precision trading. This strategy is built to grow with your skills—have fun exploring and refining your trading edge!
Happy trading!