3Commas BotBjorgum 3Commas Bot 
 A strategy in a box to get you started today 
With 3rd party API providers growing in popularity, many are turning to automating their strategies on their favorite assets. With so many options and layers of customization possible, TradingView offers a place no better for young or even experienced coders to build a platform from to meet these needs. 3Commas has offered easy access with straight forward TradingView compatibility. Before long many have their brokers hooked up and are ready to send their alerts (or perhaps they have been trying with mixed success for some time now) only they realize there might just be a little bit more to building a strategy that they are comfortable letting out of their sight to trade their money while they eat, sleep, etc. Many may have ideas for entry criteria they are excited to try,  but further questions arise... "What about risk mitigation?" "How can I set stop or limit orders?" "Is there not some basic shell of a strategy that has laid some of this out for me to get me going?"
Well now there is just that. This strategy is meant for those that have begun to delve into the world of algorithmic trading providing a template that offers risk defined positions complete with stops, limit orders, and even trailing stops should one so choose to employ any of these criteria. It provides a framework that is easily manipulated (with some basic working knowledge of pine coding) to encompass ones own ideas and entry criteria, while also providing an already functioning strategy. 
  
The default settings have a basic 1:1 risk to reward ratio, which sets a limit and a stop equal distance from the entry. The entry is a simple MA cross (up for long, down for short). There a variety of MA's to choose from and the user can define the lengths of the averages. The ratio can be adjusted from the menu along with a volatility based adder (ATR) that helps to distance a stop from support or resistance. These values are calculated off the swing low/high of the user defined lookback period. Risk is calculated from position entry to stop, and projected upwards to the limit as a function of the desired risk to reward ratio. Of note: the default settings include 0.05% commissions. Competitive commissions of the leading cryptocurrency exchanges are .1% round trip (one buy and one sell) for market orders. There is also some slippage to allow time for alerts to be sent and orders to fill giving the back test results a more accurate representation of real time conditions. Its recommended to research the going rates for your exchange and set them to default for the strategy you use or build. 
 To get started a user would: 
1) Make a copy of the code and paste in their bot keys in the area provided under the "3Comma Keys" section
         - eg. Long bot "start deal" copied from 3commas in to define "Long" etc. (code is commented)
2) Place alert on desired asset with desired settings ensuring to select "Order fills and alert() function calls"
3) Paste webhook into the webhook box and select webhook URL alerts (3rd party provided webhook)
3) Delete contents of alert message box and replace with {{strategy.order.alert_message}} and nothing else
       - the codes will be sent to the webhook appropriately as the strategy enters and exits positions. Only 1 alert is needed  
 settings used for the display image:  
1hr chart on BTCUSD 
-ATR stop
-Risk adjustment 1.2
-ATR multiplier 1.3
-RnR 0.6
-MAs HEMA/SMA
-MA Length 50/100
-Order size percent of equity 
-Trail trigger 60% of target
Experiment with your own settings on your crypto of choice or implement your own code!
  
 Implementing your trailing stop (optional) 
Among the options for possible settings is a trailing stop. This stop will ratchet higher once triggered as a function of the Average True Range (ATR). There is a variable level to choose where the user would like to begin trailing the stop during the trade. The level can be assigned with a decimal between 0 and 1 (eg. 0.5 = 50% of the distance between entry and the target which must be exceeded before the trail triggers to begin). This can allow for some dips to occur during the trade possibly keeping you in the trade for longer, while potentially reducing risk of drawdown over time. The default for this setting is 0 meaning unless adjusted, the trail will trigger on entry if the trailing stop exit method is selected.  An example can be seen below: 
  
Again, optional as well is the choice to implement a limit order. If one were to select a trailing stop they could choose not to set a limit, which could allow a trail to run further until hit. Drawdowns of this strategy would be foregoing locking gains at highs on target on other trades. This is a trade-off the user can decide on and test. An example of this working in favor can be observed below:
  
 Conclusion 
Although a simple strategy is implemented here, the benefits of this script allow a user a starting platform to build their strategies from with built in risk mitigation. This allows the user to sidestep some of the potential difficulties' that can arise while learning Pine and taking on the endeavor of automating their trading strategies. It is meant as an aid, a structure, and an educational piece that can be seen as a "pick-up-and-go" strategy with easy 3Commas compatibility. Additionally, this can help users become more comfortable with strategy alert messages and sending strings in the form of alerts from Pine. As well, FAQs are often littered with questions regarding "strategy.exit" calls, how to implement stops. how to properly set a trailing stop based on ATR, and more. The time this can save an individual to get started is likely of the best "take-aways" here. 
Happy trading 
Cari dalam skrip untuk "one一季度财报"
Harmonic Trading System Educational (Source Code)This indicator was intended as educational purpose only for Harmonic Patterns using XABCD Pattern Tool.
This indicator was build upon Harmonic Trading : Volume One and Harmonic Trading : Volume Three, written by Scott M Carney.
Harmonic Trading System consist of 3 important elements such as Trade Identification, Trade Execution and Trade Management, each of these element description can be hover at each label.
 Harmonic Trading System 
1. Trade Identification
This technique use historically proven and repetitive price patterns that focus on overbought and oversold signals generated by price action.
Understanding parameters is critical to define specific opportunities based on individual harmonic pattern including ratio is important.
2. Trade Execution
During harmonic pattern is complete, must focus actual trade within specific time period.
3. Trade Management
Specific Initial Price Objective (IPO) based on risk and opportunity.
 Indikator ini bertujuan sebagai pendidikan sahaja untuk Harmonic Pattern menggunakan XABCD Pattern Tool.
Indikator ini dibina berdasarkan buku Harmonic Trading : Volume One dan Harmonic Trading : Volume Three, ditulis oleh Scott M Carney.
Harmonic Trading System mengandungi 3 element penting seperti Trade Identification, Trade Execution dan Trade Management, penerangan setiap elemen boleh didapati dengan meletak mouse pada label.
 Harmonic Trading System 
1. Trade Identification
Teknik ini menggunakan price patterns yang berulang dan sejarahnya terbukti yang fokus pada signal overbought dan oversold terhasil daripada price action.
Memahami parameter adalah penting untuk mengenalpasti peluang secara spesifik berdasarkan harmonic patern yang tertentu termasuk ratio adalah penting.
2. Trade Execution
Semasa harmonic pattern adalah lengkap, mestilah focus pada trade yang sebenar dalam jangka masa yang spesifik.
3. Trade Management
Initial Price Objective (IPO) secara spesifik berdasarkan risiko dan peluang. 
Indicator features :
1. List XAB=CD patterns including ratio and reference page.
2. For desktop display only, not for mobile.
3. Hover to label to display tooltip (example Trade identification).
 Kemampuan indikator :
1. Senarai XAB=CD pattern termasuk ratio and rujukan muka surat.
2. Untuk paparan desktop sahaja, bukan untuk mobile.
3. Letak mouse pada labell untuk memaparkan tooltip (example Trade identification). 
 FAQ 
1. Credits /  Kredit 
Scott M Carney, Harmonic Trading : Volume One
Scott M Carney, Harmonic Trading : Volume Three
2. Pattern and Chapter involved /  Pattern dan Bab terlibat 
Bullish Harmonic Trade Management Model - Harmonic Trading: Volume One   - Page 209
Bearish Harmonic Trade Management Model - Harmonic Trading: Volume One   - Page 220
The Harmonic Trading Process            - Harmonic Trading: Volume Three - Page 42 to 44
Bullish Phases of Trading               - Harmonic Trading: Volume Three - Page 48
Bearish Phases of Trading               - Harmonic Trading: Volume Three - Page 50
3. Code Usage /  Penggunaan Kod 
Free to use for personal usage but credits are most welcomed especially for credits to Scott M Carney.
 Bebas untuk kegunaan peribadi tetapi kredit adalah amat dialu-alukan terutamanya kredit kepada Scott M Carney. 
Bullish Harmonic Trading System
  
Bearish Harmonic Trading System
  
Supertrend with Percent Difference from CloseThis script improves the Supertrend indicator by displaying a label that shows the percent difference between the latest closing price & the Supertrend. 
This comes in handy when one is using the Supertrend value as a stoploss level. For instance, one would like to have a maximum stop loss level of 8%. Instead of calculating how much percent the price is away from the Supertrend, one can look at the percent label & make an informed decision as to whether initiating a position would have favourable risk/reward or not.
Another utility would be selling into strength when one is using the Supertrend as a trailing stop loss. For instance, if the price is a certain percentage far away from the Supertrend, one may conclude that the price is now extended & either price correction or time correction would ensue, & decide to sell into strength. 
Volume Indicators PackageCONTAINS 3 OF MY BEST VOLUME INDICATORS ALL FOR THE PRICE OF ONE!
CONTAINS:
Average Dollar Volume in RED 
Up/Down Volume Ratio in Green 
Volume Buzz/Volume Run Rate in BLUE
If you would like to get these individually, I also have scripts for that too.
Below is information about all three of these indicators, what they do, and why they are important.
---------------------------------------------------------------------------------------------AVERAGE DOLLAR VOLUME----------------------------------------------------------------------------------------
Dollar volume is simply the volume traded multiplied times the cost of the stock.
Dollar volume is an extremely important metric for finding stocks with enough liquidity for market makers to position themselves in. Market Liquidity is defined as market's feature whereby an individual or firm can quickly purchase or sell an asset without causing a drastic change in the asset's price. The key concept you want to understand is that these big instructions with billions of dollars need liquidity in a stock in order to even think about buying it, and therefore these institutions will demand a large dollar volume . A good dollar volume amount, that represents a pretty liquid name, is typically above 100 million $ average. Why are institutions important? Simple because they are the ones who make stocks move, and I mean really move. If you want to see large growth from a stock in a short amount of time, you need institutions wielding billions of dollars to be fighting one another to buy more shares. Institutions are the ones who make or break a stock, this is why we call them market makers.
My script calculates average dollar volume using four averages: the 50, the 30, the 20, and the 10 period. I use multiple averages in order to provide the accurate and up to date information to you. It then selects the minimum of these averages and divides this value by 1 million and displays this number to you.
TL;DR? If you want monster moves from your stocks, you need to pick names with average high liquidity(dollar volume >= $100 million). The number presented to you is in millions of whatever currency the name is traded in.
---------------------------------------------------------------------------------------------UP/DOWN VOLUME RATIO-----------------------------------------------------------------------------------------
Up/Down Volume Ratio is calculated by summing volume on days when it closes up and divide that total by the volume on days when the stock closed down.
High volume up days are typically a sign of accumulation(buying) by big players, while down days are signs of distribution(selling) by big market players. The Up Down volume ratio takes this assumption and turns it into a tangible number that's easier for the trader to understand. My formula is calculated using the past 50 periods, be warned it will not display a value for stocks with under 50 periods of trading history. This indicator is great for identify accumulation of growth stocks early on in their moves, most of the time you would like a growth stocks U/D value to be above 2, showing institutional sponsorship of a stock.
Up/Down Volume value interpretation:
U/D < 1 -> Bearish outlook, as sellers are in control
U/D = 1 -> Sellers and Buyers are equal
U/D > 1 -> Bullish outlook, as buyers are in control
U/D > 2 -> Bullish outlook, significant accumulation underway by market makers
U/D >= 3 -> MONSTER STOCK ALERT, market makers can not get enough of this stock and are ravenous to buy more
U/D values greater than 2 are rare and typically do not last very long, and U/D >= 3 are extremely rare one example I kind find of a stock's U/D peaking above 3 was Google back in 2005.
-----------------------------------------------------------------------------------------------------VOLUME BUZZ-----------------------------------------------------------------------------------------------
Volume Buzz/ Volume Run Rate as seen on TC2000 and MarketSmith respectively.
Basically, the volume buzz tells you what percentage over average(100 time period moving average) the volume traded was. You can use this indicator to more readily identify above-average trading volume and accumulation days on charts. The percentage will show up in the top left corner, make sure to click the settings button and uncheck the second box(left of plot) in order to get rid of the chart line.
RexDog Average with ATRBam-- look what Rex did. A  RexDog Average  with ATR bands-- he's going insane. Simple but powerful.
This indicator includes the RexDog average but provides you with the ability to plot (and customize) both above and below ATR calculated bands.
With this indicator you can display all 3 or any combination of the bands: the RexDog Avg, Adding ATR Upper or the Subtracting ATR Below.
To remove a plot or customize color and line size go to the style options.
Before we get detailed with this version you can customize the default average factor of the RexDog Avg (default is 6). More tips on this below.
 How This Works 
Just as with the  RexDog Average  we take the 6 ATR data points (200, 100, 50, 24, 9, 5). We then create an average by dividing by 6. But wait there's more...
With this indicator you can customize independently the above and below bands via a float value for precision. 6 is the default (you can customize by increments at 0.25 or input value you like 1-20). 
Now this works opposite how you might think but you'll get it once you start changing the numbers. For instance, editing the above band lowering the ATR factor will raise the band.
 RexDog Avg Factor 
With this release you are able to change the default average factor (6) to anything you want. You'll find though going too high or low from the default won't get the best results. The default increment change is 0.1 but you can enter any float value you like between 1-20.
 The Original RexDog Average Overview 
Yes, simple—the  RexDog Average  is a bias moving average indicator. The purpose is to provide the overall momentum bias you should have when trading an instrument. It works across all markets and all timeframes.
Usage:
 
 Price above the RexDog AVG = long momentum bias
 Price below the RexDog AVG = short momentum bias
 With the ATR addition most likely your usage will be similar to Bollinger Bands. While not the same as in deviations much of the same principles might apply, especially with customization.
 
*Note: we have banned the word “trend” in the RexDog Trading Method.
Additional Usage Advice:
If price rips through the average your momentum bias should probably change. 80% of the time when price moves through the RexDog Average it will come back and test the area around average within 1-2 bars. 20% of the time it does not. The momentum is so strong in that direction so look for a 50-70% tests of the bar that impulse through the RexDog Average.
If you are using the RexDog Trading Method by default if the price is above the average and you are short you are in a fade trade. The momentum trade would be long. Of course reverse if price is below.
On multiple time frames. Of course, one timeframe can be long bias and a lower timeframe can be short bias. Which one do you use? Both—if your in a short trade using lower timeframe and with the bias of the average your in a momentum trade—but on the higher timeframe your aware you are essential fading the overall momentum.
Background:
Rex and I searched high and low for one simple thing. A moving average (or combination of some) that we could use to form our momentum bias that worked for all timeframes and all markets we trade.
We tried and tested them all. Even went down the path of ribbons and various other types of hybrid EMA /MA derivatives. Nothing had a high enough accuracy or mathematically was reliable that we could say with a high probability that it was on the right side of the momentum.
We almost stopped and landed on using the true and tested 200 MA—but we found through extensive tests that using the 200MA or EMA you’re often late to the party. Look you don’t need to be the first one in the trade but having a heads up sure helps.
To quote one of the best financial movies of the modern era—Margin Call:
“There are three ways to make a living in this business: be first, be smarter, or cheat… it sure is a hell of a lot easier to be first”. The RexDog Average used properly enables you to be first or damn near close.
Under the Hood:
This is so simple most reading this will discount it. You might even scoff and berate Rex for wasting your time. But you would be wrong. The RexDog Average has been tested across all markets—FOREX, Crypto, Equities, Futures (even tick charts), and even the Penguin population in Antarctica.
The RexDog Average is an average of 6 simple moving averages: 200, 100, 50, 24, 9, 5.
Yes, that’s it.
RexDog AverageYes, simple—the RexDog Average is a bias moving average indicator. The purpose is to provide the overall momentum bias you should have when trading an instrument. It works across all markets and all timeframes.
Usage:
 
 Price above the RexDog AVG = long momentum bias
 Price below the RexDog AVG = short momentum bias
 
*Note: we have banned the word “trend” in the RexDog Trading Method.
Additional Usage Advice:
If price rips through the average your momentum bias should probably change. 80% of the time when price moves through the RexDog Average it will come back and test the area around average within 1-2 bars. 20% of the time it does not. The momentum is so strong in that direction so look for a 50-70% tests of the bar that impulse through the RexDog Average.
If you are using the RexDog Trading Method by default if the price is above the average and you are short you are in a fade trade. The momentum trade would be long. Of course reverse if price is below.
On multiple time frames. Of course, one timeframe can be long bias and a lower timeframe can be short bias. Which one do you use? Both—if your in a short trade using lower timeframe and with the bias of the average your in a momentum trade—but on the higher timeframe your aware you are essential fading the overall momentum.
Background:
Rex and I searched high and low for one simple thing. A moving average (or combination of some) that we could use to form our momentum bias that worked for all timeframes and all markets we trade. 
We tried and tested them all. Even went down the path of ribbons and various other types of hybrid EMA/MA derivatives. Nothing had a high enough accuracy or mathematically was reliable that we could say with a high probability that it was on the right side of the momentum.
We almost stopped and landed on using the true and tested 200 MA—but we found through extensive tests that using the 200MA or EMA you’re often late to the party. Look you don’t need to be the first one in the trade but having a heads up sure helps.
To quote one of the best financial movies of the modern era—Margin Call:
“There are three ways to make a living in this business: be first, be smarter, or cheat… it sure is a hell of a lot easier to be first”. The RexDog Average used properly enables you to be first or damn near close.
Under the Hood:
This is so simple most reading this will discount it. You might even scoff and berate Rex for wasting your time. But you would be wrong. The RexDog Average has been tested across all markets—FOREX, Crypto, Equities, Futures (even tick charts), and even the Penguin population in Antarctica.
The RexDog Average is an average of 6 simple moving averages: 200, 100, 50, 24, 9, 5.
Yes, that’s it.
The RexDog Average Plus will be released soon with additional parameters and most likely upper and lower bounds. In addition, we are working on a hybrid RexDog Exponential Average.
Bear & Bull Zone Signal StrategySince I love to mix and match, here is something fresh and that actually works on the breakout of Ethereum without losing your ass on lagging indicators. 
It blends some of the nice parts of my previous scripts while moving to big boy pants with a twist on the Fibonacci retracement using SMA and EMA at multiple levels to do a sanity check. 
Is it too good to be true? Nope, just what happens when a Solution Architect starts messing around with crypto and applies engineering and mathematics to the mix. You get a strategy that really doesn't have high profit losses when you tweak it just the right way. 
What's the right tweak you ask? 
1. Start with a 30 minute timeframe and set your window start date to the date the market began the bear or bull run
2. Make sure you can see your strategy performance window (not the graph one)
3. Set Stop Loss and Target Profit to 50%
4. Use your mouse wheel or up and down arrows and mess around with the RSI, go down one at a time but no lower than 7. Whichever value displayed the highest long or short gain is the one to pick. 
5. Now select long or short only based on whichever one shows the highest gain. 
6. Now go to K and D, leave K as 3 and check what happens when D is 4 or 5. Leave D at the value that gives you the highest gain. 
7. Now go to EMA Fast and Slow Lengths. Leave Fast at 5 and check what happens when the Slow is moved up to 11 or 12, do the gains go up. If not, check what happens when Slow is moved down to 9, 8, or 7. Whichever gives you the highest gain, leave it there. Now go mess with the fast length, keep in mind that fast must always be less than slow. So check values down to 3 and up to 6. Same concept, mo money...leave it be. 
8. Now go mess with the Target Profit, I start at 5, hit enter, then go to 7, hit enter, then 9...up by 2 until I get to 21 to make sure I don't hastily pick a low one and always keep in mind between which values the gain switched from high to low. For example, in this example I published at 11 it was $5k and at 13 it was $3700 for the gains. So after I got up to 21 I went back to 11 and started going up by 0.01 steps until the value dropped, which was at 11.19 so I set it at 11.18. 
9. Now stop loss is trickier, you've maximized the gains, which means if you set the stop loss at a low value you will sacrifice gains. Typically by this point your loss is less than 10% with this script. So, my approach is to find the value where the stop loss doesn't change what I've tweaked already. In this example, I did the same start at 5 and go up by 2 and saw that when I went to 17 it stopped changing. So I started going back down by 0.5 and saw at 15.5 the gains went lower again. Now I started going back up in steps of 0.01 and at 15.98 it went back to the high gain I already tweaked for. I kept stop loss there and unleashed the strategy on ETH. 
So far so good, no bad trades and it's been behaving pretty well. 
Price/Volume Trend MeterAnother simple indicator from the sweet indicator series, This is a combination of the Volume and Price Trend Meter indicators combined (Links below) into one indicator called PVTM (Price Volume Trend Meter). 
PVTM measures the strength of price and volume pressure on a histogram. 
The indicator sums up all green candles price and volume and red candles price and volume over a specific period of bars and plots based on  Price summed value. The result will look similar to Price Trend Meter with the benefit of trying to filter out more noise.
Use this indicator to identify the increasing asset of price and volume with the green candles (Close is higher than open) and decreasing of price and volume with the red candles (Close is lower than open).
 ======= Calculation ==========
Bright Green Color Column: Total summed up Price and Volume are higher than 0.
Bright Red Color Column: Total summed up Price and Volume are Lower than 0.
Weak Green Color Column: Conflict between Price and Volume (One positive and one negative) so we continue based on previous color .
Weak Red Color Column: Conflict between Price and Volume (One positive and one negative)  so we continue based on previous color.
  ======= Price/Volume Trend Meter Colors =======
Green: Increasing buying pressure. 
Weaker Green: Declining Buying pressure (Possible Sell Reversal).
Red: Increasing selling pressure.
Weaker Red: Declining Selling pressure (Possible Buy Reversal).
Other sweet indicators that this indicator is based on:
Volume Trend Meter: 
Price Trend Meter: 
Like if you Like and Follow me for upcoming indicators/strategies: www.tradingview.com
Squeeze Momentum [Plus]The "Momentum" in this indicator is smoothed out using linear regression. The Momentum is what is displayed on the indicator as a histogram, its purpose is obvious (to show momentum).
What is a Squeeze? A squeeze occurs when Bollinger Bands tighten up enough to slip inside of Keltner Channels .
This is interpreted as price is compressing and building up energy before releasing it and making a big move.
Traditionally, John Carter's version uses 20 period SMAs as the basis lines on both the BB and the KC.
In this version, I've given the freedom to change this and try out different types of moving averages.
The original squeeze indicator had only one Squeeze setting, though this new one has three.
The gray dot Squeeze, call it a "low squeeze" or an "early squeeze" - this is the easiest Squeeze to form based on its settings.
The orange dot Squeeze is the original from the first Squeeze indicator.
And finally, the yellow dot squeeze, call it a "high squeeze" or "power squeeze" - is the most difficult to form and suggests price is under extreme levels of compression.
Now to explain the parameters:
Squeeze Input - This is just the source for the Squeeze to use, default value is closing price.
Length - This is the length of time used to calculate the Bollinger Bands and Keltner Channels .
Bollinger Bands Calculation Type - Selects the type of moving average used to create the Bollinger Bands .
Keltner Channel Calculation Type - Selects the type of moving average used to create the Keltner Channel.
Color Format - you to choose one of 5 different color schemes.
Draw Divergence - Self explanatory here, this will auto-draw divergence on the indicator.
Gray Background for Dark Mode - to make them more visually appealing.
Added ADX (Average Directional Index) that measure a trend’s strength. The higher the ADX value, the stronger the trend. The ADX line is white when it has a positive slope, otherwise it is gray. When the ADX has a very large dispersion with respect to the momentum histogram, increase the scale number.
Added "H (Hull Moving Average) Signal". Hull is a extremely responsive and smooth moving average created by Alan Hull in 2005. Have option to chose between 3 Hull variations.
Added "Williams Vix Fix" signal. The Vix is one of the most reliable indicators in history for finding market bottoms. The Williams Vix Fix is simply a code from Larry Williams creating almost identical results for creating the same ability the Vix has to all assets.
The VIX has always been much better at signaling bottoms than tops. Simple reason is when market falls retail traders panic and increase volatility, and professionals come in and capitalize on the situation. At market tops there is no one panicking... just liquidity drying up. 
The FE green triangles are "Filtered Entries"
The  AE green triangles are "Aggressive Filtered Entries"
Ultimate Multi-MACD - Early Warnings + Main TrendThis is a set of a bunch of moving averages. Unique, huh? Right. Awesome. Dope.
So, what's cool about this set, is its usability as not just one MACD, but a pair of MACDs specifically tuned to keep you hard. Some of you probably notice already just looking at the available MAs and lengths - there are some common pairs here. But what do you get when you combine all these common pairs that share bases? You get both short and long term plays out of it. The thing MACDs aren't supposed to do. I imagine it would be hard to make a backtestable/bottable script version of this, because the main thing is you have to use your gut a little bit in determing when to take a short term play and when to keep to the long term plays.
In this set, you get 3 TEMAs, 2 VWMAs, 2 SMAs, and 2 ALMAs. Yeah. That's almost TOO phat. I know. Whatever.
The two purple/pink lines are your 25 VWMA and 50 ALMA slow lines. These will be your main slow lines. They're usually close but move around a decent bit and if you want you could make buys and sales using the Alma crossing above the VWMA as a buy and sell crossing under.
Then you have a THIRD potential slow line on your dark green 50 TEMA. You generally use either the 13 or 21 TEMA crossing up as buy and down as sell. The signal TEMAs are bright green 13 and yellow 21.
Next you have all your Fast signal MAs! A peachy 10 VWMA, 13 green TEMA, 21 yellow TEMA, 10 teal/bright blue ALMA and last but not least, two pale SMAs at 5 and 10. The 5 could even be used as a signal against the 10 if you really want. There are countless options for buy and sell signals. Hide and show the ones that work the best on the chart you're trading on. Different ones will work different times. Why not see which ones are working BEST out of all the best ones, though?
Please leave other MA pairs that you would like added in future versions. If I do make a future version with more pairs I will very likely set default to hide some
Enjoy.
BOSCILLATOR. A BOSS OSCILLATORI would like to first say I do not the indicator pieces. Would like to personally give thanks and credit to @MarkBench for coding this indicator and helping to get my vision for this system finally able to be published and used by anyone. I would also like the thank @lazy bear and @ChrisMoody for their bringing the Firefly oscillator and the SCHAFF TREND and the PPO price percentage oscillator to trading view. and @scilentor for his version of Godmode with LSMA . Thanks to @Shizaru for bringing Frama moving average (which we have adopted into the PPO as one of the base selections for the first time, as well as the ALMA ). Divergences have also been added. and components of the firefly have been removed such as the histogram. I have added two oscillators in the picture. The bottom is the standard settings. The above is how I prefer mine to look after tweaking the settings.
Before I get into explaining how its used. I want to say all the indicators are open and none privately owned or at least owned by indivduals who brought them to trading view. Any due permission is granted at my disclocsure.  I also want to say this is not your typical mashup of indicators as the is a very clear way to view and use this specifically.  Also I want to say original tools from their original scripts are also improved. For example the PPO being used we have added the FRAMA and ALMA moving average basis option which it did not have before. And now everything has clear divergences and some other minor changers. but here are the rules and examples. 
THE BOSCILLATOR - A MULTI-LEVEL CONFLUENCE/CONFIRMATION FILTER VISUALIZATION
Some shorthand
(Main oscillator - firefly)
(background wave thing - PPO )
(the red vertical up and down line with red and green dots - STC )
(the blue, yellow and red dots - warning dots)
WHO IS THIS INDICATOR FOR? - This indicator itself is not meant to be a signal giver to buy or sell right now even though it could be and some of the original scripts are used as such. This indicator is actually meant to be a VISUAL CONFIRMATION & FILTER for trades taken in other methods outside of this indicator. What are some of those methods that may benefit from having this? Pivot point traders, FIB traders, Bollinger band traders, Moving average traders.. just to name a few. This indicator itself is meant to in a quick glance allow the trade to see the condition of many different elements outside of the main price and chart, and determine if that trade looks like it has too much risk, or if that trade looks suitable. It also provides a series of confirmations that could be used for adding to a position at different levels at the trade's discretion.
OPTIMAL CONDITIONS FOR CONSIDERING A SHORT = The PPO is orange/red + the STC is at the TOP + the Firefly is above the midline. The warning dots are being printed at the top. There is regular or hidden bearish divergence present.
OPTIMAL CONDITIONS FOR CONSIDERING A LONG = The PPO is light/dark green + the STC is at the BOTTOM + the Firefly is below the midline. The warning dots are being printed at the bottom. There is regular or hidden bullish divergence present.
Triggers for scaling/adding into your position = Keeping in mind that this oscillator on its own is not meant to be the sole reason for taking a trade, here are some triggers you will see for getting into position (preferably with the optimal conditions being met) The firefly flips from a green line into a red slide and vise versa. The firefly crosses the midline up or down. The STC begins going up/down and triggers a green or red dot while crossing one of the levels at 20 or 80. The warning dots being made begin to be printed lower/higher than the dot before last. The PPO shift from one color to the next in the favored direction of the trade you wish to make.
Signs for taking profit and protecting your trade = The Dots begin to print, the PPO changes colors at the top or bottom. the STC arrived are the top.
FILTER SITUATIONS TO AVOID TRADES = Wise to not take a trade if the PPO and the firefly do not agree. For example - if the PPO is showing green yet the firefly is still red may be an indication that it is getting a bit late for you to enter the trade. Same with opposing divergences and warning dots contradicting the trade you are looking at. The STC being already on the bottom or top may be a small indication that trade may already have been a little too ripe, but on its own is not always the case.                                 
  When selecting the PPO settings and moving average you are going to want it to be in favor of what you are trying to accomplish.IF you are one low time frames and trying to swing or scalp trade... chances are you want a reactive MA setting that iss responsive.  Iwould recommend the HULL, ALMA, TEMA DEMA.  For the Higher time frame the EMA or the T3 WDma can be wuite patient and helpful for a constant reminder of caution
Some notes - for the swing and scalp trading... in my experience the PPO moving average basis sees more responsive changes with the FRAMA , ALMA , HULL settings. for entering a trade, at least a couple of your triggers being present increases the success rate by a lot.
  This chart illustrates the usefullness of having a Zero lag function for the firefly. The firefly should not be taken for signals or trades itself. However it is the most precise finder of divergences within the system. It is aways good to flip on and off zero lag just to take a quick look for divergences you might have mixed.
      In this chart illustrates the general visual look and order of events to guide you along your way. Starts with the PPO turning green or red or orange which is potentially time to get out of your current trade. Then it switched colors when reversal begins and that is when you want to at the same time see the STC, the firefly, and lower caution dots coming in around the same area (highlighted in blue squares).   Now near the end you see a red box. This is a filter aspect. The PPO is green, yet the others are saying down/short.  This does not mean it must be a long, however it is great warning to maybe avoid getting to bearish for the downside in that time. You want the PPO and line up with the others and it should be visually apparent that they all want to go the same way.
Here is a list of some key elements (before changes this script made) of parts this oscillator includes. My original publication of my oscillation setup was blocked by the mods here.. this one however includes a large variety of items that have been altered from their original formats and a well-explained trading system to use it with.
// Firefly
Firefly Oscillator  
// PPO
PPO PercentileRank Mkt Tops & Bottoms (@PuppyTherapy)
// Divergence
Divergence Indicator (any oscillator)
// Godmode
Godmode3.2+LSMA
// Schaff
Schaff Trend Cycle
// Frama
(FRAMA) Fractal Adaptive Moving Average
Random Synthetic Asset GenerationThis script generates  pseudo-random asset data . Due to the nature of the random generator, it is  impossible to use this indicator as input for other indicators  because the instance of the script that the indicator is applied to will automatically be different from the instance that is plotted on the chart. Therefore, the idea is to use this script in other scripts (to make it possible to backtest on random data, for example).
The script has four main input parameters.
 
 Random Number Generator Method:  It supports two methods for generating the pseudo-random numbers (one by Ricardo Santos and one by Wichmann-Hill).
 Seed:  You can specify the seed to use. Each unique seed will generate a unique set of pseudo-random data.
 Intrabar Volatility:  This basically sets how volatile the generated wicks will be (0 = no wicks).
 Price Multiplier:  This is just a multiplier for the generated price data, so that you can scale up or down the generated price data.
 
You can also change the colors of the bars.
In addition to this, the indicator also generates random volume. In order to make it possible to show both volume and price, you need to have two identical instances of the indicator. One on the chart, and one in its own panel. Then, go into the Style tab in the indicator settings on the instance in the panel. Untick Up-Candles and  Down-Candles  boxes, and tick the  Volume  box.
In a similar manner, you can also plot the  true range  data and the candle  change  data as well, by ticking one of those boxes instead.
ma sorter ('sort by array' example)- JD////////////////////////////////////////////////////////////////
//////////////// ma sorter / Array sorting function //////////////////
////////////////////////////////////////////////////////////////
This script gives an example how you can sort the items in one array, by using the values in another array.
In the example here, we want to sort moving averages of different lengths by there values
as we don't have mixed arrays (yet) in Pinescript, one solution could be to store this in 2 arrays:
     - one (string) array to store the ma names
     - one (float)  array to store the ma values
The "f_sort_by_array( )" function in this script allows you to sort the ma names by using the ma values
and sorts the two arrays together, as if the were one 2D matrix, where the rows are sorted.
With the "f_sort_by_array" function, both the (string) array1 and array2 are sorted by the values of array2, the function returns the two sorted arrays.
IMPORTANT NOTE: the output has to be stored in TWO NEW (sorted) ARRAYS, Pinescript doesn't allow function arguments to be modified by the function itself
                            this is why the output goes to ma_names_sorted and not ma_names !!!!
Feel free to use this function in your scripts to get more contorl over your arrays.
Gr, JD.
Relative Volume at Time█  OVERVIEW 
This indicator calculates relative volume, which is the ratio of present volume over an average of past volume.
It offers two calculation modes, both using a time reference as an anchor.
                                        
█  CONCEPTS 
 Calculation modes 
The simplest way to calculate relative volume is by using the ratio of a bar's volume over a simple moving average of the last  n  volume values. 
This indicator uses one of two, more subtle ways to calculate both values of the relative volume ratio:  current volume:past volume . 
The two calculations modes are:
 1 —  Cumulate from Beginning of TF to Current Bar  where:
    current volume  = the cumulative volume since the beginning of the timeframe unit, and
    past volume  = the mean of volume during that same relative period of time in the past  n  timeframe units.
 2 —  Point-to-Point Bars at Same Offset from Beginning of TF  where:
    current volume  = the volume on a single chart bar, and
    past volume  = the mean of volume values from that same relative bar in time from the past  n  timeframe units.
 Timeframe units 
Timeframe units can be defined in three different ways:
 1 — Using Auto-steps, where the timeframe unit automatically adjusts to the timeframe used on the chart:
    — A 1 min timeframe unit will be used on 1sec charts,
    — 1H will be used for charts at 1min and less,
    — 1D will be used for other intraday chart timeframes,
    — 1W will be used for 1D charts,
    — 1M will be used for charts at less than 1M,
    — 1Y will be used for charts at greater or equal than 1M.
 2 — As a fixed timeframe that you define.
 3 — By time of day (for intraday chart timeframes only), which you also define. If you use non-intraday chart timeframes in this mode, the indicator will switch to Auto-steps.
 Relative Relativity 
A relative volume value of 1.0 indicates that  current volume  is equal to the mean of  past volume , but how can we determine what constitutes a high relative volume value? 
The traditional way is to settle for an arbitrary threshold, with 2.0 often used to indicate that relative volume is worthy of attention.
We wanted to provide traders with a contextual method of calculating threshold values, so in addition to the conventional fixed threshold value, 
this indicator includes two methods of calculating a threshold  channel  on past relative volume values:
 1 — Using the standard deviation of relative volume over a fixed lookback.
 2 — Using the highs/lows of relative volume over a variable lookback.
Channels calculated on relative volume provide meta-relativity, if you will, as they are relative values of relative volume.
█  FEATURES 
Controls in the "Display" section of inputs determine what is visible in the indicator's pane. The next "Settings" section is where you configure the parameters used in the calculations. The "Column Coloring Conditions" section controls the color of the columns, which you will see in three of the five display modes available. Whether columns are plotted or not, the coloring conditions also determine when markers appear, if you have chosen to show the markers in the "Display" section. The presence of markers is what triggers the alerts configured on this indicator. Finally, the "Colors" section of inputs allows you to control the color of the indicator's visual components.
 Display 
Five display modes are available:
 •  Current Volume Columns : shows columns of  current volume , with  past volume  displayed as an outlined column.
 •  Relative Volume Columns : shows relative volume as a column.
 •  Relative Volume Columns With Average : shows relative volume as a column, with the average of relative volume.
 •  Directional Relative Volume Average : shows a line calculated using the average of +/- values of relative volume. 
  The positive value of relative volume is used on up bars; its negative value on down bars.
 •  Relative Volume Average : shows the average of relative volume.
A Hull moving average is used to calculate the average used in the three last display modes.
You can also control the display of:
 • The value or relative volume, when in the first three display modes. Only the last 500 values will be shown.
 • Timeframe transitions, shown in the background.
 • A reminder of the active timeframe unit, which appears to the right of the indicator's last bar.
 • The threshold used, which can be a fixed value or a channel, as determined in the next "Settings" section of inputs.
 • Up/Down markers, which appear on transitions of the color of the volume columns (determined by coloring conditions), which in turn control when alerts are triggered.
 • Conditions of high volatility.
 Settings 
Use this section of inputs to change:
 •  Calculation mode : this is where you select one of this indicator's two calculation modes for  current volume  and  past volume , as explained in the "Concepts" section.
 •  Past Volume Lookback in TF units : the quantity of timeframe units used in the calculation of  past volume .
 •  Define Timeframes Units Using : the mode used to determine what one timeframe unit is. Note that when using a fixed timeframe, it must be higher than the chart's timeframe.
  Also, note that time of day timeframe units only work on intraday chart timeframes.
 •  Threshold Mode : Five different modes can be selected:
   —  Fixed Value : You can define the value using the "Fixed Threshold" field below. The default value is 2.0.
   —  Standard Deviation Channel From Fixed Lookback : This is a channel calculated using the simple moving average of relative volume
    (so not the Hull moving average used elsewhere in the indicator), plus/minus the standard deviation multiplied by a user-defined factor.
    The lookback used is the value of the "Channel Lookback" field. Its default is 100.
   —  High/Low Channel From Beginning of TF : in this mode, the High/Low values reset at the beginning of each timeframe unit.
   —  High/Low Channel From Beginning of Past Volume Lookback : in this mode, the High/Low values start from the farthest point back where we are calculating  past volume , 
    which is determined by the combination of timeframe units and the "Past Volume Lookback in TF units" value.
   —  High/Low Channel From Fixed Lookback : In this mode the lookback is fixed. You can define the value using the "Channel Lookback" field. The default value is 100.
 •  Period of RelVol Moving Average : the period of the Hull moving average used in the "Directional Relative Volume Average" and the "Relative Volume Average".
 •  High Volatility  is defined using fast and slow ATR periods, so this represents the volatility of price. 
  Volatility is considered to be high when the fast ATR value is greater than its slow value. Volatility can be used as a filter in the column coloring conditions.
 Column Coloring Conditions 
 • Eight different conditions can be turned on or off to determine the color of the volume columns. All "ON" conditions must be met to determine a high/low state of relative volume,
  or, in the case of directional relative volume, a bull/bear state.
 • A volatility state can also be used to filter the conditions.
 • When the coloring conditions and the filter do not allow for a high/low state to be determined, the neutral color is used.
 • Transitions of the color of the volume columns determined by coloring conditions are used to plot the up/down markers, which in turn control when alerts are triggered.
 Colors 
 • You can define your own colors for all of the oscillator's plots.
 • The default colors will perform well on light or dark chart backgrounds.
 Alerts 
 • An alert can be defined for the script. The alert will trigger whenever an up/down marker appears in the indicator's display.
  The particular combination of coloring conditions and the display settings for up/down markers when you create the alert will determine which conditions trigger the alert.
  After alerts are created, subsequent changes to the conditions controlling the display of markers will not affect existing alerts.
 • By configuring the script's inputs in different ways before you create your alerts, you can create multiple, functionally distinct alerts from this script.
  When creating multiple alerts, it is useful to include in the alert's message a reminder of the particular conditions you used for each alert.
 • As is usually the case, alerts triggering "Once Per Bar Close" will prevent repainting.
 Error messages 
Error messages will appear at the end of the chart upon the following conditions:
 • When the combination of the timeframe units used and the "Past Volume Lookback in TF units" value create a lookback that is greater than 5000 bars. 
  The lookback will then be recalculated to a value such that a runtime error does not occur.
 • If the chart's timeframe is higher than the timeframe units. This error cannot occur when using Auto-steps to calculate timeframe units.
 • If relative volume cannot be calculated, for example, when no volume data is available for the chart's symbol.
 • When the threshold of relative volume is configured to be visible but the indicator's scale does not allow it to be visible (in "Current Volume Columns" display mode).
█  NOTES 
 For traders 
The chart shown here uses the following display modes: "Current Volume Columns", "Relative Volume Columns With Average", "Directional Relative Volume Average" and "Relative Volume Average". The last one also shows the threshold channel in standard deviation mode, and the TF Unit reminder to the right, in red.
Volume, like price, is a value with a market-dependent scale. The only valid reference for volume being its past values, any improvement in the way past volume is calculated thus represents a potential opportunity to traders. Relative volume calculated as it is here can help traders extract useful information from markets in many circumstances, markets with cyclical volume such as Forex being one, obvious case. The relative nature of the values calculated by this indicator also make it a natural fit for cross-market and cross-sector analysis, or to identify behavioral changes in the different futures contracts of the same market. Relative volume can also be put to more exotic uses, such as in evaluating changes in the popularity of exchanges.
Relative volume alone has no directional bias. While higher relative volume values always indicate higher trading activity, that activity does not necessarily translate into significant price movement. In a tightly fought battle between buyers and sellers, you could theoretically have very large volume for many bars, with no change whatsoever in bid/ask prices. This of course, is unlikely to happen in reality, and so traders are justified in considering high relative volume values as indicating periods where more attention is required, because imbalances in the strength of buying/selling power during high-volume trading periods can amplify price variations, providing traders with the generally useful gift of volatility.
Be sure to give the "Directional Relative Volume Average" a try. Contrary to the always-positive ratio widely used in this indicator, the "Directional Relative Volume Average" produces a value able to determine a bullish/bearish bias for relative volume.
Note that realtime bars must be complete for the relative volume value to be confirmed. Values calculated on historical or elapsed realtime bars will not recalculate unless historical volume data changes.
Finally, as with all indicators using volume information, keep in mind that some exchanges/brokers supply different feeds for intraday and daily data, and the volume data on both feeds can sometimes vary quite a bit.
 For coders 
Our script was written using the  PineCoders Coding Conventions for Pine .
The description was formatted using the techniques explained in the  How We Write and Format Script Descriptions  PineCoders publication.
Bits and pieces of code were lifted from the  MTF Selection Framework  and the  MTF Oscillator Framework , also by PineCoders.
█  THANKS 
Thanks to  dgtrd  for suggesting to add the channel using standard deviation.
Thanks to  adolgov  for helpful suggestions on calculations and visuals.
 Look first. Then leap.  
|AG| VWAP ANALYSIS|AG| VWAP ANALYSIS
The volume-weighted average price (VWAP) is a trading benchmark used by traders that gives the average price security has traded throughout the day, based on both volume and price. 
It is important because it provides traders with insight into both the trend and value of the security. 
VWAP is calculated by adding up the $ traded for every transaction (price multiplied by the number of shares traded) and then dividing by the total shares traded.
A detailed formula and calculations could be found here:
-> fanf2.user.srcf.net 
Actually, TradingView has an option for Anchored Vwap is a really good implementation for specific analysis.
The following script takes into account the #Time_Period_Change and plots the VWAP calculation.
The #Time_Period Available for this script are:
     -> Day
     -> Week
     -> Monthly
     -> Quarter
     -> Year
1. The option that we have is the SOURCE:
     -> HLC3 (High, Low, Close)/3 is the right way to calculate VWAP. 
     -> But I included other traditional options:
            -> open, high, low, close, hl2, hlc3, ohlc4
2. The option of Turn ON/OFF VWAP
     -> Timeframe selection:
         -> All, 1. Day, 2. Week, 3. Month, 4. Quarter, 5. Year, 6. >=Weekly, 7. >=Montlhy
          -> With this, we could select the time for plotting the VWAP. And some cool features such as >= that we are going to plot different Timeframes VWAP calculations.
     -> Vwap Label:
          -> We could select if show labels or not
3. The option of Turn ON/OFF Previous VWAP Level
     -> VWAP of one selected Time Period is going to end with a final price this level most of the time is retested and gives us a good opportunity for entry into one trade.
        Or could be used as Stop Loss.
          -> Timeframe selection:
               -> 1. Day, 2. Week, 3. Month, 4. Quarter, 5. Year, 6. >=Weekly, 7. >=Montlhy, 8. >=Daily
     -> Factor
          -> The factor options lead as increment the extension of the previous time period. 
               -> Example: D is the normal time period and with factor, we change from 1D to 2D in order to extend previous levels of VWAP.
                ->The Factor option is only available in 1. Day and 2. Week. With a Min Value of 1 and a Maximum Value of 50.
     -> Labels:
          -> We could select if show labels or not
4. The option of Turn ON/OFF Standard Deviation Bands
     -> Label:
          -> We could select if show labels or not
     -> Timeframe selection:
              -> 1. Day, 2. Week, 3. Month, 4. Quarter, 5. Year
5. The option of Turn ON/OFF Previous Standard Deviation 
           -> Timeframe selection:
                 -> None, 1. Day, 2. Week, 3. Month, 4. Quarter, 5. Year, 6. >=Weekly, 7. >=Montlhy, 8. Quarter & Year
            -> STDEV LEVEL
                 -> Since there are different options for Standard Deviation I included 4 options 
                       -> 1
                       -> 2
                       -> 3
                       -> User Selection
                             -> In this option we could select any NUMBER for STVDEV 0.25 of step.
     -> Label:
          -> We could select if show labels or not
6. The Lockback Setting
      -> This Script also includes an option to only plot a certain amount of days back.
          The main reason in order to have a more clear chart.
            -> We could select between:
                 -> PLOT ALL
                 -> CUSTOM
      -> If we select Custom Then we could select the Number of Days Back that is going to be plotted.
7. Color Theme
Here we select the color (Visual Desing)
      -> Color Theme
            -> Text Color
 
      -> Here I use the recent input.color option added for TradingView making the color selection really simple
8. Time Period Highlighter
      -> In this option, we could select one time period in order to plot one tiny background and identify the change in the time period.
           -> Timeframe selection:
                  -> 1. Day, 2. Week, 3. Month, 4. Quarter, 5. Year
9. Label Offset 
      -> Finally, this option leads us to change the position of the labels into the X-axis by default 20.
This script has many options the combinations and the possibilities of making different analyses are bast.
Here some examples of what we could make:
DEFAULT SETTING:
PREVIOUS VWAP FOR TIME PERIOD >= WEEK
(work good as S&D levels)
PREVIOUS VWAP Week WITH A FACTOR OF 4
STANDARD DEVIATION BANDS - DAY
STANDARD DEVIATION BANDS - WEEK
STANDARD DEVIATION BANDS - MONTH
STANDARD DEVIATION BANDS - QUARTER
STANDARD DEVIATION BANDS - YEAR
PREVIOUS STANDARD DEVIATION - DAY SDTV 3
PREVIOUS STANDARD DEVIATION - WEEK SDTV 3
USING STANDARD DEVIATION BANDS - WEEK 
WITH LOCKBACK -> PLOT ALL
WITH CUSTOM 30 DAYS
I think the options possibilities of analysis using #VWAP are truly awesome.
I like the relationship that one previous VWAP has with Standard Pivot Points.
Good Luck,
Anderson,
Anticipated Simple Moving Average Crossover IndicatorIntroducing the Anticipated Simple Moving Average Crossover Indicator
This is my Pinescript implementation of the Anticipated Simple Moving Average Crossover Indicator
Much respect to the original creator of this idea Dimitris Tsokakis
This indicator removes one bar of lag from simple moving average crossover signals with a high degree of accuracy to give a slight but very real edge.
 Moving Averages 
A moving average simplifies price data by smoothing it out by averaging closing prices and creating one flowing line which makes seeing the trend easier.
Moving averages can work well in strong trending conditions, but poorly in choppy or ranging conditions.
Adjusting the time frame can remedy this problem temporarily, although at some point, these issues are likely to occur regardless of the time frame chosen for the moving average(s).
While Exponential moving averages react quicker to price changes than simple moving averages. In some cases, this may be good, and in others, it may cause false signals.
Moving averages with a shorter look back period (20 days, for example) will also respond quicker to price changes than an average with a longer look back period (200 days).
 Trading Strategies — Moving Average Crossovers 
Moving average crossovers are a popular strategy for both entries and exits. MAs can also highlight areas of potential support or resistance.
The first type is a price crossover, which is when the price crosses above or below a moving average to signal a potential change in trend.
Another strategy is to apply two moving averages to a chart: one longer and one shorter.
When the shorter-term MA crosses above the longer-term MA, it's a buy signal, as it indicates that the trend is shifting up. This is known as a "golden cross."
Meanwhile, when the shorter-term MA crosses below the longer-term MA, it's a sell signal, as it indicates that the trend is shifting down. This is known as a "dead/death cross."
 MA and MA Cross Strategy Disadvantages 
Moving averages are calculated based on historical data, and while this may appear predictive nothing about the calculation is predictive in nature.
Moving averages are always based on historical data and simply show the average price over a certain time period.
Therefore, results using moving averages can be quite random.
At times, the market seems to respect MA support/resistance and trade signals, and at other times, it shows these indicators no respect.
One major problem is that, if the price action becomes choppy, the price may swing back and forth, generating multiple trend reversal or trade signals.
When this occurs, it's best to step aside or utilize another indicator to help clarify the trend.
The same thing can occur with MA crossovers when the MAs get "tangled up" for a period of time during periods of consolidation, triggering multiple losing trades.
Ensure you use a robust risk management system to avoid getting "Chopped Up" or "Whip Sawed" during these periods.
Efficient Work [LucF]█  OVERVIEW 
Efficient Work measures the ratio of price movement from close to close ( resulting work ) over the distance traveled to the high and low before settling down at the close ( total work ). The closer the two values are, the more Efficient Work approaches its maximum value of +1 for an up move or -1 for a down move. When price does not change, Efficient Work is zero.
Higher values of Efficient Work indicate more efficient price travel between the close of two successive bars, which I interpret to be more significant, regardless of the move's amplitude. Because it measures the direction and strength of price changes rather than their amplitude, Efficient Work may be thought of as a sentiment indicator.
█  CONCEPTS 
This oscillator's design stems from a few key concepts.
 Relative Levels 
Other than the centerline, relative rather than absolute levels are used to identify levels of interest. Accordingly, no fixed levels correspond to overbought/oversold conditions. Relative levels of interest are identified using:
 • A Donchian channel (historical highs/lows).
 • The oscillator's position relative to higher timeframe values.
 • Oscillator levels following points in time where a divergence is identified.
 Higher timeframes 
Two progressively higher timeframes are used to calculate larger-context values for the oscillator. The rationale underlying the use of timeframes higher than the chart's is that, while they change less frequently than the values calculated at the chart's resolution, they are more meaningful because more work (trader activity) is required to calculate them. Combining the immediacy of values calculated at the chart's resolution to higher timeframe values achieves a compromise between responsiveness and reliability.
 Divergences as points of interest rather than directional clues 
A very simple interpretation of what constitutes a divergence is used. A divergence is defined as a discrepancy between any bar's direction and the direction of the signal line on that same bar. No attempt is made to attribute a directional bias to divergences when they occur. Instead, the oscillator's level is saved and subsequent movement of the oscillator relative to the saved level is what determines the bullish/bearish state of the oscillator.
 Conservative coloring scheme 
Several additive coloring conditions allow the bull/bear coloring of the oscillator's main line to be restricted to specific areas meeting all the selected conditions. The concept is built on the premise that most of the time, an oscillator's value should be viewed as mere noise, and that somewhat like price, it only occasionally conveys actionable information.
█  FEATURES 
 Plots 
 • Three lines can be plotted. They are named  Main line ,  Line 2  and  Line 3 . You decide which calculation to use for each line:
   • The oscillator's value at the chart's resolution.
   • The oscillator's value at a medium timeframe higher than the chart's resolution.
   • The oscillator's value at the highest timeframe.
   • An aggregate line calculated using a weighed average of the three previous lines (see the  Aggregate Weights  section of Inputs to configure the weights).
 • The coloring conditions, divergence levels and the Hi/Lo channel always apply to the Main line, whichever calculation you decide to use for it.
 • The color of lines 2 and 3 are fixed but can be set in the "Colors" section of Inputs.
 • You can change the thickness of each line.
 • When the aggregate line is displayed, higher timeframe values are only used in its calculation when they become available in the chart's history,
  otherwise the aggregate line would appear much later on the chart. To indicate when each higher timeframe value becomes available,
  a small label appears near the centerline.
 • Divergences can be shown as small dots on the centerline.
 • Divergence levels can be shown. The level and fill are determined by the oscillator's position relative to the last saved divergence level.
 • Bull/bear markers can be displayed. They occur whenever a new bull/bear state is determined by the "Main Line Coloring Conditions".
 • The Hi/Lo (Donchian) channel can be displayed, and its period defined.
 • The background can display the state of any one of 11 different conditions.
 • The resolutions used for the higher timeframes can be displayed to the right of the last bar's value.
 • Four key values are always displayed in the Data Window (fourth icon down to the right of your chart):
  oscillator values for the chart, medium and highest timeframes, and the oscillator's instant value before it is averaged.
 Main Line Coloring Conditions 
 • Nine different conditions can be selected to determine the bull/bear coloring of the main line. All conditions set to "ON" must be met to determine the bull/bear state.
 • A volatility state can also be used to filter the conditions.
 • When the coloring conditions and the filter do not allow for a bull/bear state to be determined, the neutral color is used.
 Signal 
 • Seven different averages can be used to calculate the average of the oscillator's value.
 • The average's period can be set. A period of one will show the instant value of the oscillator,
  provided you don't use linear regression or the Hull MA as they do not work with a period of one.
 • An external signal can be used as the oscillator's instant value. If an already averaged external value is used, set the period to one in this indicator.
 • For the cases where an external signal is used, a centerline value can be set.
 Higher Timeframes 
 • The two higher timeframes are named  Medium timeframe  and  Highest timeframe . They can be determined using one of three methods:
  • Auto-steps: the higher timeframes are determined using the chart's resolution. If the chart uses a seconds resolution, for example,
   the medium and highest resolutions will be 15 and 60 minutes.
  • Multiples: the timeframes are calculated using a multiple of the chart's resolution, which you can set.
  • Fixed: the set timeframes do not change with the chart's resolution.
 Repainting 
 • Repainting can be controlled separately for the chart's value and the higher timeframe values.
 • The default is a repainting chart value and non-repainting higher timeframe values. The Aggregate line will thus repaint by default,
  as it uses the chart's value along with the higher timeframes values.
 Aggregate Weights 
 • The weight of each component of the Aggregate line can be set.
 • The default is equal weights for the three components, meaning that the chart's value accounts for one third of the weight in the Aggregate.
 High Volatility 
 • This provides control over the volatility filter used in the Main line's coloring conditions and the background display.
 • Volatility is determined to be high when the short-term ATR is greater than the long-term ATR.
 Colors 
 • You can define your own colors for all of the oscillator's plots.
 • The default colors will perform well on both white and black chart backgrounds.
 Alerts 
 • An alert can be defined for the script. The alert will trigger whenever a bull/bear marker appears in the indicator's display.
  The particular combination of coloring conditions and the display of bull/bear markers when you create the alert will thus determine when the alert triggers.
  Once the alerts are created, subsequent changes to the conditions controlling the display of markers will not affect the existing alert(s).
 • You can create multiple alerts from this script, each triggering on different conditions.
 Backtesting & Trading Engine Signal Line 
 • An invisible plot named "BTE Signal" is provided. It can be used as an entry signal when connected to the  PineCoders Backtesting & Trading Engine  as an external input.
  It will generate an entry whenever a marker is displayed.
█  NOTES 
• I do not know for sure if the calculations in Efficient Work are original. I apologize if they are not.
• Because this version of Efficient Work only has access to OHLC information, it cannot measure the total distance traveled through all of a bar's ticks, but the indicator nonetheless behaves in a manner consistent with the intentions underlying its design.
 For Pine coders 
This code was written using the following standards:
 • The PineCoders  Coding Conventions for Pine .
 • A modified version of the PineCoders  MTF Oscillator Framework  and  MTF Selection Framework .
MTF Oscillator Framework [PineCoders]This framework allows Pine coders to quickly build a complete multi-timeframe oscillator from any calculation producing values around a centerline, whether the values are bounded or not. Insert your calculation in the script and you have a ready-to-publish MTF Oscillator offering a plethora of presentation options and features.
█  HOW TO USE THE FRAMEWORK 
1 — Insert your calculation in the `f_signal()` function at the top of the "Helper Functions" section of the script.
2 — Change the script's name in the `study()` declaration statement and the `alertcondition()` text in the last part of the "Plots" section.
3 — Adapt the default value used to initialize the CENTERLINE constant in the script's "Constants" section.
4 — If you want to publish the script, copy/paste the following description in your new publication's description and replace the "OVERVIEW" section with a description of your calculations.
5 — Voilà!
═════════════════════════════════════════════════════════════════════════
█  OVERVIEW 
This oscillator calculates a directional value of True Range. When a bar is up, the positive value of True Range is used. A negative value is used when the bar is down. When there is no movement during the bar, a zero value is generated, even if True Range is different than zero. Because the unit of measure of True Range is price, the oscillator is unbounded (it does not have fixed upper/lower bounds).
True Range can be used as a metric for volatility, but by using a signed value, this oscillator will show the directional bias of progressively increasing/decreasing volatility, which can make it more useful than an always positive value of True Range.
The True Range calculation appeared for the first time in J. Welles Wilder's  New Concepts in Technical Trading Systems  book published in 1978. Wilder's objective was to provide a reliable measure of the effective movement—or range—between two bars, to measure volatility. True Range is also the building block used to calculate ATR (Average True Range), which calculates the average of True Range values over a given period using the `rma` averaging method—the same used in the calculation of another of Wilder's remarkable creations: RSI.
█  CONCEPTS 
This oscillator's design stems from a few key concepts.
 Relative Levels 
Other than the centerline, relative rather than absolute levels are used to identify levels of interest. Accordingly, no fixed levels correspond to overbought/oversold conditions. Relative levels of interest are identified using:
 • A Donchian channel (historical highs/lows).
 • The oscillator's position relative to higher timeframe values.
 • Oscillator levels following points in time where a divergence is identified.
 Higher timeframes 
Two progressively higher timeframes are used to calculate larger-context values for the oscillator. The rationale underlying the use of timeframes higher than the chart's is that, while they change less frequently than the values calculated at the chart's resolution, they are more meaningful because more work (trader activity) is required to calculate them. Combining the immediacy of values calculated at the chart's resolution to higher timeframe values achieves a compromise between responsiveness and reliability.
 Divergences as points of interest rather than directional clues 
A very simple interpretation of what constitutes a divergence is used. A divergence is defined as a discrepancy between any bar's direction and the direction of the signal line on that same bar. No attempt is made to attribute a directional bias to divergences when they occur. Instead, the oscillator's level is saved and subsequent movement of the oscillator relative to the saved level is what determines the bullish/bearish state of the oscillator.
 Conservative coloring scheme 
Several additive coloring conditions allow the bull/bear coloring of the oscillator's main line to be restricted to specific areas meeting all the selected conditions. The concept is built on the premise that most of the time, an oscillator's value should be viewed as mere noise, and that somewhat like price, it only occasionally conveys actionable information.
█  FEATURES 
 Plots 
 • Three lines can be plotted. They are named  Main line ,  Line 2  and  Line 3 . You decide which calculation to use for each line:
   • The oscillator's value at the chart's resolution.
   • The oscillator's value at a medium timeframe higher than the chart's resolution.
   • The oscillator's value at the highest timeframe.
   • An aggregate line calculated using a weighed average of the three previous lines (see the  Aggregate Weights  section of Inputs to configure the weights).
 • The coloring conditions, divergence levels and the Hi/Lo channel always apply to the Main line, whichever calculation you decide to use for it.
 • The color of lines 2 and 3 are fixed but can be set in the "Colors" section of Inputs.
 • You can change the thickness of each line.
 • When the aggregate line is displayed, higher timeframe values are only used in its calculation when they become available in the chart's history,
  otherwise the aggregate line would appear much later on the chart. To indicate when each higher timeframe value becomes available,
  a small label appears near the centerline.
 • Divergences can be shown as small dots on the centerline.
 • Divergence levels can be shown. The level and fill are determined by the oscillator's position relative to the last saved divergence level.
 • Bull/bear markers can be displayed. They occur whenever a new bull/bear state is determined by the "Main Line Coloring Conditions".
 • The Hi/Lo (Donchian) channel can be displayed, and its period defined.
 • The background can display the state of any one of 11 different conditions.
 • The resolutions used for the higher timeframes can be displayed to the right of the last bar's value.
 • Four key values are always displayed in the Data Window (fourth icon down to the right of your chart):
  oscillator values for the chart, medium and highest timeframes, and the oscillator's instant value before it is averaged.
 Main Line Coloring Conditions 
 • Nine different conditions can be selected to determine the bull/bear coloring of the main line. All conditions set to "ON" must be met to determine the bull/bear state.
 • A volatility state can also be used to filter the conditions.
 • When the coloring conditions and the filter do not allow for a bull/bear state to be determined, the neutral color is used.
 Signal 
 • Seven different averages can be used to calculate the average of the oscillator's value.
 • The average's period can be set. A period of one will show the instant value of the oscillator,
  provided you don't use linear regression or the Hull MA as they do not work with a period of one.
 • An external signal can be used as the oscillator's instant value. If an already averaged external value is used, set the period to one in this indicator.
 • For the cases where an external signal is used, a centerline value can be set.
 Higher Timeframes 
 • The two higher timeframes are named  Medium timeframe  and  Highest timeframe . They can be determined using one of three methods:
  • Auto-steps: the higher timeframes are determined using the chart's resolution. If the chart uses a seconds resolution, for example,
   the medium and highest resolutions will be 15 and 60 minutes.
  • Multiples: the timeframes are calculated using a multiple of the chart's resolution, which you can set.
  • Fixed: the set timeframes do not change with the chart's resolution.
 Repainting 
 • Repainting can be controlled separately for the chart's value and the higher timeframe values.
 • The default is a repainting chart value and non-repainting higher timeframe values. The Aggregate line will thus repaint by default,
  as it uses the chart's value along with the higher timeframes values.
 Aggregate Weights 
 • The weight of each component of the Aggregate line can be set.
 • The default is equal weights for the three components, meaning that the chart's value accounts for one third of the weight in the Aggregate.
 High Volatility 
 • This provides control over the volatility filter used in the Main line's coloring conditions and the background display.
 • Volatility is determined to be high when the short-term ATR is greater than the long-term ATR.
 Colors 
 • You can define your own colors for all of the oscillator's plots.
 • The default colors will perform well on both white and black chart backgrounds.
 Alerts 
 • An alert can be defined for the script. The alert will trigger whenever a bull/bear marker appears in the indicator's display.
  The particular combination of coloring conditions and the display of bull/bear markers when you create the alert will thus determine when the alert triggers.
  Once the alerts are created, subsequent changes to the conditions controlling the display of markers will not affect the existing alert(s).
 • You can create multiple alerts from this script, each triggering on different conditions.
 Backtesting & Trading Engine Signal Line 
 • An invisible plot named "BTE Signal" is provided. It can be used as an entry signal when connected to the  PineCoders Backtesting & Trading Engine  as an external input.
  It will generate an entry whenever a marker is displayed.
 Look first. Then leap.  
SuperTrend VolatilityThis indicator is actually composition of 3 indicator to one common one
it based on super trend , OBV and volatility % range 
obv act as our source for the super trend to make it more sensitive 
you can control it as a regular super trend + the addition of  volatility % range (volatility factor)
so 1 is volatility range , can be from 0.1 to 5 depend on your liking.
i set it here in this example of btc 4 hour chart to be 0.5 which is 1/2 of the  volatility % range since it fitted better this particular asset . for stock i prefer 1 as my factor 
this indicator as i normally do have alert and signal inside.
the aim of this indicator is to maximize trend on one hand and other   to keep sensitivity high
one of the problem with regular super trend that as we keep the we increase the  trend to be longer it lose sensitivity .
by this method that i show here i try to minimize that bad effect and make it both sensitive and more responsive. this is one of the reason i use a modified version of OBV as a source to it  .
for each asset that you use try to find the best fit so this model can work properly 
 here apple with factor=1 as range 
on daily it better half of volatility range
NIO
gold 4 hour
gold 1 hour
   
[blackcat] L2 Ehlers Autocorrelation IndicatorLevel: 2
Background
John F. Ehlers introduced Autocorrelation Indicator in his "Cycle Analytics for Traders" chapter 8 on 2013.
Function
If we correlate a waveform composed of perfectly random numbers by itself, the correlation will be perfect. However, if we lag one of the data streams by just one bar, the correlation will be dramatically reduced. In a long memory process with normally distributed random numbers the autocorrelation follows the power law.
One of the underlying principles of technical analysis is that market data do not follow this power law of an efficient market, and we therefore can extract information from the partial correlation of the autocorrelation function. For example, assume the data being examined is a perfect sine wave whose period is 20 bars. The autocorrelation with zero lag, averaged over one full period of the sine wave, is unity. That is, the correlation is perfect. Introducing a lag of one bar in the autocorrelation process causes the average correlation to be decreased slightly. Introducing another bar of lag further decreases the average correlation, and so on. That is, until a lag of 10 bars is reached. In this case, the positive alternation of the sine wave is correlated with the negative alternation of the lagged waveform and the negative alternation of the sine wave is correlated with the positive alternation of the lagged waveform, with the result that perfect anticorrelation has been reached. Continued lag increases causes the average correlation to increase until a lag of 20 bars is reached. When the lag is equal to the period of the sine wave waveform, the correlation is again perfect. In this theoretical example, the correlation values as a function of lag vary exactly as a sine wave.
Market data are considerably messier than purely random numbers or perfect sine waves but contain features of both. However, the characteristics that are uncovered by autocorrelation offer unique trading perspectives. Aside from appearing psychedelic, there are two distinct characteristics of the autocorrelation indicator using minimum averaging. First, there is a sharp reversal from red to yellow and from yellow to red at the timing of price reversals for all periods of lag. Second, there is a variation of the thickness of the bars and the number of bars over the vertical range of the indicator as a function of time.
Key Signal
Corr --> Pearson correlation data array
Pros and Cons
I am sorry this script is NOT 100% as original Ehlers works but I modified it accordingly which demostrated with better visual effect.
Remarks
The 47th script for Blackcat1402 John F. Ehlers Week publication.
Courtesy of @RicardoSantos for RGB functions.
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
Using The AM/GM Inequality To Estimate VolatilityA volatility indicator derived from the AM/GM inequality. I don't think it will be necessary to describe the usage and interpretation of such indicator, and I don't think it is super useful, however, this is not the case of the script, which contains three ways to compute the geometric mean, with a classic, a simple, and an efficient way. The AM/GM inequality is also a really interesting concept, and I'll try to"prove" it in this post by using DSP. I also added more comments in the script in order to highlight some stuff.
 The AM/GM Inequality 
When we talk about the mean, we are referring to the "arithmetic" one by default, but there exist more types of means. Two other ones include the "geometric" and "harmonic" means, both are part of the Pythagorean means with the arithmetic mean.
Each one of them as several properties, but the most interesting aspect is their inequality, that is:
 HM <= GM <= AM  
The arithmetic mean is the one with the highest value, while the harmonic mean is the one with the lowest value. In the case each data point is equal to each other, all the means have the same value.  
In our case, the inequality of interest is the inequality between the geometric and arithmetic mean, where the geometric mean is lower or equal than the arithmetic one. Many proofs/explanations exist, I'll try my version using DSP, where instead of thinking about means, we think about rolling means, which allows us to interpret them as low-pass filters. So we end up having the geometric moving average (GMA) and arithmetic moving average (SMA).
We know that  GMA <= SMA , the SMA has a unity passband, this implies that the GMA has a passband lower than 1 (for non-equal input values), this explains why the GMA is smaller than the SMA. In order for a FIR filter to have a passband lower than 1, the sum of the filter coefficients must be lower than 1. In order to further proves this consider the following equation:
 sqrt(a×b) = k×a + k×b 
Here  sqrt(a×b)  is the geometric mean of  a  and  b , the right-hand side of the equation is a weighted sum between  a  and  b  and coefficient  k , we want to solve the equation with respect to  k , if  k×2 < 1  then we have the proof that  GMA < SMA . The solution with respect to  k  is:
 k = sqrt(a×b)/(a+b) 
which always gives a number lower than 0.5, as such  k×2 < 1  and thus the passband is lower than 1. If our input values are equal to each other, we end up with the following solution for  k :
 k = sqrt(a×a)/(a+a) = a/(2×a) = 0.5 
as such the GMA has the coefficients of an SMA as long as the input values are equal to each other.
Because of this inequality, we can subtract the SMA to a GMA and take the square root of the result in order to have a volatility indicator, however, both moving averages are still pretty close to each other, which gives a very small result for the indicator.
 Uwu I am a bit tired, better indicators coming up 
CryptoSignalScanner - Advanced Moving Averages - Cross & RainbowDESCRIPTION:
With this script you can plot 6 moving averages.
You can decide which Moving Average you want to show or hide.
For every plot you can decide to display the Simple Moving Average ( SMA ) or Exponential Moving Average ( EMA ).
It provides CrossOver and CrossUnder labels when loading the script. Those labels you can show or hide.
You have the possibility to show or hide the rainbow colors. This rainbow function gives you a clear view of the current trend.
HOW TO USE:
• When one Moving Average crosses above another Moving Average it signals an uptrend.
• When one Moving Average crosses below another Moving Average it signals a downtrend.
• The higher to length of the Moving Average the stronger the trend.
FEATURES:
• You can show/hide the preferred Moving Averages.
• You can set the length, type and source for every Moving Average.
• You can show/hide the rainbow colors.
• You can show/hide the CrossUp labels.
• You can show/hide the CrossDown labels.
• You can set alerts for every Moving Average.
• Etc...
DEFAULT SETTINGS:
• MA1 => EMA5
• MA2 => EMA10
• MA3 => EMA20
• MA4 => SMA50
• MA5 => SMA100
• MA6 => SMA200
Simple Moving Average vs. Exponential Moving Average:
SMA and EMA are calculated differently. The exponential moving average ( EMA ) focuses more on recent prices than on a long series of data points, as the simple moving average required.
The calculation makes the EMA quicker to react to price changes and the SMA react slower. That is the main difference between the two.
One is not necessarily better than another. It comes down to personal preference. Plot an EMA and SMA of the same length on a chart and see which one helps you make better trading decisions.
Moving Average Trading Strategies:
The first strategy is a price crossover, when the price crosses above or below a moving average, it signals a potential change in trend.
The second strategy applies when one moving averages crosses another moving average.
• When the short-term MA crosses above the long-term MA, it signals a buy signal.
• When the short-term MA crosses below the long-term MA, it signals a sell signal.
REMARKS:
• This advice is NOT financial advice.
• We do not provide personal investment advice and we are not a qualified licensed investment advisor.
• All information found here, including any ideas, opinions, views, predictions, forecasts, commentaries, suggestions, or stock picks, expressed or implied herein, are for informational, entertainment or educational purposes only and should not be construed as personal investment advice.
• We will not and cannot be held liable for any actions you take as a result of anything you read here.
• We only provide this information to help you make a better decision.
• While the information provided is believed to be accurate, it may include errors or inaccuracies.
If you like this script please donate some coins to share your appreciation.
Good Luck,
SEOCO
hayatguzelHayatguzel indicator is a simple indicator which shows the price/ema ratio. Indicator uses the highest or lowest values for price while closure ones for ema. Ema value can be adjusted according to your choise such as 21, 34, 55 etc. or any value you prefer.
I want to explain hayatguzel on XAUUSD chart. I marked 3 points on the chart. 1st one is the peak value of gold with a price/ema55 ratio around 1.30, the 2nd one is the other peak value of gold with a price/ema55 ratio around 1.27 and the 3rd one is also 1.30.
As can be seen, gold price has a maximum capability of going upto 1.30 times the ema55 value in an uptrend. And now this ratio is about 1.23, so we are expecting a maximum level of 1.30 for our predicted peak price value. You can also use this indicator for predicting lows of course but for this graph we are looking for the peak value. My strategy is to aim 1.30 value (30 value on the indicator chart) and therefore hold it until there and after that look for a sell opportunity. This simple approach is usefull especially for the ones who believe that "history repeats itself".
Green: Price > Ema 
Red: Price < Ema
Special Thanks to @baymucuk for his great help ! Code was created by him.
ENG
Hayatguzel indikatörü basit ve sade bir indikatör. Fiyat/ema oranını hesaplayıp grafiğe döker. Bunu yaparken de en yüksek ve en düşük fiyat değerlerini alırken ema'larda kapanış değerlerini kullanır. Ema değerleri ayarlanabilir olup 21, 34, 55 vb ya da sizin tercihiniz olan herhangi bir değer olabilir. 
Bu indikatörü XAUUSD grafiğinde anlatmak istiyorum. Grafikte 3 tane işaret var. İlkinde fiyat/ema55 oranının maksimum yaptığı yer işaretli ki bu oran 1.30 civarında. 2.sinde yine fiyat/ema55 oranının maksimum yaptığı yer olan 1.27 seviyesi işaretli. 3.'de de bu değer 1.30 seviyesinde.
Görüldüğü üzere ons altın grafiğinde maksimum fiyat ema 55'in en fazla 1.30 katı olabilmiş. Şimdi ise bu değer 1.23 civarında. O nedenle bu oranın 1.30 olmasını ve orada fiyatın tepe yapmasını bekleyebiliriz. Bu indikatörü aynı zamanda dipleri tahmin etmek için de kullanabilirsiniz ama burada grafiğimiz tepeleri bulmak üzerine. Buradaki stratejim fiyat/ema55 oranında  1.30 seviyesini (indikatördeki 30 seviyesi) hedefleyerek ons altını o noktaya kadar tutmak daha sonra o bölgede satış fırsatı aramak olacaktır. Bu basit yaklaşım özellikle "tarih tekerrüden ibarettir" sözüne inananlara ışık tutacaktır.
Yeşil: Fiyat > Ema 
Kırmızı : Fiyat < Ema
Yardımları için @baymucuk a teşekkürlerimi sunuyorum ! Kod onun tarafından yazılmıştır.
TR






















