The Philosophy of Selling Technical IndicatorsWith a rather odd & convoluted history, the industry of selling access to technical indicators goes back further in time than most traders & investors are aware of.
A rather large majority of investors perceive the act of selling access to technical indicators as being in most relation to selling 'snake-oil'.
While this is true for many vendors who unfortunately market indicators as a 'get rich quick' scheme for trading, it's not true for every vendor.
In this article we are going to do a deep dive exposing what makes a bad vendor, going through the history of indicator vendors, and outlining how vendors can actually have an overall positive impact for the community.
Disclaimer: LuxAlgo is a provider of technical indicators (mostly free, but some paid), however, we will try to be as un-biased as possible in this piece. This article is purely for informational & educational purposes for the greater community.
🔶 WHAT MAKES A GOOD VENDOR?
We could summarize this as a vendor who first & foremost follows TradingView vendor requirements , develops quality products, cares about the community, truly acknowledges that past performance is not necessarily indicative of future results, and has good business practices.
A step by step ruleset to follow of how to be a good vendor could be as follows:
🔹 1. Publish open-source scripts
Aside from the paid scripts, vendors should be easily able to contribute other publications with open-source code for the greater community.
Come on, let the world see that code! There shouldn't be any hesitation to contribute open-source scripts if a vendor is deeming themselves good enough to sell private indicators, right?
Well, there's not many other ways to immediately tell if their products are "quality" if a vendor has no open-source publications to show for themselves as a developer.
If someone is going to sell indicators, we believe in our opinion that they should be able to contribute to the community with open-source work as well in a notable way. This can also be a vendor's way of "giving back" or at least just a way to show they care about the community.
Many vendors completely disregard publishing open source as a means to building a community & also being contributive to the great platform with a userbase they're building a business on top of, while in fact, it does all of this in an extremely productive way.
A possible reason why many vendors do not prioritize publishing open-source scripts could be that they don't know how to do so in any case, so they stick to private script publications mostly (or entirely) to avoid having to be in the public eye of the broader TradingView / Pine Script community.
🔹 2. Don't use misleading marketing practices
Indicators can be marketed as quality, efficient, comprehensive, educational, and supportive tools for traders / investors.
There is a balance a vendor must have when it comes to marketing a technical indicator as a product.
To be clear, of course, it is only logical & common sense to display a product as 'good', and there's nothing wrong with that.
However, if a vendor goes too far, such as saying, "Our indicator has an 89% win rate!" or "How to turn $1k into $100k!" or even "Revealing the game-changing secret weapon that made trader $1M on 1 trade!" - then a vendor is simply using bad practices to acquire customers.
A great analogy can be an advertisement for a food company such as Pizza Hut. Of course, they want to make the pizza look great with excellent visuals, good lighting, & shiny cheese, however, they don't tell you by eating the pizza it will get you a 6-pack rock hard abs.
The same can be applied to marketing technical indicators as products. Of course, a vendor can display their product functioning well in good market conditions primarily, however, by claiming it has any sort of "win-rate" or guaranteed profits, a vendor is being misleading.
The only difference between the Pizza Hut ad & the technical indicator ad being it pertains to the analysis of financial markets, so, in general there should also be proper disclaimers where fit to address consumer expectations using such products.
🔹 3. Don't be misleading in your branding, either.
This goes hand-in-hand with the point made above on marketing.
If a brand itself is in relation to generating profits like "Profit-Bot" or a product / feature is called "10x-Gains-Moving-Average"... the vendor is likely en-route to problems in the long run with the business (bad reviews, business disputes, poor community, etc).
A great business is made on transparency, providing value, caring about customers, and making a difference within an industry for the better.
The more a business does good by customers, the healthier the business will be, & the longer the business will last.
Within the space of technical indicators as products, no matter how transparent the marketing / website is, many customers will still have the impression that they will use these products to help themselves 'make profits'.
While this is of course mostly everyone's goal being involved in financial markets in the first place, it calls for a good balance in the presentation of the indicators as well as setting expectations clear by communicating realistic expectations to customers as best as possible.
One thing vendors can easily do to be transparent, honest, & an overall good actor in the industry is to provide a generous refund policy to ensure consumers who may still have the wrong idea about the intended usage have the opportuntiy to move on with a full refund.
Executing on a good refund policy tends to be the most successful strategy for vendors opposed to free trials even for managing expectations because free trials can attract even less experienced traders who don't want to take the time to learn the product itself no matter how many times they have directed to not follow indicators blindly.
There are many instances of where this is seen as similarly true within digital products in general such as plug-ins, educational programs, etc.
🔹 4. Create unique products
This should be a given, however, it's something we thought we should mention as many vendors tend to impersonate or completely mimic other products already existing in hopes of theirs attaining the same level of attention.
The reality is most technical indicators as products have already seen a high level of adoption from the broader community and it universally is known to them that there are knockoff products existing already.
Joining forces with the knockoffs is not a good bet in any endeavor and we believe that originality can go a long way in this industry as well.
🔶 WHAT MAKES A BAD VENDOR?
Well, this can be easily summed up in 1 image of course.
You know what they say, if something sounds too good to be true... it isn't.
If someone is standing in front of an exotic car, flashing cash, and telling you they got this rad lifestyle by using their trading indicator... it should immediately raise 1,000 red flags for you.
There's no such thing as getting rich quick, especially based on the functionality of a technical indicator. Period.
This type of malicious marketing is extremely harmful to people as it directly gives them false hopes, plays into desperation, and is from a common-sense perspective; a deceptive marketing tactic used by charlatans.
Bad vendors do not publish any open-source contributions and primarily just stick to marketing indicators in misleading ways that overall harm the community.
There are many potential reasons as to why vendors market indicators in misleading ways:
1.) They don't understand indicators & they are actually snake-oil salesmen (image above).
2.) They do understand indicators, maybe have something decent developed, but just don't know how else to market indicators other than promising profits.
3.) They may have tried marketing in non-misleading ways before, found that misleading marketing is producing the most sales for them, so they became fueled with greed & doubled-down on the misleading claims when marketing their product regardless. (Instead of trying to build a reputable business).
🔶 WHY & HOW VENDORS CAN BE GOOD FOR THE COMMUNITY
Vendors have the power to reach more people, since at the end of the day, there is a business established behind them with marketing efforts.
We believe that people will buy indicators no matter what and that this is a real established market as products for traders, regardless of what the majority of investors think of it.
So, as long as there are good actors primarily at the top of the industry, this is what's best for the community overall, and possibly the overall perception of indicator vendors can change eventually.
Good acting vendors with the right practices as listed earlier in this article are able to educate more people through marketing their products, community growth, & open-source contributions that they publish as well.
All in turn, growing the broader interest in the scripting community which helps grow technical analysis further by having a larger number of users provide feedback to each other & further improve the space over time.
In the case of LuxAlgo as a provider for example, it would not have been possible to grow a TradingView following of 200,000+ without the marketing efforts outside of TradingView on platforms like YouTube, Instagram, and even TikTok for all indicators we have created (free & paid).
Which has certainly grown into a large community, which over time has meaningfully contributed to the interest in custom technical indicators & the scripting community overall in general.
In the case of a bad acting vendor, this is the exact opposite & bad for the community overall because they do not make any good contribution to the community and just merely exist to try & sell access to their private indicators.
🔶 DO PAID INDICATORS "WORK" BETTER THAN FREE INDICATORS?
If you are defining the word "work" as "make more profits", then the answer is a hard no in all cases.
If you are defining the word "work" as in "being more useful", then it truly just depends on how comprehensive or unique the indicator is.
We believe that indicators are best used as supportive tools for decision making, so it's important to be asking this question in the right context & with this understanding when considering a product.
In the context of LuxAlgo Premium indicators specifically, we believe the answer is yes due to how the indicators were designed as all-in-one toolkits that include presets, filters, & various customization/optimization methods specifically designed to help traders embrace their trading style.
The position for paid indicators to exist under a subscription model is primarily done since indicators can be frequently updated / improved over time based on the user's feedback.
There are, however, other aspects of paid indicators which could be legitimately more useful than anything you can find for free in some other cases such as unique volume-based tools, extensive market scanner scripts, etc.
Although, it is quite limited when it comes to traditional technical indicators such as moving averages or signal-based indicators to make a strong argument that one is better than another in any meaningful way.
In most cases, you can take one indicator and overfit it to appear "better" or "more accurate" than another indicator by finding more specific market conditions or settings that has an advantage over another.
As a technical analyst, you begin to understand this once you have experimented with vast amounts of technical indicators with different use cases and have thoroughly reflected on its actual benefits to you. It's truly impossible to make an alternative argument in all cases, including debatably all paid technical indicators in existence right now.
🔶 THE REAL VALUE PROPOSITION OF PAID TECHNICAL INDICATORS
Since we can conclude in mostly all scenarios that paid indicators don't "work" better than free indicators in a technical sense when referring to its accuracy or direct visual aid to a trader, it begs to question what the actual value proposition can be for a vendor selling access to indicators.
A large part of the alternative value prop for a vendor may fall under the community & education that it provides under the brand, or additionally, the prospect of a vendor making paid indicators more interoperable with other applications such as large-scale alerts systems or cross-platform functionality.
Many vendors may try to create value propositions for their paid indicators by hosting a signal group where analysts callout trades using their paid indicators, however, this typically will be done in misleading ways over-hyping the usage and is not generally a good practice for vendors or users in our opinion.
With all of this mentioned, it may seem that the entire industry is full of charlatans at times, however, we do not believe the space will remain like this forever.
🔶 SHOULD THIS BE A MORE LEGITIMIZED INDUSTRY?
The history of paid indicators goes all the way back to the 1980's with John Ehlhers & Mark Jurik being two notable figures providing paid tools through websites on various charting platforms.
There was also a rather strange ecosystem of products with generally 'awkward' branding existing on older charting platforms since the early 2,000's. Some of which on these platforms still exist to this day. While interestingly enough, practically none of these brands ever grew past being considered small plug-ins.
Some considerably large educational programs / memberships throughout the 2,000's (& some existing still to this day) have implemented indicators as a part of their offerings, although they typically tend to integrate indicators only to add on to their sales funnel styled websites in hopes to add unique value to their "life changing online course" positioning, so we won't mention any names.
Additionally, while most new traders are likely unaware, TradingView had an app-store marketplace themselves in the 2010's called "marketplace add-ons" where users could purchase indicators from various vendors within their indicators tab alongside the Public Library now called Community Scripts.
Likely as the TradingView platform & Pine Script was mass-adopted on a larger scale, this marketplace was discontinued for various reasons with the adoption of invite-only scripts, where anyone with a premium account can manage access on these types of script publications.
This pivotal shift leveled the playing field for the industry whereas it created a new ecosystem of vendors who all could leverage their ability to manage access to users without appearing as "just another marketplace add-on", but rather, actual brands themselves.
While keeping this piece as un-biased as possible, this is where LuxAlgo was born, & generally speaking, was primarily the inspiration for the hundreds of "Algo" brands popping up all over the internet trying to sell TradingView indicators due to our notoriety in this environment.
In this current landscape, we believe there is an established ecosystem that has potential to mature further into a 'healthy' industry, so to speak... as mentioned earlier, just as long as there are more good actors leading it than bad.
We are also hopeful for platforms to recognize this evolution themselves & directly support the ecosystem to grow more efficiently with stronger operations over time while still allowing these brands their own independence as they have now.
It's very optimistic considering the realization of how popular the ecosystem has become & with the prospect of vendors within it to lead it in positive ways, which overall brings more people to TradingView & grows genuine interest in the Pine Script community from all over the internet very effectively.
🔶 CONCLUSION
We strongly believe indicator vendors will always exist in some capacity considering the 30–40-year history, the rise of digital products on the internet, as well as the growing popularity of indicator vendors in this current landscape. Considering this, it's important to ensure the brands leading the space are good actors so the space itself can mature long-term.
As a prominent figure in this industry, we hope from this article to have provided a lot of transparency for the broader community of traders & investors who may not have been aware of this space in such detail, as well as for any aspiring vendors to hopefully look to us and what we have outlined as a good role model / checklist for the sake of making this industry more legitimized in the future.
Thank you for reading!
- Sean Mackey (Founder @LuxAlgo)
Credits
Alex Pierrefeu (TV profile @alexgrover) for being a massive leader in LuxAlgo since the beginning & going deep all the time creating theories w/ me about technical analysis & the industry with genuine fascination.
John Ehlers for being what we call the grandfather of this entire industry dating back to the 1980's with MESA Software.
Mark Jurik as a serious 'wave maker' with Jurik Research and for leading the way in the early 2,000's as a provider of unique tools.
@ChrisMoody for being a real "OG" in the TradingView community & for some cool discussions about the history of the industry early on.
All of the amazing users of LuxAlgo Premium since early 2020 and the entire community who provide us feedback to improve our indicators over time.
Everyone in the Pine Script community who follows us on TradingView & enjoys our contributions.
The @PineCoders team for being extremely helpful moderating the platform & for listening to our feedback / dealing with us throughout the years.
And lastly @TradingView for being the greatest platform for traders / investors and for making all of this possible in the first place.
Pinescript
How to Choose the Right Indicator?Many traders, especially when starting out find themselves in a constant search of the best trading strategy.
A quick Google search is enough to scare anyone starting out, as the number of indicators and strategies to use under different market conditions is overwhelming.
🗒In this article, we will discuss *1* indicators nature and the correct way to use it, *2* how to choose the right indicator, and most importantly *3* how to know if the indicator is reliable or not.
---------------------------------------------------------------------------------------------------------------------
📌 First, what are indicators? Origin and Nature
Indicators are statistical tools that digest price data, OHLC of each candle, add a formula to it, and then convert it into visual information such as graphs or oscillators. Indicators provide information about the strength of a trend, momentum, and possible reversals.
When it comes to indicators, we can divide them into four classes: Momentum indicators, Trend indicators, Volatility indicators, Volume Indicators.
Knowing which one belongs to which category can help you make much better trading decisions. On the other hand, combining indicators in a wrong way can lead to a lot of confusion, wrong price interpretation, and, subsequently, to wrong trading decisions.
📌 The correct way to use indicators. Indicators don’t provide signals.
Most traders never look at the indicators they are using and even less have ever tried to understand the formula the indicator uses to analyze price. They then use their indicators in the wrong context and wonder why nothing works.
🗒Indicators don’t tell you when to buy or when to sell. They don’t even tell you when something is overbought or oversold.
Indicators are great tools if a trader understands their true purpose. Indicators provide information about price, how the price has moved, how candles have shaped, and how recent price action compares to historical price action. Again, not a direct signal to buy or sell.
Thus, the job of a trader is to interpret the information on their indicators in a meaningful way and turn it into a story about price action and buying/selling pressure.
Who is in control right now? Is the market ranging or trending? Is price losing strength or gaining momentum?
📌 How to choose the right indicator? That suits your trading style and personality
-----------------------------------------------------------------------------
📕 * Meaningful: Represents important information.
-----------------------------------------------------------------------------
Your indicator choice should match your trading style. The purpose of indicators/strategies is to offer a way to identify clues and to provide a framework for traders to work in. Our main job, as traders, is to collect clues and combine them in a meaningful way to have an edge over the market.
🗒 Only add indicators that help you put the odds in your favor. -- If it doesn’t, you don’t need it.
-----------------------------------------------------------------------------------------------------------
📕 * Objective: Has a clear operational definition of what is being measured.
-----------------------------------------------------------------------------------------------------------
Indicators are ideal for rule-based trading as indicators take out the guesswork by providing information that is totally objective especially for newbies who are struggling with discipline.
The most successful strategies/indicators are those where not a lot of individual interpretation is required.
🗒 Only use indicators that help you make objective decisions. -- If it doesn’t, you don’t need it.
-----------------------------------------------------------------------------------
📕 * Understandable: Easy to comprehend and interpret.
-----------------------------------------------------------------------------------
Indicators are great tools especially for amateurs who do not know how to relate price data into meaningful relationships.
Indicators' main purpose is to make your life easier, not more sophisticated.
🗒 Remember: K.I.S.S. Keep it simple stupid! -- If it is complicated, you don’t need it.
📕 Last but not least, less is more:
The problem with indicator redundancy is that when a trader picks multiple indicators that show the same information, he/she ends up giving too much weight to the information provided by the indicators.
🗒 “All Strategies / Indicators are good; if managed properly.”
~ Richard Nasr
---------------------------------------------------------------------------------------------------------------------
📌 How to know if the indicator is reliable? Cheat Sheet Checklist
📕 * Does it repaint, disappear or recalculate?
We have all been there. An indicator looking good /profitable on the chart, but perform horribly under live market conditions. Most indicators are designed to only show/keep winning signals. Do not, ever, include an indicator in your trading plan before testing it on a demo account.
🗒 Here is a simple step by step guide on how to test indicators:
- Attach your indicator to any chart.
- Keep your trading platform running for a while for the indicator to plot a couple of signals.
- Take a screenshot of the chart.
- Refresh by switching between the timeframes.
- Compare your chart with the screenshot
If the indicator’s signals /drawings change location or disappear, then it is a red flag. Such indicators are not reliable and shouldn’t be used in any way.
📕 * Does it lag?
In general, indicators are lagging, but so is price action. An indicator can only analyze what has happened already. Just as a candlestick or chart pattern only includes past price data.
Nothing to worry about so far, as we mentioned above, indicators only provide information and do not offer signals.
However, some indicators are too lagging. This kind of indicators looks good on historical data but appear too late under live market conditions.
🗒 Pro Tip: Always take into consideration when, where, and how does the signal appear.
📕 * Is it TradingView friendly?
90% of custom indicators do not work on TradingView, because PineScript does not allow recalculation. Thus, the signal/drawing can’t be modified once it is generated by the indicator.
Therefore, indicators that are available on TradingView stand out from the crowd, and they are considered more reliable.
---------------------------------------------------------------------------------------------------------------------
📌 In brief, indicators are very famous tools and used by millions of traders. However, often traders don’t really know what their indicators are doing or how to use them.
Always be aware of the objectives of your trading style and what you are trying to accomplish with the indicators. Then, adjust accordingly. Once a trader can stop using indicators as signal-tools, he will be able to transform his trading to new heights.
Happy trading!
Always follow your trading plan regarding entry, risk management, and trade management.
~Rich
TRADINGVIEW PINESCRIPT CODERS PRO+ USER NEEDS TRADERS , I'm looking for pine script coder, programmer to create me a automated indicator that can calculate my new (TDV) TOP DOWN VOLUME ANALYSIS INDICATOR idea, using the multi time frame top down analysis approach, I came up with this idea based on math, time frames, percentages of volume calculating it manually taking the color (red) for bearish/shorts and (green) bullish/longs of the last 3 out of 5 candle volumes in each time frame from 1m to 1w with total time frames (18) giving each TF a value #1-3 giving more value and weight to the higher TF and lower values weight to the lower as that's how top down analysis multi time framing work's I'm putting sample on screen with description and my new TDV ANALYSIS logo. IF ANYONE IS INTERESTED IN BUILDING/CREATING THIS INDICATOR please pm me on here so we can talk, just want to say that many traders believe price is king and most indicators are lagging but i believe VOLUME is the true king because its what pushes price and momentum and volatility so i believe there can be a holy grail indicator that has not been adopted or built yet and i think this idea has very good merits and could be just that, a all 4 in one leading indicator to take buy and sell trades based on volume alone as long as you know if its the bulls or bears with the volume power, a signal of say 100% bullish or bearish volume could be a great catalyst for a nice price move and momentum once alerted or signaled.
thanks guys, tradingbugtech & traderdadzz
TRADINGVIEW PINESCRIPT CODERS PRO+ USER NEEDS YOUR HELP ! traders i am looking for help creating a volume strength indicator i have created and back testing manually, everyone believes price is king but i believe price is just the amount of traders trading and how much volume dictates price action, indicators today are great and i do use them 2nd to price action and volume but believe volume is the true king so i created a idea using multi time frame top down method like dr. elders triple screen, im using (14) time frames and getting the most recent 5 bars volume and taking the average of the 5 bars and giving each time frame a vale 1-3% giving the lowest time frames the lowest number percent and the higher time frames the higher value percentage, then i add up each bull/bear volume and put it in a standard win rate calculator to get the winning volume percentage average, im now back testing manually every 1h if i were looking for trade set ups on the hourly tf and the 4h for day trades and intraday trades have written a pdf with all the details on how im back testing and what i want the indicator to signal for buys and sells based on the percentage of overall volume i have manually calculated using my values, please is anyone interested in building this pine script indicator i want to use on trading view as a paid subscription service once its been back tested and has a good win ratio/rate, anyone ,all trading view coders if u think u are interested in building and testing with myself please pm me, thank you.
Pine Beginner with Gr8 Script Idea - Script part need helpHi everyone
So before you get to excited - this is only the half of an idea which needs some Pine Scripting polish before I would classify this idea as one to take note of. With that said, if there's someone reading this that is willing to amend the code of my poor attempt to combine 3 scripts together in to 1 rather successful (potentially) algo/auto-trading script which was initially intended to place trades on MT5 for those who are either stuck, to far tied-in or simply stubborn enough to continue using a broker/s that are not listed on TradingView's list of verified brokers.
I must add that I honestly think this script has the potential to be one hellofa successful strategy for any trader who is considering or attempting to learn this fascinating and exciting coding language that can either leave you more confused than blind deaf old man at a psychedelic's rave OR open up a whole new approach of trading that was previously unfathomable yet now with each unique scripts encounter becoming unquestionably clearer that traders who embrace this path can only empower their trading potentials. I think if more opportunistic scripts like this one (once correctly coded by someone who is not as much a rookie as I am - at Pine Script coding not trading) along with some helpful guidelines for traders who have not discovered the wonders that TradingView has to offer any/all traders - that these "aha" types of doorways will be easily flooded with new interest evoked traders to the TradingView world.
But that's just one traders opinion who is looking towards putting this somewhat overly thought concept to test/s and I welcome any of you who wish to do the same, particularly in terms of trying to make heads or tails of my script that in theory makes perfect sense in my mind by using well known trading concepts by those who don't necessarily need to know how to code them in order to use them. However, in this specific case, the knowledge of how to code them has been given the centre front spotlight so feel free to take your shot in it's lime light if you wish. I would most definitely appreciate it and I'm sure you would benefit from the final scripts results as well.
Thanks to any and all who give it a go.
// Here's the script that I feel is best to share - there is a more recent updated version, however, I feel that my scripting skills or lack of may have made that version a great deal more confusing and messy than what this version below is. Hopefully you can see where Im trying to go with it. If not, please don't hesitate to ask and I'll do my best to try clarify where needed.
//
//@version=4
//
// Thanks to dynausmaux falconCoin LazyBear RicardoSantos LucemAnb andreholanda73 for all the scripts I'm using here.
// Special thanks to TradingView for unarguably the best trading platform in the world that facilitates development and learning.
// Before I begin, TAKE NOTE: I'm not an expert trader or pine script coder as such and all the code used here is copied and/or modified from scripts freely found that are published through TradingView.
//
//
// For those of you who actually do look in to the code behind scripts they come accross - here's logic behind all the colorful shapes all over your charts.
//
// CIRCLES & TRIANGLES:
// - LITTLE CIRCLE: They appear at all WaveTrend wave crossings.
// - GREEN CIRCLE: The wavetrend waves are at the oversold level and have crossed up (bullish).
// - RED CIRCLE: The wavetrend waves are at the overbought level and have crossed down (bearish).
// - GOLD/ORANGE CIRCLE: When RSI is below 20, WaveTrend waves are below or equal to -80 and have crossed up after good bullish divergence (DONT BUY WHEN GOLD CIRCLE APPEAR).
// - None of these circles are certain signs to trade. It is only information that can help you.
// - PURPLE TRIANGLE: Appear when a bullish or bearish divergence is formed and WaveTrend waves crosses at overbought and oversold points.
//
// +BEARS/BULLS FLAG:
// - MFI+RSI Area are RED (Below 0).
// - Wavetrend wave above 0 and crossing over down.
// - VWAP Area below 0 on higher timeframe.
// - This pattern reversed becomes bullish.
// +SIDE NOTE: Check the last heikinashi candle from 2 higher timeframe
// - Bearish/Bullish DIAMOND:
// -- HT Candle is red
// -- WT > 0 and crossed down
study(title = 'VuManChu B Divergences', shorttitle = 'VuMan CBD')
// PARAMETERS {
// WaveTrend
wtShow = input(true, title = 'Show WaveTrend', type = input.bool)
wtBuyShow = input(true, title = 'Show Buy dots', type = input.bool)
wtGoldShow = input(true, title = 'Show Gold dots', type = input.bool)
wtSellShow = input(true, title = 'Show Sell dots', type = input.bool)
wtDivShow = input(true, title = 'Show Div. dots', type = input.bool)
vwapShow = input(true, title = 'Show Fast WT', type = input.bool)
wtChannelLen = input(9, title = 'WT Channel Length', type = input.integer)
wtAverageLen = input(12, title = 'WT Average Length', type = input.integer)
wtMASource = input(hlc3, title = 'WT MA Source', type = input.source)
wtMALen = input(3, title = 'WT MA Length', type = input.integer)
// WaveTrend Overbought & Oversold lines
obLevel = input(53, title = 'WT Overbought Level 1', type = input.integer)
obLevel2 = input(60, title = 'WT Overbought Level 2', type = input.integer)
obLevel3 = input(100, title = 'WT Overbought Level 3', type = input.integer)
osLevel = input(-53, title = 'WT Oversold Level 1', type = input.integer)
osLevel2 = input(-60, title = 'WT Oversold Level 2', type = input.integer)
osLevel3 = input(-75, title = 'WT Oversold Level 3', type = input.integer)
// Divergence WT
wtShowDiv = input(true, title = 'Show WT Regular Divergences', type = input.bool)
wtShowHiddenDiv = input(false, title = 'Show WT Hidden Divergences', type = input.bool)
showHiddenDiv_nl = input(true, title = 'Not apply OB/OS Limits on Hidden Divergences', type = input.bool)
wtDivOBLevel = input(45, title = 'WT Bearish Divergence min', type = input.integer)
wtDivOSLevel = input(-65, title = 'WT Bullish Divergence min', type = input.integer)
// Divergence extra range
wtDivOBLevel_addshow = input(true, title = 'Show 2nd WT Regular Divergences', type = input.bool)
wtDivOBLevel_add = input(15, title = 'WT 2nd Bearish Divergence', type = input.integer)
wtDivOSLevel_add = input(-40, title = 'WT 2nd Bullish Divergence 15 min', type = input.integer)
// RSI+MFI
rsiMFIShow = input(true, title = 'Show MFI', type = input.bool)
rsiMFIperiod = input(60,title = 'MFI Period', type = input.integer)
rsiMFIMultiplier = input(150, title = 'MFI Area multiplier', type = input.float)
rsiMFIPosY = input(2.5, title = 'MFI Area Y Pos', type = input.float)
// RSI
rsiShow = input(false, title = 'Show RSI', type = input.bool)
rsiSRC = input(close, title = 'RSI Source', type = input.source)
rsiLen = input(14, title = 'RSI Length', type = input.integer)
rsiOversold = input(30, title = 'RSI Oversold', minval = 50, maxval = 100, type = input.integer)
rsiOverbought = input(60, title = 'RSI Overbought', minval = 0, maxval = 50, type = input.integer)
// Divergence RSI
rsiShowDiv = input(false, title = 'Show RSI Regular Divergences', type = input.bool)
rsiShowHiddenDiv = input(false, title = 'Show RSI Hidden Divergences', type = input.bool)
rsiDivOBLevel = input(60, title = 'RSI Bearish Divergence min', type = input.integer)
rsiDivOSLevel = input(30, title = 'RSI Bullish Divergence min', type = input.integer)
// RSI Stochastic
stochShow = input(true, title = 'Show Stochastic RSI', type = input.bool)
stochUseLog = input(true, title=' Use Log?', type = input.bool)
stochAvg = input(false, title='Use Average of both K & D', type = input.bool)
stochSRC = input(close, title = 'Stochastic RSI Source', type = input.source)
stochLen = input(14, title = 'Stochastic RSI Length', type = input.integer)
stochRsiLen = input(14, title = 'RSI Length ', type = input.integer)
stochKSmooth = input(3, title = 'Stochastic RSI K Smooth', type = input.integer)
stochDSmooth = input(3, title = 'Stochastic RSI D Smooth', type = input.integer)
// Divergence stoch
stochShowDiv = input(false, title = 'Show Stoch Regular Divergences', type = input.bool)
stochShowHiddenDiv = input(false, title = 'Show Stoch Hidden Divergences', type = input.bool)
// Schaff Trend Cycle
tcLine = input(false, title="Show Schaff TC line", type=input.bool)
tcSRC = input(close, title = 'Schaff TC Source', type = input.source)
tclength = input(10, title="Schaff TC", type=input.integer)
tcfastLength = input(23, title="Schaff TC Fast Lenght", type=input.integer)
tcslowLength = input(50, title="Schaff TC Slow Length", type=input.integer)
tcfactor = input(0.5, title="Schaff TC Factor", type=input.float)
// Sommi Flag
sommiFlagShow = input(false, title = 'Show Sommi flag', type = input.bool)
sommiShowVwap = input(false, title = 'Show Sommi F. Wave', type = input.bool)
sommiVwapTF = input('720', title = 'Sommi F. Wave timeframe', type = input.string)
sommiVwapBearLevel = input(0, title = 'F. Wave Bear Level (less than)', type = input.integer)
sommiVwapBullLevel = input(0, title = 'F. Wave Bull Level (more than)', type = input.integer)
soomiFlagWTBearLevel = input(0, title = 'WT Bear Level (more than)', type = input.integer)
soomiFlagWTBullLevel = input(0, title = 'WT Bull Level (less than)', type = input.integer)
soomiRSIMFIBearLevel = input(0, title = 'Money flow Bear Level (less than)', type = input.integer)
soomiRSIMFIBullLevel = input(0, title = 'Money flow Bull Level (more than)', type = input.integer)
// Sommi Diamond
sommiDiamondShow = input(false, title = 'Show Sommi diamond', type = input.bool)
sommiHTCRes = input('60', title = 'HTF Candle Res. 1', type = input.string)
sommiHTCRes2 = input('240', title = 'HTF Candle Res. 2', type = input.string)
soomiDiamondWTBearLevel = input(0, title = 'WT Bear Level (More than)', type = input.integer)
soomiDiamondWTBullLevel = input(0, title = 'WT Bull Level (Less than)', type = input.integer)
// macd Colors
macdWTColorsShow = input(false, title = 'Show MACD Colors', type = input.bool)
macdWTColorsTF = input('240', title = 'MACD Colors MACD TF', type = input.string)
darkMode = input(false, title = 'Dark mode', type = input.bool)
// Colors
colorRed = #ff0000
colorPurple = #e600e6
colorGreen = #3fff00
colorOrange = #e2a400
colorYellow = #ffe500
colorWhite = #ffffff
colorPink = #ff00f0
colorBluelight = #31c0ff
colorWT1 = #90caf9
colorWT2 = #0d47a1
colorWT2_ = #131722
colormacdWT1a = #4caf58
colormacdWT1b = #af4c4c
colormacdWT1c = #7ee57e
colormacdWT1d = #ff3535
colormacdWT2a = #305630
colormacdWT2b = #310101
colormacdWT2c = #132213
colormacdWT2d = #770000
// } PARAMETERS
// FUNCTIONS {
// Divergences
f_top_fractal(src) => src < src and src < src and src > src and src > src
f_bot_fractal(src) => src > src and src > src and src < src and src < src
f_fractalize(src) => f_top_fractal(src) ? 1 : f_bot_fractal(src) ? -1 : 0
f_findDivs(src, topLimit, botLimit, useLimits) =>
fractalTop = f_fractalize(src) > 0 and (useLimits ? src >= topLimit : true) ? src : na
fractalBot = f_fractalize(src) < 0 and (useLimits ? src <= botLimit : true) ? src : na
highPrev = valuewhen(fractalTop, src , 0)
highPrice = valuewhen(fractalTop, high , 0)
lowPrev = valuewhen(fractalBot, src , 0)
lowPrice = valuewhen(fractalBot, low , 0)
bearSignal = fractalTop and high > highPrice and src < highPrev
bullSignal = fractalBot and low < lowPrice and src > lowPrev
bearDivHidden = fractalTop and high < highPrice and src > highPrev
bullDivHidden = fractalBot and low > lowPrice and src < lowPrev
// RSI+MFI
f_rsimfi(_period, _multiplier, _tf) => security(syminfo.tickerid, _tf, sma(((close - open) / (high - low)) * _multiplier, _period) - rsiMFIPosY)
// WaveTrend
f_wavetrend(src, chlen, avg, malen, tf) =>
tfsrc = security(syminfo.tickerid, tf, src)
esa = ema(tfsrc, chlen)
de = ema(abs(tfsrc - esa), chlen)
ci = (tfsrc - esa) / (0.015 * de)
wt1 = security(syminfo.tickerid, tf, ema(ci, avg))
wt2 = security(syminfo.tickerid, tf, sma(wt1, malen))
wtVwap = wt1 - wt2
wtOversold = wt2 <= osLevel
wtOverbought = wt2 >= obLevel
wtCross = cross(wt1, wt2)
wtCrossUp = wt2 - wt1 <= 0
wtCrossDown = wt2 - wt1 >= 0
wtCrosslast = cross(wt1 , wt2 )
wtCrossUplast = wt2 - wt1 <= 0
wtCrossDownlast = wt2 - wt1 >= 0
// Schaff Trend Cycle
f_tc(src, length, fastLength, slowLength) =>
ema1 = ema(src, fastLength)
ema2 = ema(src, slowLength)
macdVal = ema1 - ema2
alpha = lowest(macdVal, length)
beta = highest(macdVal, length) - alpha
gamma = (macdVal - alpha) / beta * 100
gamma := beta > 0 ? gamma : nz(gamma )
delta = gamma
delta := na(delta ) ? delta : delta + tcfactor * (gamma - delta )
epsilon = lowest(delta, length)
zeta = highest(delta, length) - epsilon
eta = (delta - epsilon) / zeta * 100
eta := zeta > 0 ? eta : nz(eta )
stcReturn = eta
stcReturn := na(stcReturn ) ? stcReturn : stcReturn + tcfactor * (eta - stcReturn )
stcReturn
// Stochastic RSI
f_stochrsi(_src, _stochlen, _rsilen, _smoothk, _smoothd, _log, _avg) =>
src = _log ? log(_src) : _src
rsi = rsi(src, _rsilen)
kk = sma(stoch(rsi, rsi, rsi, _stochlen), _smoothk)
d1 = sma(kk, _smoothd)
avg_1 = avg(kk, d1)
k = _avg ? avg_1 : kk
// MACD
f_macd(src, fastlen, slowlen, sigsmooth, tf) =>
fast_ma = security(syminfo.tickerid, tf, ema(src, fastlen))
slow_ma = security(syminfo.tickerid, tf, ema(src, slowlen))
macd = fast_ma - slow_ma,
signal = security(syminfo.tickerid, tf, sma(macd, sigsmooth))
hist = macd - signal
// MACD Colors on WT
f_macdWTColors(tf) =>
hrsimfi = f_rsimfi(rsiMFIperiod, rsiMFIMultiplier, tf)
= f_macd(close, 28, 42, 9, macdWTColorsTF)
macdup = macd >= signal
macddown = macd <= signal
macdWT1Color = macdup ? hrsimfi > 0 ? colormacdWT1c : colormacdWT1a : macddown ? hrsimfi < 0 ? colormacdWT1d : colormacdWT1b : na
macdWT2Color = macdup ? hrsimfi < 0 ? colormacdWT2c : colormacdWT2a : macddown ? hrsimfi < 0 ? colormacdWT2d : colormacdWT2b : na
// Get higher timeframe candle
f_getTFCandle(_tf) =>
_open = security(heikinashi(syminfo.tickerid), _tf, open, barmerge.gaps_off, barmerge.lookahead_on)
_close = security(heikinashi(syminfo.tickerid), _tf, close, barmerge.gaps_off, barmerge.lookahead_on)
_high = security(heikinashi(syminfo.tickerid), _tf, high, barmerge.gaps_off, barmerge.lookahead_on)
_low = security(heikinashi(syminfo.tickerid), _tf, low, barmerge.gaps_off, barmerge.lookahead_on)
hl2 = (_high + _low) / 2.0
newBar = change(_open)
candleBodyDir = _close > _open
// Sommi flag
f_findSommiFlag(tf, wt1, wt2, rsimfi, wtCross, wtCrossUp, wtCrossDown) =>
= f_wavetrend(wtMASource, wtChannelLen, wtAverageLen, wtMALen, tf)
bearPattern = rsimfi < soomiRSIMFIBearLevel and
wt2 > soomiFlagWTBearLevel and
wtCross and
wtCrossDown and
hwtVwap < sommiVwapBearLevel
bullPattern = rsimfi > soomiRSIMFIBullLevel and
wt2 < soomiFlagWTBullLevel and
wtCross and
wtCrossUp and
hwtVwap > sommiVwapBullLevel
f_findSommiDiamond(tf, tf2, wt1, wt2, wtCross, wtCrossUp, wtCrossDown) =>
= f_getTFCandle(tf)
= f_getTFCandle(tf2)
bearPattern = wt2 >= soomiDiamondWTBearLevel and
wtCross and
wtCrossDown and
not candleBodyDir and
not candleBodyDir2
bullPattern = wt2 <= soomiDiamondWTBullLevel and
wtCross and
wtCrossUp and
candleBodyDir and
candleBodyDir2
// } FUNCTIONS
// CALCULATE INDICATORS {
// RSI
rsi = rsi(rsiSRC, rsiLen)
rsiColor = rsi <= rsiOversold ? colorGreen : rsi >= rsiOverbought ? colorRed : colorPurple
// RSI + MFI Area
rsiMFI = f_rsimfi(rsiMFIperiod, rsiMFIMultiplier, timeframe.period)
rsiMFIColor = rsiMFI > 0 ? #3ee145 : #ff3d2e
// Calculates WaveTrend
= f_wavetrend(wtMASource, wtChannelLen, wtAverageLen, wtMALen, timeframe.period)
// Stochastic RSI
= f_stochrsi(stochSRC, stochLen, stochRsiLen, stochKSmooth, stochDSmooth, stochUseLog, stochAvg)
// Schaff Trend Cycle
tcVal = f_tc(tcSRC, tclength, tcfastLength, tcslowLength)
// Sommi flag
= f_findSommiFlag(sommiVwapTF, wt1, wt2, rsiMFI, wtCross, wtCrossUp, wtCrossDown)
//Sommi diamond
= f_findSommiDiamond(sommiHTCRes, sommiHTCRes2, wt1, wt2, wtCross, wtCrossUp, wtCrossDown)
// macd colors
= f_macdWTColors(macdWTColorsTF)
// WT Divergences
= f_findDivs(wt2, wtDivOBLevel, wtDivOSLevel, true)
= f_findDivs(wt2, wtDivOBLevel_add, wtDivOSLevel_add, true)
= f_findDivs(wt2, 0, 0, false)
wtBearDivHidden_ = showHiddenDiv_nl ? wtBearDivHidden_nl : wtBearDivHidden
wtBullDivHidden_ = showHiddenDiv_nl ? wtBullDivHidden_nl : wtBullDivHidden
wtBearDivColor = (wtShowDiv and wtBearDiv) or (wtShowHiddenDiv and wtBearDivHidden_) ? colorRed : na
wtBullDivColor = (wtShowDiv and wtBullDiv) or (wtShowHiddenDiv and wtBullDivHidden_) ? colorGreen : na
wtBearDivColor_add = (wtShowDiv and (wtDivOBLevel_addshow and wtBearDiv_add)) or (wtShowHiddenDiv and (wtDivOBLevel_addshow and wtBearDivHidden_add)) ? #9a0202 : na
wtBullDivColor_add = (wtShowDiv and (wtDivOBLevel_addshow and wtBullDiv_add)) or (wtShowHiddenDiv and (wtDivOBLevel_addshow and wtBullDivHidden_add)) ? #1b5e20 : na
// RSI Divergences
= f_findDivs(rsi, rsiDivOBLevel, rsiDivOSLevel, true)
= f_findDivs(rsi, 0, 0, false)
rsiBearDivHidden_ = showHiddenDiv_nl ? rsiBearDivHidden_nl : rsiBearDivHidden
rsiBullDivHidden_ = showHiddenDiv_nl ? rsiBullDivHidden_nl : rsiBullDivHidden
rsiBearDivColor = (rsiShowDiv and rsiBearDiv) or (rsiShowHiddenDiv and rsiBearDivHidden_) ? colorRed : na
rsiBullDivColor = (rsiShowDiv and rsiBullDiv) or (rsiShowHiddenDiv and rsiBullDivHidden_) ? colorGreen : na
// Stoch Divergences
= f_findDivs(stochK, 0, 0, false)
stochBearDivColor = (stochShowDiv and stochBearDiv) or (stochShowHiddenDiv and stochBearDivHidden) ? colorRed : na
stochBullDivColor = (stochShowDiv and stochBullDiv) or (stochShowHiddenDiv and stochBullDivHidden) ? colorGreen : na
// Small Circles WT Cross
signalColor = wt2 - wt1 > 0 ? color.red : color.lime
// Buy signal.
buySignal = wtCross and wtCrossUp and wtOversold
buySignalDiv = (wtShowDiv and wtBullDiv) or
(wtShowDiv and wtBullDiv_add) or
(stochShowDiv and stochBullDiv) or
(rsiShowDiv and rsiBullDiv)
buySignalDiv_color = wtBullDiv ? colorGreen :
wtBullDiv_add ? color.new(colorGreen, 60) :
rsiShowDiv ? colorGreen : na
// Sell signal
sellSignal = wtCross and wtCrossDown and wtOverbought
sellSignalDiv = (wtShowDiv and wtBearDiv) or
(wtShowDiv and wtBearDiv_add) or
(stochShowDiv and stochBearDiv) or
(rsiShowDiv and rsiBearDiv)
sellSignalDiv_color = wtBearDiv ? colorRed :
wtBearDiv_add ? color.new(colorRed, 60) :
rsiBearDiv ? colorRed : na
// Gold Buy
lastRsi = valuewhen(wtFractalBot, rsi , 0)
wtGoldBuy = ((wtShowDiv and wtBullDiv) or (rsiShowDiv and rsiBullDiv)) and
wtLow_prev <= osLevel3 and
wt2 > osLevel3 and
wtLow_prev - wt2 <= -5 and
lastRsi < 30
// } CALCULATE INDICATORS
// DRAW {
bgcolor(darkMode ? color.new(#000000, 80) : na)
zLine = plot(0, color = color.new(colorWhite, 50))
// MFI BAR
rsiMfiBarTopLine = plot(rsiMFIShow ? -95 : na, title = 'MFI Bar TOP Line', transp = 100)
rsiMfiBarBottomLine = plot(rsiMFIShow ? -99 : na, title = 'MFI Bar BOTTOM Line', transp = 100)
fill(rsiMfiBarTopLine, rsiMfiBarBottomLine, title = 'MFI Bar Colors', color = rsiMFIColor, transp = 75)
// WT Areas
plot(wtShow ? wt1 : na, style = plot.style_area, title = 'WT Wave 1', color = macdWTColorsShow ? macdWT1Color : colorWT1, transp = 0)
plot(wtShow ? wt2 : na, style = plot.style_area, title = 'WT Wave 2', color = macdWTColorsShow ? macdWT2Color : darkMode ? colorWT2_ : colorWT2 , transp = 20)
// VWAP
plot(vwapShow ? wtVwap : na, title = 'VWAP', color = colorYellow, style = plot.style_area, linewidth = 2, transp = 45)
// MFI AREA
rsiMFIplot = plot(rsiMFIShow ? rsiMFI: na, title = 'RSI+MFI Area', color = rsiMFIColor, transp = 20)
fill(rsiMFIplot, zLine, rsiMFIColor, transp = 40)
// WT Div
plot(series = wtFractalTop ? wt2 : na, title = 'WT Bearish Divergence', color = wtBearDivColor, linewidth = 2, offset = -2)
plot(series = wtFractalBot ? wt2 : na, title = 'WT Bullish Divergence', color = wtBullDivColor, linewidth = 2, offset = -2)
// WT 2nd Div
plot(series = wtFractalTop_add ? wt2 : na, title = 'WT 2nd Bearish Divergence', color = wtBearDivColor_add, linewidth = 2, offset = -2)
plot(series = wtFractalBot_add ? wt2 : na, title = 'WT 2nd Bullish Divergence', color = wtBullDivColor_add, linewidth = 2, offset = -2)
// RSI
plot(rsiShow ? rsi : na, title = 'RSI', color = rsiColor, linewidth = 2, transp = 25)
// RSI Div
plot(series = rsiFractalTop ? rsi : na, title='RSI Bearish Divergence', color = rsiBearDivColor, linewidth = 1, offset = -2)
plot(series = rsiFractalBot ? rsi : na, title='RSI Bullish Divergence', color = rsiBullDivColor, linewidth = 1, offset = -2)
// Stochastic RSI
stochKplot = plot(stochShow ? stochK : na, title = 'Stoch K', color = color.new(#21baf3, 0), linewidth = 2)
stochDplot = plot(stochShow ? stochD : na, title = 'Stoch D', color = color.new(#673ab7, 60), linewidth = 1)
stochFillColor = stochK >= stochD ? color.new(#21baf3, 75) : color.new(#673ab7, 60)
fill(stochKplot, stochDplot, title='KD Fill', color=stochFillColor)
// Stoch Div
plot(series = stochFractalTop ? stochK : na, title='Stoch Bearish Divergence', color = stochBearDivColor, linewidth = 1, offset = -2)
plot(series = stochFractalBot ? stochK : na, title='Stoch Bullish Divergence', color = stochBullDivColor, linewidth = 1, offset = -2)
// Schaff Trend Cycle
plot(tcLine ? tcVal : na, color = color.new(#673ab7, 25), linewidth = 2, title = "Schaff Trend Cycle 1")
plot(tcLine ? tcVal : na, color = color.new(colorWhite, 50), linewidth = 1, title = "Schaff Trend Cycle 2")
// Draw Overbought & Oversold lines
//plot(obLevel, title = 'Over Bought Level 1', color = colorWhite, linewidth = 1, style = plot.style_circles, transp = 85)
plot(obLevel2, title = 'Over Bought Level 2', color = colorWhite, linewidth = 1, style = plot.style_stepline, transp = 85)
plot(obLevel3, title = 'Over Bought Level 3', color = colorWhite, linewidth = 1, style = plot.style_circles, transp = 95)
//plot(osLevel, title = 'Over Sold Level 1', color = colorWhite, linewidth = 1, style = plot.style_circles, transp = 85)
plot(osLevel2, title = 'Over Sold Level 2', color = colorWhite, linewidth = 1, style = plot.style_stepline, transp = 85)
// Sommi flag
plotchar(sommiFlagShow and sommiBearish ? 108 : na, title = 'Sommi bearish flag', char='⚑', color = colorPink, location = location.absolute, size = size.tiny, transp = 0)
plotchar(sommiFlagShow and sommiBullish ? -108 : na, title = 'Sommi bullish flag', char='⚑', color = colorBluelight, location = location.absolute, size = size.tiny, transp = 0)
plot(sommiShowVwap ? ema(hvwap, 3) : na, title = 'Sommi higher VWAP', color = colorYellow, linewidth = 2, style = plot.style_line, transp = 15)
// Sommi diamond
plotchar(sommiDiamondShow and sommiBearishDiamond ? 108 : na, title = 'Sommi bearish diamond', char='◆', color = colorPink, location = location.absolute, size = size.tiny, transp = 0)
plotchar(sommiDiamondShow and sommiBullishDiamond ? -108 : na, title = 'Sommi bullish diamond', char='◆', color = colorBluelight, location = location.absolute, size = size.tiny, transp = 0)
// Circles
plot(wtCross ? wt2 : na, title = 'Buy and sell circle', color = signalColor, style = plot.style_circles, linewidth = 3, transp = 15)
plotchar(wtBuyShow and buySignal ? -107 : na, title = 'Buy circle', char='·', color = colorGreen, location = location.absolute, size = size.small, transp = 50)
plotchar(wtSellShow and sellSignal ? 105 : na , title = 'Sell circle', char='·', color = colorRed, location = location.absolute, size = size.small, transp = 50)
plotchar(wtDivShow and buySignalDiv ? -106 : na, title = 'Divergence buy circle', char='•', color = buySignalDiv_color, location = location.absolute, size = size.small, offset = -2, transp = 15)
plotchar(wtDivShow and sellSignalDiv ? 106 : na, title = 'Divergence sell circle', char='•', color = sellSignalDiv_color, location = location.absolute, size = size.small, offset = -2, transp = 15)
plotchar(wtGoldBuy and wtGoldShow ? -106 : na, title = 'Gold buy gold circle', char='•', color = colorOrange, location = location.absolute, size = size.small, offset = -2, transp = 15)
// } DRAW
// ALERTS {
// BUY
alertcondition(buySignal, 'Buy (Big green circle)', 'Green circle WaveTrend Oversold')
alertcondition(buySignalDiv, 'Buy (Big green circle + Div)', 'Buy & WT Bullish Divergence & WT Overbought')
alertcondition(wtGoldBuy, 'GOLD Buy (Big GOLDEN circle)', 'Green & GOLD circle WaveTrend Overbought')
alertcondition(sommiBullish or sommiBullishDiamond, 'Sommi bullish flag/diamond', 'Blue flag/diamond')
alertcondition(wtCross and wtCrossUp, 'Buy (Small green dot)', 'Buy small circle')
// SELL
alertcondition(sommiBearish or sommiBearishDiamond, 'Sommi bearish flag/diamond', 'Purple flag/diamond')
alertcondition(sellSignal, 'Sell (Big red circle)', 'Red Circle WaveTrend Overbought')
alertcondition(sellSignalDiv, 'Sell (Big red circle + Div)', 'Buy & WT Bearish Divergence & WT Overbought')
alertcondition(wtCross and wtCrossDown, 'Sell (Small red dot)', 'Sell small circle')
// } ALERTS
Tutorial - Convert an indicator into strategy in pineHello Everyone,
I just made this video because, this question came up many times in Pine QA. In this video we are trying to load default Bollinger Band indicator from Tradingview and convert it into strategy.
Below are the steps
Load the indicator on chart
Click on source code (curly brackets next to indicator title) to load the code into your pine editor.
Make copy of the script. Remove the indicator on chart and load your copy of the script from pine editor
Replace indicator call with strategy call
Define your entry/exit conditions for long and short
Add strategy.entry, strategy.exit, strategy.close calls based on the conditions to generate trades on chart
Useful references
Pine Reference Manual
www.tradingview.com
Strategy template in the linked ideas.
Enjoy :)
Making A Signal In Tradingview Pinescript In Under 20 MinutesHave you ever wanted to combine two technical analysis indicators into a single signal to find your own way of making profit? This video is a tutorial where I take two stock Tradingview Pinescript indicators and combine them into a signal that makes it easier for the user to spot with their eyes when an even occurs on a chart. By following along I hope the viewer can learn the basic process of repeating this for their own research!
Candlestick Analysis SOL/USDT Hello Trading Community...
Ive been working on a factual analysis for some time now, it paints a PB text when a candle doesn't close lower than the previous 3,4,5.
As I am new to trading and pine scripts its a very basic script which seems to work when in AOI (Area of Interest) such as Support, lower channel trendline and near 50/100EMA when in an uptrend.
HTF fractals hold more strength and I tend to go with the HTF's and to alert the time of confirmation candle (which is when a either the 2nd or 3rd candle closes higher than the high of the PB)
This on its own doesn't hold weight and I like to see this as a poker game, the stronger my hand is, the more I am inclined to play the hand.
Your feedback would be most appreciated .
One divergence indicator to rule them allGreetings Traders,
We are continuing with our (mini) series in which we break down the (seemingly endless) features of The Divergent indicator.
Today we are going to discuss the various oscillators The Divergent supports detecting divergences on.
In contrast to other divergence indicators on TradingView, The Divergent comes with oscillators built-in. This means you won't have to add it on top of other indicators on your chart; it is completely standalone. Why is that a good thing? It is because The Divergent respects your indicator quota - it will only use up a single slot on your chart.
The Divergent ships with the following oscillators:
MACD (Moving Average Convergence Divergence)
RSI (Relative Strength Index)
CMF (Chaikin Money Flow)
Stochastic RSI
MFI (Money Flow Index)
TCI (Trading Channel Index, aka. WaveTrend)
Balance of Power
CCI (Commodity Channel Index)
Awesome Oscillator
Each oscillator is fully customisable, allowing you to tweak them the way you desire. To choose another oscillator, simply open The Divergent 's settings panel, and select a different one from the list.
A further benefit of having the oscillators built into the indicator, is that it opens up the possibility to apply various filters to the detected divergences. For example, if you have the RSI selected, you can configure The Divergent to only signal those RSI divergences, that manifest under the oversold or above the overbought areas. These filters will be introduced in detail in future articles.
To learn more about The Divergent , please see the related ideas linked at the bottom.
If you liked this post, please don't forget to give it a thumbs up!
If you have any questions, please feel free to ask in the comments section below.
Thank you for your attention!
How to send Divergence signals to your Discord server- Do you have a Discord server set up for your own trading community?
- Do you use divergences as part of your trading strategy?
- Would you like to send automated notifications to your Discord server whenever a divergence appears on any chart?
If you have answered yes to all 3 questions above, please keep on reading.
The easiest way to receive automated Divergence alerts to your Discord server, is to combine the alert messages from "The Divergent" divergence indicator on TradingView with a Webhook endpoint on your Discord server.
Step 1: Open Discord, and go to Server Settings
Step 2: Go to Integrations and create a new Webhook
Step 3 (optional): Rename your Webhook to "The Divergent (Divergence indicator)"
Step 4: Select the channel you wish to receive the divergence signals to (i.e. #divergence-signals)
Step 5: Save your Webhook
Step 6: Copy your Webhook URL to your clipboard and head over to TradingView
Step 7: Apply "The Divergent" or "The Divergent (Pro)" indicator to your chart and configure it as you prefer (The free version of The Divergent can signal Regular Divergences only, while the Pro version can signal both Regular and Hidden Divergences)
Step 8: Create a new alert, select "The Divergent" from the top drop down and select one of the Divergence signals (i.e. Regular Bullish)
Step 9: Use the Webhook URL from your clipboard as the Webhook URL of the alert
Step 10: Use the following alert message:
{"content": "The Divergent detected a Regular Bearish Divergence (RSI) on {{exchange}}:{{ticker}} ({{interval}}) @TradingView #divergence $BTC "}
Sample message delivered on Discord:
"The Divergent detected a Regular Bearish Divergence (RSI) on BINANCE:BTCUSDT (60) @TradingView #divergence $BTC"
Feel free to change the content to match your chart / type of divergence you are signalling in the alert.
Note : It is important that you format your alert message as a JSON string, and that you key the message with "content". If you have never used JSON before, it is a good idea to validate your message via jsonlint.com to make sure it is a valid JSON string.
Repeat the same steps for other charts / divergences. Create as many alerts, as many markets / divergences you want to signal to your Discord server.
If you have any questions, please feel free to post it in the comments section below.
If this tutorial was helpful to you, please consider giving it a thumbs up!
Thank you!
The easiest way to use divergences in your own Pine strategiesDetecting divergences in a Pine indicator / strategy is easy.
You simply have to compare the pivot lows and the pivot highs on the price and the oscillator, and if you can identify a difference between the last & previous pivots made on the price and the oscillator, you have likely found a divergence.
Using this theory, here is an example how you would detect a Regular Bearish divergence:
While the theory of divergence detection is simple, more often than not, things go wrong (the divergence indicator used in the example below is TradingView's built-in Divergence Indicator ):
Would you identify this as a divergence? If not, why not? Is it because the divergence line is slicing through the candles? Or because the line is slicing through the oscillator? Or something else?
Wouldn't it be great if somehow you could filter out invalid divergences from code, such as this one?
We at Whitebox Software were wondering about the same thing, and decided to find a solution to this problem. This is when we realised that while detecting divergences is easy, detecting valid divergences is hard...
After several months in development, we are proud to present to you our divergence indicator called The Divergent .
The Divergent is an advanced divergence indicator with over 2500 lines of Pine Script, exposing over 30 different configuration options, including 9 built-in oscillators, to allow you to tweak every aspect of divergence detection to perfection.
For example, the Line of Sight™ filter in The Divergent would have easily filtered out this invalid divergence above. The Line of Sight™ filter will notice any interruption to the divergence line connecting the price or the oscillator, and will treat the divergence as invalid.
This filter is one of many, which has been created to reduce the false positive detections to a minimum. (In later publications, we will discuss each and every filter in detail).
Alright, so The Divergent knows how to detect accurate divergences, but how is it going to help you detect divergences in your own Pine strategy?
The Divergent is not simply a divergence indicator - it can also emit divergence signals * which you can catch and process in your own strategy. You can think of The Divergent being a DaaS ( D ivergences a s a S ervice)!
* Please note, that divergence signals is a Pro only feature.
To use the signals, simply place The Divergent onto the same chart you have your strategy on, import "The Divergent Library" into your code, link your strategy to The Divergent using a "source" input, and act on the signals produced by The Divergent !
Here is a simple strategy which incorporates divergence signals produced by The Divergent in its entry condition. The strategy will only open a position, if the moving average cross is preceded by a regular bullish or bearish divergence (depending on the direction of the cross):
//@version=5
strategy("My Strategy with divergences", overlay=true, margin_long=100, margin_short=100)
import WhiteboxSoftware/TheDivergentLibrary/1 as tdl
float divSignal = input.source(title = "The Divergent Link", defval = close)
var bool tdlContext = tdl.init(divSignal, displayLinkStatus = true, debug = false)
// `divergence` can be one of the following values:
// na → No divergence was detected
// 1 → Regular Bull
// 2 → Regular Bull early
// 3 → Hidden Bull
// 4 → Hidden Bull early
// 5 → Regular Bear
// 6 → Regular Bear early
// 7 → Hidden Bear
// 8 → Hidden Bear early
//
// priceStart is the bar_index of the starting point of the divergence line drawn on price
// priceEnd is the bar_index of the ending point of the divergence line drawn on price
//
// oscStart is the bar_index of the starting point of the divergence line drawn on oscillator
// oscEnd is the bar_index of the ending point of the divergence line drawn on oscillator
= tdl.processSignal(divSignal)
bool regularBullSignalledRecently = ta.barssince(divergence == 1) < 10
bool regularBearSignalledRecently = ta.barssince(divergence == 5) < 10
float slowSma = ta_sma(close, 28)
float fastSma = ta_sma(close, 14)
longCondition = ta.crossover(fastSma, slowSma) and regularBullSignalledRecently
if (barstate.isconfirmed and longCondition and strategy.position_size == 0)
strategy.entry("Enter Long", strategy.long)
strategy.exit("Exit Long", "Enter Long", limit = close * 1.04, stop = close * 0.98)
shortCondition = ta.crossunder(fastSma, slowSma) and regularBearSignalledRecently
if (barstate.isconfirmed and shortCondition and strategy.position_size == 0)
strategy.entry("Enter Short", strategy.short)
strategy.exit("Exit Short", "Enter Short", limit = close * 0.96, stop = close * 1.02)
plot(slowSma, color = color.white)
plot(fastSma, color = color.orange)
One important thing to note, is that TradingView limits the number of "source" inputs you can use in an indicator / strategy to 1, so the source input linking your strategy and The Divergent is the only source input you can have in your strategy. There is a work around this limitation though. Simply convert the other source inputs to have a string type, and use a dropdown to provide the various sources:
string mySource = input.string("My source", defval = "close", options = )
float sourceValue = switch mySource
"close" => close
"open" => open
"high" => high
"low" => low
=> na
---
This is where we are going to wrap up this article.
We hope you will find the signals produced by The Divergent a useful addition in your own strategies!
For more info on the The Divergent (Free) and The Divergent (Pro) indicators please see the linked pages.
If you have any questions, don't hesitate to reach out to us either via our website or via the comment section below.
If you found value in this article please give it a thumbs up!
Thank you!
POW Edge Reversal is HERE 🚀🚀🚀🚀🚀🚀🚀We've been sharing ideas on this strategy for quite some time now as part of our 'forward testing' approach and log.
In this video, I run through the strategy, how it works and how it can help.
Everything we do at POW is based on 'proof it works' - this is no different and you'll see this in the data I run through for you.
Any questions about gaining access please drop me a DM on here.
This just shows how powerful Pine script is - to automate a strategy and confirm you have an edge in the market.
Removing stress, decisions, overwhelm and all of the emotional struggles trading can bring.
Let me know in the comments what you think please - be nice right 😅?
Please scroll through some of my previous ideas to see some trades in action.
Regards
Darren
Slow progress on the DOGE Coin.While new ideas are great, it is also important to follow up with any results. Here in accordance with the slow move and due to pressure, we traced a new trend line. That, show the little progress and again, pressure as a resistance. We then understand, that it is also important to look for a watch of a break of some kind, when it will happen. The more sell signals shown, the more resistance, the opposite for support.
For educational purposes only and not intended a financial advice of any kind.
What DOGE coin was up to, today.On this 15 min chart, we can see how DOGE Coin has been moving a little lower. Also, its volume, where buyers and sellers take action, so the chart shows up that reaction to the marker. We can assign warnings or positions to take accordingly.
For educational purposes only and not intended as a financial advice of any kind.
A "Welcome to" Pinescript coding, Part 3In this lesson, the third in the series, I'll show you how to write a "non-overlay" script.
These sit below or above the price chart. They are best for cases where the values the indicator generates are nowhere near the price.
Trying to plot a value of 100 on a chart where the price is 42,000 is pretty pointless, after all!






















