NQ Power Range Report with FIB Ext - 5/23/2023 SessionCME_MINI:NQM2023
- PR High: 13922.00
- PR Low: 13911.25
- NZ Spread: 24.25
Building Permits at 08:00 AM EST.
Not much change for Monday's session. Maintained a range.
Today's session opened up and holding highs of prev 2 sessions.
- Significant decrease in NZ spread.
- Strong break above PR+1 early.
- Holding supply above 13950.
Evening Stats (As of 12:05 AM)
- Weekend Gap: -0.26% (filled)
- Session Open ATR: 180.07
- Volume: 27K
- Open Int: 273K
- Trend Grade: Neutral
- From ATH: -16.9% (Rounded)
Key Levels (Rounded - Think of these as ranges)
- Long: 14103
- Mid: 13531
- Short: 12959
Keep in mind this is not speculation or a prediction. Only a report of the Power Range with Fib extensions for target hunting. Do your DD! You determine your risk tolerance. You are fully capable of making your own decisions.
Volatility
AMZN - a short short is coming?In recent times, the stock price has been increasing exponentially, but it appears that the RSI level of 70 (purple line) has halted the upward momentum. If the uncertain market sentiment continues, the stock may weaken towards the lower Bollinger Band (orange line) and the 50-day moving average (gray line), reaching approximately 107-108 (green circle).
It is important to note that during this period, the 200-day moving average around 104 (turquoise line) and later the lower RSI level, in the case of a steady decline, at approximately 100, could provide support for the stock price.
However, everything can be overridden by the debt ceiling agreement and the FOMC meeting, of course.
NQ Power Range Report with FIB Ext - 5/22/2023 SessionCME_MINI:NQM2023
- PR High: 13842.50
- PR Low: 13794.25
- NZ Spread: 107.75
Wide NZ spread.
Likely prep for PMI on Tuesday during RTH.
Relatively high volume for April-May.
Evening Stats (As of 12:25 AM)
- Weekend Gap: -0.26% (filled)
- Session Open ATR: 183.86
- Volume: 23K
- Open Int: 269K
- Trend Grade: Neutral
- From ATH: -17.3% (Rounded)
Key Levels (Rounded - Think of these as ranges)
- Long: 14103
- Mid: 13531
- Short: 12959
Keep in mind this is not speculation or a prediction. Only a report of the Power Range with Fib extensions for target hunting. Do your DD! You determine your risk tolerance. You are fully capable of making your own decisions.
BUD - Hail the King of BeerHere on a daily chart, I have plotted the ratio of the dynamic share price of BUD compared
with TAP. The thesis is that TAP ( Coors / Molson) may have had a share price rise while
BUD dropped its own as a reaction to its adverse ad campaign which resulted in a social media
disaster. BUD is global with only 25% of its market in North America while TAP is more like
North America predominantly. The ad campaign and social media backlash is only North
America over time is impact will be nil.
The thesis is that BUD will recover and that astute contrarian investors and traders can profit
from the dynamic which in the greater and longer picture has been a dip for BUD representing
a buying opportunity. As can be seen on the chart, the DUD/TAP ratio is at the bottom and
outside of the boundary of the lower Bollinger Bands and now reentering the bands.
The ratio is also in the demand/support zone where it was last October. The action
of the ratio was a double top "M" pattern which has now played out . Finally, the AI predictive
algo of Luxalgo predicts a ratio rise between now and the end of the month as the ratio
heads to the midline of the Bollinger Bands. Overall, the analysis is that either BUD will rise
or TAP will drop or some combination. Overall, I conclude that BUD could easily rise from
this dip over the next ten calendar days. I will take a position in call options with 30- 45 DTE.
📊 Volume Profile: IndicatorsThere’s a reason why trading volume has been a standard indicator on every piece of charting software over the last 30 years… it provides a crucial edge.
Volume provides you with logical insight into the activity of market participants at varying price levels. Volume analysis helps traders to become more reactionary to price movements rather than trying to predict where price will go next, as is the case with most technical indicators.
📍Key takeaways about volume
Key takeaways about the normal volume indicator plotted on the X-axis in trading:
🔹Volume Indicator: The normal volume indicator measures the total number of shares or contracts traded during a given time period. It is commonly displayed as a histogram or line chart, with the X-axis representing time.
🔹Liquidity: Volume is a crucial metric as it provides insights into the liquidity of a security. Higher volume generally indicates greater market participation and liquidity, making it easier to buy or sell the asset without significantly impacting its price.
🔹Confirmation: Volume can confirm the validity of price movements. In an uptrend, increasing volume supports the bullish move, suggesting strength and conviction among buyers. Conversely, declining volume during an uptrend may signal weakness or lack of interest. The same principles apply to downtrends.
🔹 Breakouts and Reversals: Volume analysis is often used to identify breakouts and potential trend reversals. A significant increase in volume during a breakout suggests a higher probability of a sustained move, while decreasing volume near a support or resistance level might indicate a potential reversal.
🔹Divergence: Volume can reveal divergence between price and market sentiment. For example, if prices are rising but volume is decreasing, it could suggest that the rally is losing steam and a reversal may be imminent. Similarly, increasing volume during a price decline might indicate selling pressure and further downside potential.
🔹Confirmation of Patterns: Volume can provide confirmation or invalidation of chart patterns such as triangles, head and shoulders, or double tops/bottoms. Higher volume during pattern formations enhances their reliability, while low volume can cast doubt on the pattern's significance.
🔹Watch for Extreme Volume: Abnormal spikes in volume can indicate significant market events, such as earnings releases, news announcements, or institutional buying/selling. Unusual volume can lead to increased volatility and potentially offer trading opportunities.
🔹Relative Volume: Comparing current volume to historical average volume helps gauge the significance of the current trading activity. Higher volume relative to the average may imply increased interest, while lower volume might suggest a lack of conviction or reduced market participation.
👤 @AlgoBuddy
📅 Daily Ideas about market update, psychology & indicators
❤️ If you appreciate our work, please like, comment and follow ❤️
PSNY Polestar EV Startup Can it Rise from Bottom?PSNY ( Polestar) has dropped to its lows after an earnings report which shown it still has no
cash flow but at least the losses are less than projected by the analysts. On the chart zoomed
out, price is in megaphone pattern which demonstrates increasing volatility. Price is at the
bottom support trendline and one standard deviation below the anchored VWAP. This suggests
15% upside in the immediate short term. Price action is starting to resemble that of Fisker
(FSR) . I see this as a risky swing long trade as price tries to rise to the VWAP and POC line
of the volume profile. ( PSNY is in better shape than NKLA and RIDE but not by a whole lot )
I would be very reluctant to make an investment in Polestar but happy to play the volatility
for profit.
NQ Power Range Report with FIB Ext - 5/19/2023 SessionCME_MINI:NQM2023
- PR High: 13960.50
- PR Low: 13899.25
- NZ Spread: 136.75
Broke key level 13737, strong supply zone from Aug 22, now inventory
Strong volatility jump (see NZ spread above)
Powell Speaking at 11:00 EST
Evening Stats (As of 12:55 AM)
- Weekend Gap: N/A
- Session Open ATR: 185.45
- Volume: 35K
- Open Int: 278K
- Trend Grade: Neutral
- From ATH: -17.0% (Rounded)
Key Levels (Rounded - Think of these as ranges)
- Long: 14103
- Mid: 13531
- Short: 12959
Keep in mind this is not speculation or a prediction. Only a report of the Power Range with Fib extensions for target hunting. Do your DD! You determine your risk tolerance. You are fully capable of making your own decisions.
Can RNDR Break Through Resistance?RNDR/USDT - Daily Timeframe
RNDR is an interesting asset, a lot of hype around this token.
Price is struggling to overtake current resistance between $2.20 and $2.50.
Price is currently right at resistance right now with a potential Swing-Failure Setup.
We are above the Base Line , and we did just have a nice push with momentum OFF of the Daily Base Line to bring us back up to resistance but I'm not sure about this one.
A Daily Breakout above $2.50 would be nice to see, would definitely chase the momentum. Otherwise - this looks like a side line for me at the moment.
Are Russell 2000 Futures Breaking a Downtrend?Small caps have lagged bigger indexes like the S&P 500 and Nasdaq-100 so far this year. But now, there could be signs of a turn.
The first pattern on today’s chart of the E-Mini Russell 2000 futures is the falling trendline along the highs of February, March and April. RTY1! has squeezed through that resistance in the last two weeks, which may suggest it’s breaking.
Next are the lows of mid-December, mid-March and early May. The higher lows on either side is potentially consistent with a bottoming pattern.
Third, MACD has turned higher again.
Finally, Bollinger Band Width has squeezed into a narrow range. Such tight price action may suggest the index is due for some movement following a period of consolidation.
Trading futures just got more accessible after TradeStation slashed commissions! Click our Overview for more.
Important Information
TradeStation Securities, Inc., TradeStation Crypto, Inc., and TradeStation Technologies, Inc. are each wholly owned subsidiaries of TradeStation Group, Inc., all operating, and providing products and services, under the TradeStation brand and trademark. TradeStation Crypto, Inc. offers to self-directed investors and traders cryptocurrency brokerage services. It is neither licensed with the SEC or the CFTC nor is it a Member of NFA. When applying for, or purchasing, accounts, subscriptions, products, and services, it is important that you know which company you will be dealing with. Please click here for further important information explaining what this means.
This content is for informational and educational purposes only. This is not a recommendation regarding any investment or investment strategy. Any opinions expressed herein are those of the author and do not represent the views or opinions of TradeStation or any of its affiliates.
Investing in cryptocurrencies involves significant risks. Please click here for TradeStation Crypto’s risk disclosures on investing and trading in cryptocurrencies.
Investing involves risks. Past performance, whether actual or indicated by historical tests of strategies, is no guarantee of future performance or success. There is a possibility that you may sustain a loss equal to or greater than your entire investment regardless of which asset class you trade (equities, options, futures, or digital assets); therefore, you should not invest or risk money that you cannot afford to lose. Before trading any asset class, first read the relevant risk disclosure statements on the Important Documents page, found here: www.tradestation.com .
NQ Power Range Report with FIB Ext - 5/18/2023 SessionCME_MINI:NQM2023
- PR High: 13646.00
- PR Low: 13636.25
- NZ Spread: 21.75
5/15 session closed with strong supply run.
Approaching key long-term supply zone ~13730s from Aug 2022.
- IMO, crossing this supply zone could signal clearance of bear trend.
08:30 EST Economic Events
- Jobless Claims
- Philly Fed Manufacturing Index
10:00 EST Home Sales
Evening Stats (As of 12:05 AM)
- Weekend Gap: N/A
- Session Open ATR: 176.54
- Volume: 16K
- Open Int: 275K
- Trend Grade: Neutral
- From ATH: -18.7% (Rounded)
Key Levels (Rounded - Think of these as ranges)
- Long: 13531
- Mid: 12959
- Short: 12392
Keep in mind this is not speculation or a prediction. Only a report of the Power Range with Fib extensions for target hunting. Do your DD! You determine your risk tolerance. You are fully capable of making your own decisions.
Introducing the Volatility Adjusted ADX (VADX)In this video, Stock Justice introduces you to the Volatility Adjusted ADX (VADX), a powerful tool that combines trend strength and market volatility. Learn how to customize your settings for optimal analysis and how this indicator, with its proprietary mathematical formulation, offers a nuanced perspective on market dynamics. Discover the benefits of normalized data and how to read and interpret the VADX line in conjunction with other indicators. All of this, delivered in Stock Justice's engaging style, will empower your technical analysis toolkit. Be ready to trade safe, trade smart!
Choosing Your Channel: Bollinger, Donchian, or Keltner?When it comes to trading financial instruments, traders have a plethora of technical indicators to choose from. Among these, Bollinger Bands, Donchian Channels, and Keltner Channels stand out as popular tools for analyzing price movements and identifying potential trading opportunities. Each of these channels has its advantages and unique methods of application. This blog will compare these three channels and provide examples of how each can be used, helping you decide which one is right for you.
I. Bollinger Bands
Understanding Bollinger Bands
Bollinger Bands, developed by John Bollinger in the 1980s, is a volatility-based indicator that measures the standard deviation of price movements. It consists of three lines: a simple moving average (SMA) and two bands that are typically set at two standard deviations above and below the SMA. The distance between the bands adjusts as volatility increases or decreases.
Using Bollinger Bands
Bollinger Bands are useful for identifying price movements and potential reversals. When the bands contract, it indicates low volatility, and when they expand, it signals high volatility. A common strategy is to look for a breakout or breakdown when the bands contract.
Example: If a stock's price has been trading within a narrow range, and the Bollinger Bands contract, a trader might anticipate a breakout or breakdown. If the price breaks above the upper band, it could signal a bullish trend, while a break below the lower band suggests a bearish trend. This breakout should be confirmed with other indicators such as the MACD or RSI.
II. Donchian Channels
Understanding Donchian Channels
Donchian Channels, developed by Richard Donchian in the 1960s, is a trend-following indicator that measures the highest high and lowest low over a set number of periods, typically 20 periods. It consists of three lines: the upper channel line, the lower channel line, and the middle line, which is the average of the upper and lower lines.
Using Donchian Channels
Donchian Channels are primarily used to identify potential breakouts and breakdowns. Traders often use the channels to assess the strength of a trend and determine entry and exit points. The Donchian cloud can be a great tool for establishing lines of support and resistance as the price makes higher highs and lower lows and conversely lower highs or lower lows.
Example: If a stock's price is consistently hitting highs, a trader might use the Donchian Channels to identify a possible breakout. If the price breaks above the upper channel line, it could signal a continuation of the bullish trend. Conversely, if the price breaks below the lower channel line, it may indicate a potential trend reversal. I typically look for a secondary lower high or higher lower to confirm a reversal and then confirm the breakout with an oscillator as seen in the example below.
III. Keltner Channels
Understanding Keltner Channels
Keltner Channels, developed by Chester Keltner in the 1960s and later modified by Linda Raschke, is a volatility-based indicator that uses the average true range (ATR) to measure price movements. It consists of three lines: an exponential moving average (EMA) and two bands set at a multiple of the ATR above and below the EMA.
Using Keltner Channels
Keltner Channels are effective for identifying potential trading opportunities during trending markets and can be used in conjunction with other indicators to confirm price movements. The Keltner Channel is a great tool for identifying overbought/ oversold conditions in a trend. This can help traders find better points of entry for a trade.
Example: A trader might use Keltner Channels to identify potential pullbacks in a trending market. If the price moves above the upper channel line during an uptrend, it could signal an overbought condition, and the trader might wait for the price to pull back toward the EMA before entering a long position. Similarly, if the price falls below the lower channel line during a downtrend, it might indicate an oversold condition, and the trader could wait for a bounce back toward the EMA before entering a short position. The trader should also verify the bounce with other indicators as shown below.
IV. BONUS: Keltner/Bollinger Bands Squeeze Strategy
Channels do not have to be exclusively used on their own. The Keltner/Bollinger Bands Squeeze Strategy is a powerful technique that combines the strengths of both Keltner Channels and Bollinger Bands to identify potential trading opportunities. By understanding the nuances of this strategy, traders can significantly enhance their trading arsenal and make more informed decisions in the market.
The Squeeze: A Sign of Consolidation and Potential Breakout s
The Keltner/Bollinger Bands Squeeze occurs when the Bollinger Bands contract within the Keltner Channels, indicating a period of low volatility or consolidation in the market. This "squeeze" can serve as a precursor to significant price breakouts, either on the upside or downside. By closely monitoring this pattern, traders can identify periods of market consolidation and prepare to capitalize on potential breakouts.
How to Implement the Keltner/Bollinger Bands Squeeze Strategy
To implement this strategy, traders should follow these steps:
Overlay the Keltner Channels and Bollinger Bands on your chart: Start by adding both Keltner Channels and Bollinger Bands to your preferred trading platform's chart. Ensure that the settings of both indicators are adjusted to your desired values.
Identify the Squeeze: Look for periods when the Bollinger Bands contract within the Keltner Channels. This signifies a "squeeze" and acts as a sign that the market is experiencing low volatility or consolidation.
Monitor for Breakouts: Keep a close eye on the price action during the squeeze. When the Bollinger Bands expand outside of the Keltner Channels, this indicates a potential breakout from the consolidation period. The direction of the breakout (upwards or downwards) will depend on the overall market trend and price action.
Enter the Trade: The Keltner/Bollinger Bands Squeeze Strategy can be further enhanced by combining it with other technical indicators, such as the Relative Strength Index, or Moving Average Convergence Divergence. These complementary indicators can provide additional confirmation of potential breakouts and help traders better gauge market conditions. Once a breakout is confirmed, traders can enter a trade in the direction of the breakout. It's essential to use stop-loss orders and manage risk appropriately since false breakouts can also occur.
Exit the Trade: Traders should establish a price target and exit strategy based on their analysis and risk tolerance. This can include setting a specific profit target, using trailing stops, or leveraging other technical indicators to determine when to exit the trade.
Conclusion
Bollinger Bands, Donchian Channels, and Keltner Channels are all valuable technical indicators for analyzing price movements and identifying potential trading opportunities. When deciding which one is right for you, consider your trading style, preferred timeframes, and the specific characteristics of the markets you trade. It's essential to familiarize yourself with each indicator and practice using them in combination with other tools to enhance your trading strategy. We have even shown that these channels can complement each other to form a more comprehensive strategy. Remember, no single indicator is perfect, and incorporating multiple tools can help you gain a more comprehensive understanding of market dynamics. Good luck and happy trading!
If you enjoyed our content don’t forget to give this post a boost, and follow our page for more trading education!
NQ Power Range Report with FIB Ext - 5/17/2023 SessionCME_MINI:NQM2023
- PR High: 13506.75
- PR Low: 13485.00
- NZ Spread: 48.75
Daily supply grinding higher after yesterday's inside close.
Peaking above PR+1.
Building Permits at 08:30 EST
Crude Inventories
Evening Stats (As of 1:15 AM)
- Weekend Gap: N/A
- Session Open ATR: 176.86
- Volume: 18K
- Open Int: 269K
- Trend Grade: Bear
- From ATH: -19.4% (Rounded)
Key Levels (Rounded - Think of these as ranges)
- Long: 13531
- Mid: 12959
- Short: 12392
Keep in mind this is not speculation or a prediction. Only a report of the Power Range with Fib extensions for target hunting. Do your DD! You determine your risk tolerance. You are fully capable of making your own decisions.
NQ Power Range Report with FIB Ext - 5/16/2023 SessionCME_MINI:NQM2023
- PR High: 13467.75
- PR Low: 13456.00
- NZ Spread: 26.25
Monday closed as inside print. Ended positive, testing the daily supply.
Evening Stats (As of 1:35 AM)
- Weekend Gap: N/A
- Session Open ATR: 179.80
- Volume: 16K
- Open Int: 263K
- Trend Grade: Bear
- From ATH: -19.8% (Rounded)
Key Levels (Rounded - Think of these as ranges)
- Long: 13531
- Mid: 12959
- Short: 12392
Keep in mind this is not speculation or a prediction. Only a report of the Power Range with Fib extensions for target hunting. Do your DD! You determine your risk tolerance. You are fully capable of making your own decisions.
AUTL Is this a pump and dump?AUTL on the one-hour chart had a spontaneous parabolic move without a catalyst as best as
I can tell. Earnings ten days ago were decent but nothing special. AUTL as a biotech firm is
losing cash just not as much as analysts predicted. In the parabolic move very few shares
were traded between $2.00 and $2.40 as per the volume profile Overall a massive volume
occurred compared with the entire year although there was a bit in the runup to earnings.
I suspect a pump and dump and think it might be worth playing. Insiders could be
manipulating the shares and acting as a team. The zero-lag MACD suggests that the top has
been reached. I believe that insiders will be selling quickly and short sellers will be
joining in. I will be one of the latter. Retail buyers could be stuck bag holding if caught
by surprise. Once price drops to $4.00 the bearish momentum will kick in due to the
volume void on the profile. Accordingly, I will buy a group of call options when
AUTL hits $4.05 set a stop loss and await the flush back down to $2.00. If things go
well this will be over a 100% return on investment and 300% return on risk in one day.
The contracts for 6/16 ( $5.00) are about $250 with about 25% spread between the bid
and ask.
Intel ( Bullish!)I'm Bullish on Intel.
Bollinger bands have tightened and volatility will be making it's way into the stock. This stock has been in a downtrend for almost 2 weeks now, as depicted by the trendline I've drawn. OBV has curved upwards and we have a total of 3 virgin points of control lingering above the current price. If we can break above $29.07, we should easily see $30.07. I don't want to look too far ahead, so that will be my price target for now. There's so many bearish predictions on this stock, i have no problem being the outlier. I am studying volume profile / Volume price analysis and i believe my conviction to be true. Stocks are controlled by institutions, not common investors. Always follow the big money. Trend-line break and $30.00 coming soon.
NQ Power Range Report with FIB Ext - 5/15/2023 SessionCME_MINI:NQM2023
- PR High: 13379.75
- PR Low: 13357.00
- NZ Spread: 50.75
Evening Stats (As of 12:05 AM)
- Weekend Gap: N/A
- Session Open ATR: 186.02
- Volume: 19K
- Open Int: 255K
- Trend Grade: Bear
- From ATH: -20.2% (Rounded)
Key Levels (Rounded - Think of these as ranges)
- Long: 13531
- Mid: 12959
- Short: 12392
Keep in mind this is not speculation or a prediction. Only a report of the Power Range with Fib extensions for target hunting. Do your DD! You determine your risk tolerance. You are fully capable of making your own decisions.
XAGUSD Spot Silver - Is it ready to reverse up?Spot Silver dropped this past week about 6.5 % from its high early in the week. On the
15-minute chart the drop occurred over three days. XAUUSD is now underneath the POC line
of the volume profile as well as the negative bands of the mean anchored VWAP. The Mass
Indicator and faster / slower MA ratio indicator are both near the zero line showing that
bearish momentum has subsided and a reversal may be underway. Overall, I expect a reversal
with XAGUSD seeking the mean. The first target is the POC line confluent with VWAP so
25.08 while the final target is 25.55 being the redline demarcating the top of the high volume
area. I expect this to be a 1-2 day trade with high potential reward especially if leveraged
on forex.
Can BYND rise from its support /demand ( multiyear low) ?BYND had it surge in the post Covid months. As seen on the weekly chart, multiple
touches of the supply / resistance zone occurred in the range of $160-180 per share.
Price is now at 5-10% of the highs and at the multi-year lows. Volume is weak.
The RSI swing indicator has given a buy signal but I am skeptical. BYND is heavily shorted
and sellers have dominated. My idea is to set an alert for a price of %15.00.
The volume profile both short and longer term shows a lot of buying at the current price range.
My idea is to set an alert for $15. If BYND can get there, some momentum might be achieved
especially if some short sellers feel some pain and look to buy to cover and close.
Otherwise any down trends in the general market will tend to drag BYND down as well.
NQ Power Range Report with FIB Ext - 5/12/2023 SessionCME_MINI:NQM2023
- PR High: 13466.25
- PR Low: 13444.00
- NZ Spread: 49.75
Continuing to make new daily highs.
No significant economic news.
AMP discount margins returned to normal.
Evening Stats (As of 12:45 AM)
- Weekend Gap: N/A
- Session Open ATR: 187.34
- Volume: 23K
- Open Int: 256K
- Trend Grade: Bear
- From ATH: -19.5% (Rounded)
Key Levels (Rounded - Think of these as ranges)
- Long: 13531
- Mid: 12959
- Short: 12392
Keep in mind this is not speculation or a prediction. Only a report of the Power Range with Fib extensions for target hunting. Do your DD! You determine your risk tolerance. You are fully capable of making your own decisions.
NQ Power Range Report with FIB Ext - 5/11/2023 SessionCME_MINI:NQM2023
- PR High: 13415.50
- PR Low: 13403.50
- NZ Spread: 27.0
PPI pre-RTH at 08:30 EST
- AMP Broker increased margins expecting high volatility
Weekly supply lifted, breaking and holding above daily range since April. Should excite some bulls and trigger some short stops.
Watching to see if we continue higher or fail back inside the range.
Evening Stats (As of 12:05 AM)
- Weekend Gap: N/A
- Session Open ATR: 193.34
- Volume: 18K
- Open Int: 255K
- Trend Grade: Bear
- From ATH: -19.9% (Rounded)
Key Levels (Rounded - Think of these as ranges)
- Long: 13531
- Mid: 12959
- Short: 12392
Keep in mind this is not speculation or a prediction. Only a report of the Power Range with Fib extensions for target hunting. Do your DD! You determine your risk tolerance. You are fully capable of making your own decisions.
2nd Pine Script Lesson: Coding the Entry Logic - Bollinger BandWelcome back to our Trading View tutorial series! In this second lesson, be learning how to code the entry logic for a Bollinger Band indicator using Pine Script.
If you're new here and missed the first lesson, we highly recommend starting there as it provides a solid foundation for understanding the concepts we'll be covering today:
In this hands-on lesson, we'll guide you through every step of coding the entry logic for your own Bollinger Band indicator using Pine Script. By the end of this lesson, you'll have a functional indicator that you can use to inform your trading decisions. So, sit back, grab a cup of coffee, and let's get started!
Code the entry logic
a) This is where we are calling the Mikilap function with two arguments:
- the coinpair and
- the timeframe we want to use.
// Calling the Mikilap function to start the calculation
int indi_value = Function_Mikilap(symbol_full, time_frame)
b) In the function initiation we convert the strings into simple strings.
// Definition of a Pine Script individual function to handle the Request and avoid Repainting Errors
Function_Mikilap(simple string coinpair, simple string tf_to_use) =>
c) As we are calling the function to get an integer value, we have to define an output variable as an integer and place this variable as the last line in the local scope of the function code to return the integer value.
int function_result = 0
// placeholder for indicator calculations
function_result
Step 1:
Using the lower bandwidth of the Bollinger Band based on SMA (close, 21) and a standard deviation of 2.0 and try to highlight bars, where close is next to the lower band
a) Requesting the values for the coinpair with request.security()
= request.security(coinpair, tf_to_use, )
We recommend using repainting functions like request or barstate only in a local scope (inside a function) and not to request complex calculated values. For saving calculation capacity it is useful to only request the classic four OHLCs and do any calculation with these four after the r equest.security() .
b) Calculation of the lower Bollinger Bands values as we need the global info, which type of source, length, and deviation value to use for the calculation, let‘s cut & paste the input for the Bollinger Band in the general starting section of the code and as we want to look for close values „next“ to the lower bandwidth, we need to define what „next“ means; let‘s do it in another input variable, perhaps we want to play with the definition later.
string symbol_full = input.symbol(defval = "BINANCE:BTCUSDT", title = "Select Pair:", group = "General")
string time_frame = input.string(defval = "60", title = "Timeframe:", tooltip = "Value in minutes, so 1 hour = 60", group = "General")
int length = input.int(defval = 21, title = "BB Length:", group = "Bollinger Band Setting")
src = input(defval = close, title="BB Source", group = "Bollinger Band Setting")
float mult = input.float(defval = 2.0, title="BB Standard-Deviation", group = "Bollinger Band Setting")
float lower_dev = input.float(defval = 0.1, title="BB Lower Deviation in %", group = "Bollinger Band Setting")/100
First, let‘s make it visible on the chart by re-writing the Bollinger Bandplot, which is not needed anymore.
// Calling the Mikilap function to start the calculation
int indi_value = Function_Mikilap(symbol_full, time_frame)
// Output on the chart
// Part 2 - plotting a Band around the lower bandwidth of a Bollinger Band for the active CoinPair on the chart
lower_bb = ta.sma(src, length) - (mult*ta.stdev(src, length))
lower_bb_devup = lower_bb + lower_bb * lower_dev
lower_bb_devdown = lower_bb - lower_bb * lower_dev
upper = plot(lower_bb_devup, "BB Dev UP", color=#faffaf)
lower = plot(lower_bb_devdown, "BB Dev DOWN", color=#faffaf)
fill(upper, lower, title = "BB Dev Background", color=color.rgb(245, 245, 80, 80))
c) Now we use the same calculation for the coinpair inside the function and start with the selection of the source (OHLC) to use, which is activein the respective input variable.
// Defintion of a Pine Script individual function to handle the Request and avoid Repainting Errors
Function_Mikilap(simple string coinpair, simple string tf_to_use) =>
int function_result = 0
bool barstate_info = barstate.isconfirmed
= request.security(coinpair, tf_to_use, )
src_cp = switch src
open => open_R
high => high_R
low => low_R
=> close_R
lower_band_cp = ta.sma(src_cp,length) - (mult*ta.stdev(src_cp, length))
lower_band_cp_devup = lower_band_cp + lower_band_cp * lower_dev
lower_band_cp_devdown = lower_band_cp - lower_band_cp * lower_dev
// placeholder for indicator calculations
d) As the bandwidth for the interesting close values is defined by our band, the only thing missing for the part of the Bollinger Band in our Mikilap indicator is to check if the close value of a bar is inside our band. As we are talking about closed bars, let‘s be sure that it is really closed by using barstate.isconfirmed (repainting built-in function!) and save it in a variable in the head of the function to avoid requesting this info too often.
bool barstate_info = barstate.isconfirmed
Now let‘s check if the close value of a bar is inside our band.
bool bb_entry = close_R < lower_band_cp_devup and close_R > lower_band_cp_devdown and barstate_info
And increase the output variable by 1 in case the close value is inside.
if bb_entry
function_result += 1
By using bb_entry , we are referring to the last bar next to the actual bar, because we want to enter on the opening of the bar after the criteria has been met.
e) And to make these possible entries visible, we want to place a label below the bar and show the entry price (=open value of the bar) as mouseover (tooltip). This should only happen if the active coinpair on the chart is the same coinpair, which is in the calculation of the function.
if function_result == 1 and ticker.standard(syminfo.tickerid) == coinpair
label LE_arrow = label.new(x = bar_index, y = low_R, text = " ↑ LE", yloc = yloc.belowbar, color = color.rgb(255,255,255,25),style = label.style_none, textcolor = color.white, tooltip = str.tostring(open_R))
Note:
You will love labels (!) and in case you are looking for text symbols that can be used as labels, look here: www.messletters.com
If you need help use the Pine Script Reference Manual, which explains 99% of everything in Pine Script, here: www.tradingview.com
f) As our function now returns different integer values (0 or 1), we can use this info to color the background on the actual chart in case it is 1.
// Calling the Mikilap function to start the calculation
int indi_value = Function_Mikilap(symbol_full, time_frame)
color bg_color = indi_value ? color.rgb(180,180,180,75) : color.rgb(25,25,25,100)
bgcolor(bg_color)
g) To finish this little Pine Script lesson and to achieve our initial targets, we just need to integrate the second indicator (RSI) into the function. We want to use the RSI for 0,5 days (12 hours) and use it to ensure to not go into a long entry in an oversold (< 25) or overbought (> 70) market. We will use RSI (low, 12) within 25 to 45 as the range to go for.
Your tasks:
define new input variables for RSI: src_rsi and length_rsi
define new input variables for the RSI range we want to use: rsi_minand rsi_max(please use the „inline“ format of an input type)
calculate the RSI (src_rsi, length_rsi) inside our Mikilap-function
define a boolean variable (rsi_entry) to check if the calculated RSI value is inside the range (please add as last check the barstate_info)
add the RSI entry check to the Bollinger Band entry check to combine them
Congratulations on finishing the second lesson on Trading View - we hope you found it informative and engaging!
We're committed to providing you with valuable insights and practical knowledge throughout this tutorial series. So, we'd love to hear from you! Please leave a comment below with your suggestions on what you'd like us to focus on in the next lesson.
Thanks for joining us on this learning journey, and we're excited to continue exploring Trading View with you!