Forex Trading SessionsThere are a million Forex Trading Session indicators out there, but I couldn't find one with all of the following requirements:
1. Automatically show the Sessions that actually affect the current pair (for instance, Tokyo session doesn't matter when trading EURGBP)
2. Editable colors or at the very least no distracting colors
3. Editable times for each exchange session
4. Unique indication of the start of a session vs the end of a session. (Sometimes, I don't notice a background going from Navy Blue to Black)
This indicator has everything I could ever want in a Sessions Tool:
Subdued default colors
Editable colors
Editable session ranges
Obvious, but not obnoxious indication of start and stop
Automatically hide irrelevant Sessions
Cheers. EFX
Историческая волатильность
Bar StatisticsThis script calculates and displays some bar statistics.
For the bar length statistics, it takes every length of upper or lower movements and calculates their average (with SD), median, and max. That way, you can see whether there is a bias in the market or not.
Eg.: If for 10 bars, the market moved 2 up, then 1 down, then 3 up, then 2 down, and 2 up, the average up bars length would be at 2.33, while the average for the down length would be at 1.5, showing that upper movements last longer than down movements.
For the range statistics, it takes the true range of each bar and calculates where the close of the bar is in relation to the true low of it. So if the closing of the bar is at 10.0, the low is at 9.0, and the high is at 10.2, the candle closed in the upper third of the bar. This process is calculated for every bar and for both closing prices and open prices. It is very useful to locate biasses, and they can you a better view of the market, since for most of the time a bar will open on an extreme and close on another extreme.
Eg.: Here on the DJI, we can see that for most of the time, a month opens at the lower third (near the low) and closes at the upper third (near the high). We can also see that it is very difficult for a month to open or close on the middle of the candle, showing how important the first and the last day are for determining the trend of the rest of the month.
myRangestatCalculates the average daily range as well as the standard deviation of the daily range over a given period.
Adding both values gives you a statistical range (bottom to top or top to bottom) in which price can be expected to move.
pricing_tableThis script helps you evaluate the fair value of an option. It poses the question "if I bought or sold an option under these circumstances in the past, would it have expired in the money, or worthless? What would be its expected value, at expiration, if I opened a position at N standard deviations, given the volatility forecast, with M days to expiration at the close of every previous trading day?"
The default (and only) "hv" volatility forecast is based on the assumption that today's volatility will hold for the next M days.
To use this script, only one step is mandatory. You must first select days to expiration. The script will not do anything until this value is changed from the default (-1). These should be CALENDAR days. The script will convert to these to business days for forecasting and valuation, as trading in most contracts occurs over ~250 business days per year.
Adjust any other variables as desired:
model: the volatility forecasting model
window: the number of periods for a lagged model (e.g. hv)
filter: a filter to remove forecasts from the sample
filter type: "none" (do not use the filter), "less than" (keep forecasts when filter < volatility), "greater than" (keep forecasts when filter > volatility)
filter value: a whole number percentage. see example below
discount rate: to discount the expected value to present value
precision: number of decimals in output
trim outliers: omit upper N % of (generally itm) contracts
The theoretical values are based on history. For example, suppose days to expiration is 30. On every bar, the 30 days ago N deviation forecast value is compared to the present price. If the price is above the forecast value, the contract has expired in the money; otherwise, it has expired worthless. The theoretical value is the average of every such sample. The itm probabilities are calculated the same way.
The default (and only) volatility model is a 20 period EWMA derived historical (realized) volatility. Feel free to extend the script by adding your own.
The filter parameters can be used to remove some forecasts from the sample.
Example A:
filter:
filter type: none
filter value:
Default: the filter is not used; all forecasts are included in the the sample.
Example B:
filter: model
filter type: less than
filter value: 50
If the model is "hv", this will remove all forecasts when the historical volatility is greater than fifty.
Example C:
filter: rank
filter type: greater than
filter value: 75
If the model volatility is in the top 25% of the previous year's range, the forecast will be included in the sample apart from "model" there are some common volatility indexes to choose from, such as Nasdaq (VXN), crude oil (OVX), emerging markets (VXFXI), S&P; (VIX) etc.
Refer to the middle-right table to see the current forecast value, its rank among the last 252 days, and the number of business days until
expiration.
NOTE: This script is meant for the daily chart only.
Average Daily Range Fibonacci LevelsThe Average Daily Range is a simple concept, calculated as the difference between daily highs and lows averaged over some period. This indicator uses that range in conjunction with Fibonacci ratios to create zones centered on the day's open that tends to act as areas of support and resistance.
The thicker White lines are the ADR levels; all other lines are the same value adjusted by the various Fibonacci values.
A simpler version of this concept can be seen in my other script, Average Daily Range Zones, which does not include the Fibonacci ratio zones.
Thanks to @Hank Hill for the original idea and TV for the feedback and support on the use of the security() function.
Also thanks to @GoldenCross for the Fibonacci obsession.
Average Daily Range ZonesThe Average Daily Range is a simple concept, calculated as the difference between daily highs and lows averaged over some period. This range is is overlaid and centered on the day's open, and tends to act as areas of support and resistance . This indicator provides two aggregation periods, creating a range that represents volatility in the ADR; a wider spread indicates greater recent volatility , and vice-versa.
Thanks to @Hank Hill for the original idea and ToS script this is based on, and TV for the feedback and support on the use of the security() function.
tr_volThis indicator shows the annualized volatility, computed using the ewma method. It also uses average true range (ATR) as the daily return, rather than the typical close-to-close percentage change. You can uncomment the "comparison" series to see how it compares to the standard deviation, daily log return method. The standard deviation method weights all periods equally and doesn't account for intra-day ranges, meaning it is less responsive to new information than the ewma method and doesn't weight large intra-day moves as heavily.
The long-run median is also displayed. This feature sometimes fails if there are too many bars.
Volatility IndexThis indicator is based on Historical Volatility (HV) built-in indicator with minor tweaks to match the Bitcoin Volatility Index (from Bybt).
Also, you can select a symbol to compare its volatility with the volatility of the currently selected symbol.
Hercules Ultimate DCA™The Problem Most People Face When Trading & Investing:
If anyone tells you they know where the market is going, they’re either lying or they’re time travelers.
The truth is NOBODY knows whether the markets will move up or down tomorrow, next week, next year, or over any period of time.
If we all knew, we’d all be rich. What would suit most Investors is to Invest consistently over long periods of time into sound financial products.
When Creating This Investing Tool We Had 5 Requirements in Mind:
1. To create a tool that ANYONE with little to no experience could use to outperform 95% of traders and speculators.
2. To ignore the Charts, Candlesticks, Indicators, and Volatility in any market so you can rest easy at night, never having to look at the price of your asset and still remain profitable.
3. To create a tool that tells you exactly HOW MUCH to invest every day or week which takes the stress away in guessing which direction the market will go.
3. To minimize your risk and and exposure to downside even if you started buying a crypto at or near the top of a market.
4. To buy a crypto at or near the bottom of every single major swing or trend.
5. To make Investing Easy, Simple, and Fun for the average joe.
We achieved that goal with the Hercules Ultimate DCA™ Tool!
WHO Created it & HOW was it Created?
This tool uses complex math and an algorithm designed by a Quantitative Military Mathematician (who wishes to remain anonymous, so we’ll call him Satoshi) over a period of 5 and a half months.
To start, we wanted to keep things simple, and extensively researched 6 of the top investing strategies of all time:
1. Buy and Hold
2. Active Investing
3. Dollar Cost Averaging
4. Index Investing
5. Growth Investing
6. Value Investing
Most of the strategies above work well depending on your goals or how risk adverse you are, however most DO NOT check off all of the requirements we mentioned above. Comprehensive home-work and price-action history in Cryptocurrency Markets led us to the Dollar Cost Averaging (DCA) Strategy.
According to Fidelity,
“Dollar Cost Averaging is a strategy where you invest your money in equal portions, at regular intervals, regardless of which direction the market or a particular investment is going. In other words, your purchases occur regardless of the changes in price for the stock or other investment, potentially helping reduce the impact of volatility on the overall purchase.”
With this in mind our High IQ math friend got to work and formulated over 17 Different Variable Algorithms on the DCA Strategy before arriving to the one we named Hercules Ultimate DCA™.
WHY the Hercules Ultimate DCA™ Works BETTER Than Anything Else.
Rigorous backtesting & forward-testing led us to create what we believe is the most effective and efficient strategy to extract the most money from the markets while at the same time minimizing nearly all the risk when investing your hard earned money in small increments in a truly effortless way.
The Hercules Ultimate DCA™ is essentially a DCA strategy put on steroids because no two investments are alike.
As we mentioned above, a traditional DCA approach assumes you purchase the same dollar amount of any asset at scheduled times, no matter where the price of your purchased asset is.
Example: If you have $1,000 dollars and decided to invest 50 dollars per week into Bitcoin, you would invest over a period of 20 weeks before you run out of money. Now, let’s assume the price of bitcoin is 50k during your first week, you would invest $50 dollars. Then next week the price rises to 60k, you would still invest $50 Dollars. The third week, if the Price of BTC rose to 70k, you would invest $50 dollars, so on and so forth. This approach is flawed because although you would still do better than many speculators and traders over a long period of time, it essentially leaves you penniless at the end of twenty weeks with no gunpowder left to buy BTC if it drops to all-time lows.
The Hercules Ultimate DCA™ works so well because it tells you to invest less as the price goes up and far more if the prices drops. What feels counterintuitive to most investors is typically what provides the most returns. Take the example above. If you have $1,000 dollars to invest weekly and Bitcoin currently sits at 50k, you would start by investing $50 dollars. Then next week, let’s say BTC rises to 60k, you would now invest $30 dollars. And your third week, BTC reaches 70k, you would now invest $10 dollars. Not only does strategy preserve your capital but it tells you to invest less into an asset at all time highs and far more into an asset at lows.
Now obviously the math in this tool is more complex, but it’s also more cost effective. At the time of writing this, the current Crypto Market has tanked from all-time-highs. Bitcoin currently sits at a price of $32,000 and is 51% down from its high of $64,900 dollars.
Just using this tool over the last 6 years, you would have invested a total of $5758.71 dollars and accumulated 4.328 Bitcoins for an average purchase of $1330.34 dollars. Your current Portfolio value would be $138,519.77 for a whopping percentage gain total of 2305%.
In other words, even with this massive crypto dump, you’d be rolling handsomely in your profits and you’d feel pretty smart too.
What’s more unique is that the Hercules Ultimate DCA™ will ALWAYS tell you to Invest More Dollars at the Literal Bottom of ANY market.
Dips in a market you believe in are far more exciting and will provide far more returns. The only way this tool fails is if the user (you) choose a market that goes to zero or is a rugpull.
How Do You Use the The Hercules Ultimate DCA™?
Step 1: Scroll to your “Invite-Only Scripts” in your indicators tab on Tradingview, then click on the indicator titled, “Hercules Ultimate DCA.”
Step 2: You should see the Indicator Populate at the Bottom of your chart with two lines, the Green line indicating how much you should buy that day, and the Blue line indicating how much of the asset you’ve purchased.
Step 3: (If you haven’t already) Make sure you turn on the Indicator Label. Navigate to the top right of the Crypto Product you would like to purchase and you will see a small settings gear. Once open, navigate on the left-hand side to the “Scales” tab and find the “Indicator Last Value Label.” Make sure it’s turned on and you will see the direct price.
Step 4: The amount you invest will now populate on the right hand side of the indicator with a number. That’s the exact dollar amount you invest in a disciplined manner no matter how large or small the number may seem.
Step 5: Get familiar with the indicator by opening the settings on the indicator itself. You will notice on the first tab it has a multiplier. If you increase it to 2, then the indicator will tell you to invest double the amount. If you input 10, then it will tell you to invest 10x the amount.
Step 6: Choose a Chart Timeframe and time of day to invest. If you choose to go with a once weekly investment then we recommend you increase your multiplier. If you choose a daily investment (and lack the necessary capital to invest large amounts daily) then we recommend keeping your multiplier down to lower numbers incase we see a lot of volatility. For most folks, once weekly on a 10x multiplier is most convenient. Set your chart to a weekly time-frame and increase your multiplier to 10. Then each week around the same time, you must invest.
Step 7: STAY DISCIPLINED. This method and tool only works if you invest the exact amount it tells you to invest over sustained periods of time.
Step 8: Enjoy Investing Made Easy 🙂
Ultimate Volatility Indicator [CC]The Ultimate Volatility Indicator was created by Richard Poster (Stocks and Commodities July 2021 pg 21) and this is a very simple but effective indicator. The idea behind volatility indicators is that when the indicator rises above a certain threshold then volatility is high enough and you can make a good amount of money riding the trend in the current direction and then exit when volatility drops below the threshold or until the underlying trend changes.
I have included a threshold that you can change from the default but I would recommend trying out different values to see what works best for you. This indicator will let you know as soon as volatility increases and reacts very quickly. I have included strong buy and sell signals in addition to normal ones so darker colors are strong buy and sell signals and lighter colors are normal signals. Buy when the line turns green and sell when it turns red.
Please let me know if you would like to see me publish any other indicators!
Candle PowerThis script shows power of candle during last average candle bodies. useful for detect pullback signals.
CUSTOM intraday volatility chart clockChart clock showing an overview of the day's expected and actual intraday volatility.
In white are only the expected volatility scores. The expected increase or decrease in volatility at any given hour of day compared to the average of the whole day's expected volatility. A 0.5 score two hours from now means that you can expect that hour to be 0.5% more volatile than the average of whole day's volatility.
In blue are the actual or realized volatility scores; the difference between that hour's volatility and what was expected to be its volatility is displayed as a blue bar. If two three hours ago was expected to be a more volatile hour of the day but no movement occurred, a large down bar will print for that hour.
Large swings of daily volatility (i.e. this month is much more or much less volatility than the last) will bias the clock usually only a little higher or lower, although historical volatility peaks/depressions will show the blue realized volatility score to be consistently high/low.
If requested I can change the look of the indicator or add input settings for the input length of clock, which for now is set to 20 bars, which is an approximation of the last month's realized volatility.
Session Volatility CalculatorHey traders!
This script calculates the average volatility of trading sessions.
You specify a start date, an end date, and a session time (eg. market open, Asian session etc)
The script then scans through all the price action on your chart and calculates the average price movement during that specified period.
What Is It For?
I created this script for my own purposes when developing certain strategies and testing certain ideas.
The purpose of this script is to give you an idea of how much price tends to move during certain times of day for certain markets.
You could think of it as a "session's average true range".
In crypto and forex this might be how much price tends to move on certain pairs during the Australian/Asian session, or the European session, or the overnight U.S. session etc.
In stocks this might be how much a symbol tends to move during the first hour of the day or the last hour of the day.
The point of calculating this information is for better understanding how markets move during certain times of day.
It's not a perfect science obviously since some days can be wilder than others depending on what fundamental events are developing, but it's useful information to have for times when there are no expected volatility-inducing events.
This info can help with optimizing targets and stop loss placement for certain day-trading strategies, and just generally getting an idea of what kinds of moves you might reasonably expect out of overnight positions or certain times of day etc - or at least that's what I use it for.
Settings
Hover your mouse over the "i" symbol to get more information on the script's settings, but here's a brief description:
Start Date: The date to begin calculating from (set to 1000 by default so it scans the entire chart).
End Date: The date to stop calculating (set to 2099 by default so it scans the entire chart)
Time Session: This is the time session during the day that you want to analyze.
Color Background: If turned on, this setting changes the background color to highlight the session.
Indicator Values
The indicator outputs a handful of values onto your chart. This is what the colors correspond to:
Top-Right Box: The average price range during the given time of day over historical price action.
Green Number: The recent session's highest price.
Red Number: The recent session's lowest price.
Purple Number: The recent session's price range (high - low).
Orange Number: The recent session's range ÷ the average (outputs a relative % of the average).
Fourth Friday FutureThere seems to be an options contract that comes due on the fourth Friday of every month, causing massive dips in the crypto market; this indicator colors your chart to tell you when this is going to happen.
Previous Day, Week, Month High/Low Line IndicatorMade a line indicator for previous Daily Weekly & Monthly High / Low. You can use all 3 (D,W,M) or just one by editing the settings.
Day and Time HighlightYet another sweet little tool that highlights only specific days and time.
For example, you can highlight only Tuesday's and Friday's from 0930-1600
You can adjust to any day of the week and any time of the day.
You can request more improvements upon this version. Cheers!
Like if you Like and Follow me for upcoming indicators/strategies: www.tradingview.com
Historical Volatility Percentile FilterThis indicator provides a simple market regime filter for Historical Volatility. Depending on the strategy that you are using, it is useful to know how your strategy will perform at different
ranges of volatility, as this can greatly impact your performance. For instance, some of my long-only mean reversion strategies will only take trades where the volatility percentile is not extremely high, as this can often indicate fundamental changes in the security or the start of a big market correction. Some strategies may work better when volatility is higher
Feel free to use the following code along with your strategies to help improve performance and reduce the volatility of your gains in the long term.
@ Investoz Position CalculatorPosition Calculator
This is how the position calculator works:
To use “Position Calculator” it is required that you know how much capital you want to risk (R). In other words, your R is the total amount you are willing to risk. You also need to know at what price you intend to buy the shares and where you had intended to put your stop loss.
Once you have filled in this information, you will find out how many shares you are allowed to buy and how much you have to invest.
A more detailed explanation can be found below.
Risk Capital (R) = This is the amount you are willing to risk. And by risk, I mean the total amount you are willing to lose completely. If you do not know your (R), you can calculate it in the Risk Calculator here
Buy Level = The price level where you intend to invest.
Stop Loss Level = The price at which you want to put your stop loss level on.
Difference between purchase price and stop loss level = Shows the percentage difference between your buy level and your stop loss level.
Number of shares to buy = Shows how many shares you should buy, considering the risk you have chosen.
Invested Capital = Shows how much you are allowed to invest.
@Investoz Risk CalculatorCalculate your position size
This simple risk calculator calculates how much you want to risk in total money.
This requires you to manually fill in how much capital you have and what percentage risk you want to take. You do this in the indicator settings. The default settings is set to 0.
The calculation of the amount will be displayed depending on the currency of the security.
Does your trading pass the seasonality test?Are you consistently beating the standard "Buy and Hold" benchmark?
Check your performance against the next most common strategy:
Buy at the start of the holiday season and close in the new year.
By default, the strategy starts with $100,000 and risks 25% of the account on each swing trade.
Commission is set to be 0.5% of each trade.
You can tweak the direction of trades by adjusting the first setting.
Tweak the holding period by changing the Entry and Exit months.
Red plot: Balance of account
Orange plot: Equity of account
Kolmogorov-Smirnov TestThe Kolmogorov–Smirnov test aims to tell you if the distribution of prices (or log returns) tends to follow a normal distribution or not. You can read about this test on Wikipedia . It seems to be a basic but trusted measure in the quantitative trading world.
When KS-t columns are blue, then it's safe to assume normal distribution. When they are red, the normal distribution assumption is proven wrong by the magnitude of the KS-t value.
In the plotting tab of the script, you can activate another option that displays the probability of the distribution being actually normal. It's values are bounded between 0 and 1, like all probabilities.
This test can be useful when using statistical concepts for trading markets, like standard deviations, z-scores, etc because they all depend on the assumption of prices (or log returns) being normaly distributed.
If you see something wrong, don't hesitate to message me.
Happy trading to all.
Cuban's Range Reversal OverlayBeen a minute since a public script!
This one looks at the range and recommends potential reversal depending on degree of overextension.
Originally intended for low timeframe short time horizon reversals but works well on higher timeframes as well.
Oscillator included in the image so you can see under the skirt and check what's happening.
Put Call Auto [Nic]Looks up the put call ratio for select stocks, and draws them.
Does not support all stocks / equities, but does include a number of major ones.