Leap Ahead with a Regression Breakout on Crude OilThe Leap Trading Competition: Your Chance to Shine
TradingView’s “The Leap” Trading Competition presents a unique opportunity for traders to put their futures trading skills to the test. This competition allows participants to trade select CME Group futures contracts, including Crude Oil (CL) and Micro Crude Oil (MCL), giving traders access to one of the most actively traded commodities in the world.
Register and compete in "The Leap" here: TradingView Competition Registration .
This article breaks down a structured trade idea using linear regression breakouts, Fibonacci retracements, and UnFilled Orders (UFOs) to identify a long setup in Crude Oil Futures. Hopefully, this structured approach aligns with the competition’s requirements and gives traders a strong trade plan to consider. Best of luck to all participants.
Spotting the Opportunity: A Regression Breakout in CL Futures
Trend reversals often present strong trading opportunities. One way to detect these shifts is by analyzing linear regression channels—a statistical tool that identifies the general price trend over a set period.
In this case, a 4-hour CL chart shows that price has violated the upper boundary of a downward-sloping regression channel, suggesting the potential start of an uptrend. When such a breakout aligns with key Fibonacci retracement levels and existing UnFilled Orders (UFOs), traders may gain a potential extra edge in executing a structured trade plan.
The Trade Setup: Combining Fibonacci and a Regression Channel
This trade plan incorporates multiple factors to define an entry, stop loss, and target:
o Entry Zone:
An entry or pullback to the 50%-61.8% Fibonacci retracement area, between 74.60 and 73.14, provides a reasonable long entry.
o Stop Loss:
Placed below 73.14 to ensure a minimum 3:1 reward-to-risk ratio.
o Profit-Taking Strategy:
First target at 76.05 (38.2% Fibonacci level)
Second target at 77.86 (23.6% Fibonacci level)
Final target at 78.71, aligning with a key UFO resistance level
This approach locks in profits along the way while allowing traders to capitalize on an extended move toward the final resistance zone.
Contract Specifications and Margin Considerations
Understanding contract specifications and margin requirements is essential when trading futures. Below are the key details for CL and MCL:
o Crude Oil Futures (CL) Contract Details
Full contract specs: CL Contract Specifications – CME Group
Tick size: 0.01 per barrel ($10 per tick)
Margin requirements vary based on market conditions and broker requirements. Currently set around $5,800.
o Micro WTI Crude Oil Futures (MCL) Contract Details
Full contract specs: MCL Contract Specifications – CME Group
Tick size: 0.01 per barrel ($1 per tick)
Lower margin requirements for more flexible risk control. Currently set around $580.
Choosing between CL and MCL depends on risk tolerance and account size. MCL provides more flexibility for smaller accounts, while CL offers higher liquidity and contract value.
Execution and Market Conditions
To maximize trade efficiency, conservative traders could wait for a proper price action into the entry zone and confirm the setup using momentum indicators and/or volume trends.
Key Considerations Before Entering
Ensure price reaches the 50%-61.8% Fibonacci retracement zone before executing the trade
Look for confirmation signals such as increased volume, candlestick formations, or additional support zones
Be patient—forcing a trade without confirmation increases risk exposure
Final Thoughts
This Crude Oil Futures trade setup integrates multiple confluences—a regression breakout, Fibonacci retracements, and UFO resistance—to create a structured trade plan with defined risk management.
For traders participating in The Leap Trading Competition, this approach emphasizes disciplined execution, dynamic risk management, and a structured scaling-out strategy, all essential components for long-term success.
When charting futures, the data provided could be delayed. Traders working with the ticker symbols discussed in this idea may prefer to use CME Group real-time data plan on TradingView: www.tradingview.com - This consideration is particularly important for shorter-term traders, whereas it may be less critical for those focused on longer-term trading strategies.
General Disclaimer:
The trade ideas presented herein are solely for illustrative purposes forming a part of a case study intended to demonstrate key principles in risk management within the context of the specific market scenarios discussed. These ideas are not to be interpreted as investment recommendations or financial advice. They do not endorse or promote any specific trading strategies, financial products, or services. The information provided is based on data believed to be reliable; however, its accuracy or completeness cannot be guaranteed. Trading in financial markets involves risks, including the potential loss of principal. Each individual should conduct their own research and consult with professional financial advisors before making any investment decisions. The author or publisher of this content bears no responsibility for any actions taken based on the information provided or for any resultant financial or other losses.
Regression
Harmonic Pattern with Multiple Confluence for Point X and DThis is an example of regression channel with harmonic pattern.
By using Simple OHLC Custom Range Interactive, we able make confluence point (blue) to get Point X of Bullish Butterfly.
There are many confluence points (orange flag and teal table), which shows Point D of Butterfly starting to complete.
For Point D, best to monitor price changes using RSI or other similar RSI (Cyclic RSI, etc).
Indicator used :
1. Regression Channel Alternative MTF
2. HH-LL ZZ
3. XABCD Harmonic Pattern Custom Range Interactive
4. Simple OHLC Custom Range Interactive
5. Cyclic RSI High Low With Noise Filter
Channel Up and M Pattern (Bullish Bat)This is an example of Channel Up and M Pattern (Bullish Bat).
Found that M Pattern (Bullish Bat) within Channel Up.
Pattern already touches PRZ (orange) and completed TP1 and TP2 (lime).
Indicator used :
1. Regression Channel Alternative MTF
2. HH-LL ZZ
3. XABCD Harmonic Pattern Custom Range Interactive
Ripple (XRP) Model PriceAn article titled Bitcoin Stock-to-Flow Model was published in March 2019 by "PlanB" with mathematical model used to calculate Bitcoin model price during the time. We know that Ripple has a strong correlation with Bitcoin. But does this correlation have a definite rule?
In this study, we examine the relationship between bitcoin's stock-to-flow ratio and the ripple(XRP) price.
The Halving and the stock-to-flow ratio
Stock-to-flow is defined as a relationship between production and current stock that is out there.
SF = stock / flow
The term "halving" as it relates to Bitcoin has to do with how many Bitcoin tokens are found in a newly created block. Back in 2009, when Bitcoin launched, each block contained 50 BTC, but this amount was set to be reduced by 50% every 210,000 blocks (about 4 years). Today, there have been three halving events, and a block now only contains 6.25 BTC. When the next halving occurs, a block will only contain 3.125 BTC. Halving events will continue until the reward for minors reaches 0 BTC.
With each halving, the stock-to-flow ratio increased and Bitcoin experienced a huge bull market that absolutely crushed its previous all-time high. But what exactly does this affect the price of Ripple?
Price Model
I have used Bitcoin's stock-to-flow ratio and Ripple's price data from April 1, 2014 to November 3, 2021 (Daily Close-Price) as the statistical population.
Then I used linear regression to determine the relationship between the natural logarithm of the Ripple price and the natural logarithm of the Bitcoin's stock-to-flow (BSF).
You can see the results in the image below:
Basic Equation : ln(Model Price) = 3.2977 * ln(BSF) - 12.13
The high R-Squared value (R2 = 0.83) indicates a large positive linear association.
Then I "winsorized" the statistical data to limit extreme values to reduce the effect of possibly spurious outliers (This process affected less than 4.5% of the total price data).
ln(Model Price) = 3.3297 * ln(BSF) - 12.214
If we raise the both sides of the equation to the power of e, we will have:
============================================
Final Equation:
■ Model Price = Exp(- 12.214) * BSF ^ 3.3297
Where BSF is Bitcoin's stock-to-flow
============================================
If we put current Bitcoin's stock-to-flow value (54.2) into this equation we get value of 2.95USD. This is the price which is indicated by the model.
There is a power law relationship between the market price and Bitcoin's stock-to-flow (BSF). Power laws are interesting because they reveal an underlying regularity in the properties of seemingly random complex systems.
I plotted XRP model price (black) over time on the chart.
Estimating the range of price movements
I also used several bands to estimate the range of price movements and used the residual standard deviation to determine the equation for those bands.
Residual STDEV = 0.82188
ln(First-Upper-Band) = 3.3297 * ln(BSF) - 12.214 + Residual STDEV =>
ln(First-Upper-Band) = 3.3297 * ln(BSF) – 11.392 =>
■ First-Upper-Band = Exp(-11.392) * BSF ^ 3.3297
In the same way:
■ First-Lower-Band = Exp(-13.036) * BSF ^ 3.3297
I also used twice the residual standard deviation to define two extra bands:
■ Second-Upper-Band = Exp(-10.570) * BSF ^ 3.3297
■ Second-Lower-Band = Exp(-13.858) * BSF ^ 3.3297
These bands can be used to determine overbought and oversold levels.
Estimating of the future price movements
Because we know that every four years the stock-to-flow ratio, or current circulation relative to new supply, doubles, this metric can be plotted into the future.
At the time of the next halving event, Bitcoins will be produced at a rate of 450 BTC / day. There will be around 19,900,000 coins in circulation by August 2025
It is estimated that during first year of Bitcoin (2009) Satoshi Nakamoto (Bitcoin creator) mined around 1 million Bitcoins and did not move them until today. It can be debated if those coins might be lost or Satoshi is just waiting still to sell them but the fact is that they are not moving at all ever since. We simply decrease stock amount for 1 million BTC so stock to flow value would be:
BSF = (19,900,000 – 1.000.000) / (450 * 365) =115.07
Thus, Bitcoin's stock-to-flow will increase to around 115 until AUG 2025. If we put this number in the equation:
Model Price = Exp(- 12.214) * 114 ^ 3.3297 = 36.06$
Ripple has a fixed supply rate. In AUG 2025, the total number of coins in circulation will be about 56,000,000,000. According to the equation, Ripple's market cap will reach $2 trillion.
Note that these studies have been conducted only to better understand price movements and are not a financial advice.
Related indicator:
Regressive VWAP Breakout StrategyStrategy type: Breakout
Ingredients: Price, Volume, Regression
Prerequisite add-ons (free): Regressive VWAP and Strategy Visualizer
Target market: CME:BTC1! or BITSTAMP:BTCUSD
- Long Entry on Close crossing over Regressive VWAP
- Short Entry on Close crossing under Regressive VWAP
- Optional: exit when price retraces to upper band (LX) or lower band (SX)
The key to this breakout strategy is the Regressive VWAP, which weighs Price and Volume with Regression Analysis, making the slope and its bands more responsive, with a degree of mean reversion.
Below is another example, this time CME_MINI:ES1! .
Regressive VWAP Band Buffer Strategy on GC 10RRequired add-on (free): NEXT Regressive VWAP
Target market: COMEX:GC1! 10R chart
Strategy Overview:
- Long when price crosses upper band (green)
- Short when price crosses lower band (red)
- Do not initiate trades in the buffer zone (between the bands) - that is our filter
Setting Alerts:
Here is how to set price (close) crossing band alerts: open a chart, attach NEXT Regressive VWAP, and right-click on chart -> Add Alert. Condition: Symbol, e.g. ES (representing the close) >> Crossing >> Regressive VWAP >> Upper ( or Lower) Band >> Once Per Bar Close.
Using Linear Regression ChannelsLinear Regression Channels are a great way to identify potential key levels of future price action by graphing the normal distribution of a trend.
When using the Regression Trend tool (located in the drawing panel under the “Trend Line Tools” group) two points on a trend are chosen, generally at the beginning of the trend and the end of the trend.
When the two points on the chart are chosen, the normal distribution of the dataset is calculated between the two chosen points and displayed in the form of a linear regression channel.
The center line in this channel is the Linear Regression Line or Mean, and the upper and lower lines are the Upper and Lower standard deviations from the mean as set in the tool’s settings (default settings are +2 and -2 standard deviations from the mean).
The correlation of this linear relationship is displayed as Pearson’s correlation coefficient , or Pearson’s R. This can be displayed or hidden on the chart by selecting it within the tools style menu.
Pearson’s R shows the strength of the correlation as well as its direction, with values moving between -1 and 1. As Pearson’s R moves further away from zero, the strength of the linear relationship between price and time increases. When using the Regression Trend tool, Pearson’s R will always be set as an absolute value (positive), but the direction of the trend can be visually identified.
Mean reversion
When a regression trend has a high correlation, this is due to the consistency of price action laying along the mean (center line), with fewer points moving above and below the mean line to the upper and lower standard deviation levels.
One way to trade using a linear regression channel is to trade the price action as it moves away from, and back to the mean.
As this tool is used, it is important to note that a channel graphed containing more bars and having a high correlation is more likely to have price continue in that trend than one that is graphed with only a few bars and having a high correlation.
The length of the trend should be considered when trading these channels.
With the Regression Trend tool, you can start utilizing statistical analysis in your trading strategy with only the click of a few buttons!
Learn to Read Charts (Regression & BTC)✅ What is Regression?
Regression is a statistical method used in finance, investing, and other disciplines that attempts to determine the strength and character of the relationship between one dependent variable (usually denoted by Y) and a series of other variables (known as independent variables).
The general form of each type of regression is:
Simple linear regression: Y = a + bX + u
Multiple linear regression: Y = a + b1X1 + b2X2 + b3X3 + ... + btXt + u
✅ We can use linear regression in both Bullish and Bearish markets. All you need is the center and you can easily find the tunnel (channel) for forecasting. Also, you shouldn't let the noises distract you because they might make you misread your highs and lows.
In other words: The tunnel (channel) of your linear regression works as dynamic support and resistance.
✅ TradingView lets you use the Regression Trend for fast and easy forecasting. You can find it in the toolbar beside your chart.
Volume Regression Trick (feat. Serbian Užičko Kolo dance music)Okay, this is a simple trick with the built-in Linear Regression indicator. I have used two instances of the indicator, but with different sources. The first one uses price of an instrument and the second one uses volume of an instrument. Yes, it is possible to use non-standard source because the indicator has a special input for that.
As result you get a simple tool for trend analysis and its common cases like trend exhaustion or confirmation.
Good luck and stay cheeki breeki!
USDJPY Longer-Term View with Regression Trend ToolI have added in another regression trend channel going back to the late 2016 high. That longer-term channel shows the potential upside target for a breakout above the medium-term channel if that were to occur.
At this particular juncture, the medium and short-term channels are the ones in play, with a potential or bounce or break of the short-term channel on the radar right now.
This is a follow-up post. See related ideas for the original.
Use the tool if you like it, discard if it doesn't help you.
Using the Regression Trend Tool to Analyze USDJPYCurrency charts (or any chart) can look rather chaotic sometimes.
Grabbing a regression trend tool may help. You select the tool and the pick the two points...usually a major high and low.
The regression tool then finds the line of best fit through the data. You can also add standard deviations above and below the regression line, resulting in a channel.
The result will be slightly different than a drawn channel because it is essentially highlighting the average price action between two points in time.
I have used the tool twice on the USDJPY chart. The larger one shows the price is near the top of a larger channel. The smaller shows the price is near the bottom of a short-term channel.
This helps highlight some potential trading opportunities. If the price consolidates here and moves higher (would use 4-hour chart), it is a buy trade into the top of the small and larger channels. But if that occurs, once the price reaches the upper channel, watch for a potential short (or break to the upside).
Alternatively, if we head lower from here, that will break the short-term rising channel, and indicate a pretty big downward move based on the larger channel.
You could freehand draw these channels as well, but sometimes a crazy one day move will obscure a pattern that the regression highlights. For example, the regression filters out that one day drop on Jan 2 2019....without the regression (or without ignoring that long candle wick) it is hard to see the channel.
You could also go back further in time and add in additional regression channels to provide a larger insight into where the currency pair is within its cycle.
Want more like this? Discuss trades in my free swing trading Facebook group: www.facebook.com
Approximating A Least Square Moving Average In PineLeast Squares Moving Average, Running Least Squares, Regression Line or even Running Line, this method is among the most popular ones in statistics and technical analysis.
The LSMA is extremely useful, it approximate the price pretty well and can be considered as one of the best low-lagging filters out there. Knowing how this filter is made can be really interesting. May the methods i share below inspire you to create great indicators or start coding in pine :)
A Least Squares Moving Average is defined by Tradingview as :
A line that best fits the prices specified over a user-defined time period. It is calculated using the least squares method. The result of this function is calculated using the formula: linreg = intercept + slope * (length - 1 - offset), where length is the y argument, offset is the z argument, intercept and slope are the values calculated with the least squares method on source series (x argument).
Alright, we wont use the offset parameter for our approximations, so how to calculate a least squares moving average ? If you find the mathematical formula of it you will certainly ask yourself "what are all of those maths" . But its ok, in the Pinescript you can just use the linreg() function, or you could calculate it like that :
slope = correlation(close,n,length) * (stdev(close,length)/stdev(n,length))
intercept = sma(close,length) - slope*sma(n,length)
linreg = slope*n + intercept
Ok, but can we use different estimation methods ? Certainly, the key of the LSMA is only the correlation coefficient after all, all the other parameters can be estimated.
Standard Score Or Rescaling A Line To The Price
Rescaling a line to the price is easy to do, it will give a similar result as the LSMA but it is faster to write, here the code :
A = (n - sma(n,length))/stdev(n,length) * correlation(close,n,length)
B = sma(close,length) + A*stdev(close,length)
Easier no ? We first standardized a line (n) and multiplied it by its correlation with the price, our first parameter A is dimensionless .
Then we rescaled the result to the price by multiplying our parameter with the price standard deviation and summing this result to the price moving average.
here the difference between our method and the classic LSMA of both period 100
If you put both together you wont see any difference. Overshoots can be reduced by modifying the standard deviation size.
Correlation Rescaling
The correlation coefficient is the core of a LSMA, if we rescale it we can approximate a LSMA, here the code :
a = (correlation(close,n,length) + 1)/2
b = sma(close,length) + stdev(close,length)*1.7
c = sma(close,length) - stdev(close,length)*1.7
k = c + a*(b-c)
The correlation coefficient oscillate in a range of 1/-1, we first scale it in a range of 1/0. Then you may have recognized the b and c formulas, they are the one used in bollinger bands,
the standard deviation is multiplied by 1.7 because it was the number who best approximated a LSMA, but it could be any number defined by the user, something interesting is that this method to can fix overshoots in a classic LSMA using lower multiplier. Since our correlation is in a range of 1/0 we can rescale it to the price thanks to the method used in k.
In red our method, in blue the LSMA of both period 100.
Here the standard deviation is not multiplied by a number, this result in less overshoot.
In order to have even more manipulation over the LSMA i will try to estimate the correlation coefficient the best i can :)
So here you go, i hope you will find a use for it.