Rangebar timeThis indicator determines the time (in minutes) for which a bar of the Range Bar type was formed.
In order to avoid errors in the calculations, a weekend check is immediately carried out (one day if it is a holiday or two days if it is a weekend).
If there are more days off, then the information on the first bar after the weekend may be incorrect.
Индикатор определяет время (в минутах), за которое образовался бар типа RangeBar.
Cразу идет проверка на выходные дни (один день, если праздник или два дня, если выходные).
Если выходных больше, то информация на 1-ом баре, после выходных может быть некорректна.
Options
Future TimevalueThis indicator plots a chart of future timevalue for all NSE index and NSE FNO Stock. It plots the difference of future and spot's 1min candle close price.
Just open any index or stock spot chart in 1 min timeframe(works with higher tf also) and add the indicator.
FDAX Impulse TimesThis little scrip is used to automatically draw the most important time periods of the DAX Futures into your chart. You can use the configuration gear to adjust the position of the rectangles based on the current price level.
Artharjan INDIA VIX v/s Nifty Volatility DashboardHi,
I have created Artharjan INDIA VIX v/s Nifty Volatility Dashboard to forecast the Annual, Quarterly, Monthly, Weekly, Daily and Hourly Volatility of NIFTY Benchmark Index based on current value of INDIA VIX. This will help Index Options Sellers to decide the range of Nifty for the given period based on current level of volatility indicated by INDIA VIX.
Options Sellers may make use of the Min Range and Max Range values for the Strike Price Selection.
Regards
Rahul Desai
@Artharjan
Auto Support & Resistance From Option Strike Price + PercentagesAUTO SUPPORT AND RESISTANCE FROM OPTIONS STRIKE PRICES WITH PERCENTAGE GAPS
This is an auto support and resistance level indicator that uses options strike prices or psychological numbers as the relevant levels. Set your starting level or strike price and input the options strike price gaps for that ticker and 15 lines in either direction will automatically populate on the chart. It also has a table in the bottom right corner that tells you how far the current price is from the next closest support and resistance levels.
Everything is easily customizable in the indicator input settings including turning the lines on/off, turning the percentage gaps table on/off, setting the options strike price gaps, setting the starting level, setting the position of the percentage gaps table, changing support and resistance line colors all at once and updating the linewidth of all of the support and resistance lines at once.
***HOW TO USE***
First, go into the indicator settings and set the starting level to use. If you are trading SPY and it is near 450, then set your starting level at 450. If you are trading SQQQ and it is near 38, set your starting level to 38. If you are trading crypto, set your levels to the nearest psychological or round number such as 40,000 for BTC or 2,500 for ETH or 16.50 for LINK.
Second, set your options strike price gaps. If you are trading SPY, this will be 2.5. If you are trading SQQQ this number would be 1. If you are trading crypto, try using psychological price levels instead of strike prices, such as 500, 1000 or 5000 for BTC and 100, 250 or 500 for ETH. For small priced cryptos, use decimals such as .25, .50, etc.
Once these inputs are filled in, 15 levels in each direction will automatically populate on the chart for you.
If price is above a level, it will paint green. If price is below a level it will paint red. These colors represent support and resistance visually for you on the chart and will change dynamically as price moves above or below these levels. These colors can be customized in the indicator input settings to change all lines by only updating one color.
There is a table of percentage gap updates that will tell you in real time how far away the price is from the nearest support and resistance lines so you always know your risk to reward ratios. Each label will also be colored the same as the corresponding support or resistance line as a visual aid.
***MARKETS***
This indicator can be used as a signal on all markets, including stocks, crypto, futures and forex.
***TIMEFRAMES***
This support and resistance indicator can be used on all timeframes.
***TIPS***
Try using numerous indicators of ours on your chart so you can instantly see the bullish or bearish trend of multiple indicators in real time without having to analyze the data. Some of our favorites are our Auto Fibonacci, Directional Movement Index, Volume Profile, Momentum and Money Flow Index in combination with this auto support and resistance indicator. They all have real time Bullish and Bearish labels as well so you can immediately understand each indicator's trend.
Weighted Standard Deviation BandsLinearly weighted standard deviations over linearly weighted mean.
The rationale of the study can be deduced from my latest publications where I go deeper into explaining the benefits of linear weighting, but in short, I can remind that by using linear weighting we are able to increase the information gain by communicating the sequential nature of time series to the calculations via linear weighting.
Note, that multiplier parameters can take both negative and positive values resulting in ability to have, for example, 1st and 6th weighted standard deviations higher than the weighted mean.
Despite the modification of the classic standard deviation formula, I assume that mathematical qualities of standard deviation will hold due to the fact we can alternately weight the window itself, and then apply the classic standard deviation over the weighted window. In both cases, the results will be the same.
Aight that was too formal, but your short strangles should be happy
Here is it, for you
Top 40 High Low Strategy for SPY, 5minThis strategy is developed based on my High Low Index SPY Top 40 indicator
Notes:
- this strategy is only developed for SPY on the 5 min chart . It seems to work with QQQ as well, but it isn't optimized for it
- P/L shown is based on 10 SPY option contracts, call or put, with strike price closest to the entry SPY price and expiry of 0 to 1 day. This includes commissions (can be changed). This is only an estimate calculated using an arbitrary multiplier factor, this can be changed in the setting
- P/L is based on $5000 initial capital
- Works with both regular / extended trading session turned on/off. However, max drawdown is 1/2 with extended trading session ON
- there is still a bug that doesn't allow alert to be created due to calculation error, will update once fixed
This strategy combines signals from the following indicators to determine entry signals:
- High Low Index SPY Top 40
- MACD
- Linear Regression Slope
Entry signal is triggered when:
- High Low Index line crosses the EMA line
- MACD trending in the same direction
- Linear Regression slope is accelerating above a threshold in the same direction, indicating a strong trend
Profit target(PT) and stop loss(SL) are determined using ATR value, with 2:1 Reward to Risk ratio as default.
Exit signal may be triggered prior to PT or SL trigger when:
- High Low Index SPY Top 40 shows a reversal after overbought or oversold conditions (optional)
- Opposite entry signal is triggered
There are a number of optional settings:
- Turn on/off "option trading", P/L will be calculated using share price only without multiplication factor for trading option contracts
- # of options per trade, default to 10
- Reinvest with profit made
- Trade with trailing SL after PT hit
- Take profit early based on Top 40 overbought/oversold
- Trade 0/1 day expiry. This will signal exit by the end of the day on Mon/Wed/Fri, and only exits 1/2 of positions (if in profit) on Tues/Thurs
- Can reduce the SL level without impacting PT
- No entry between 10:05 - 10:20 (don't ask me why, but statistically it performs better)
Consider donating me some of your profit if you make $$$ hahaha~ ;)
Enjoy~~
VIX RangeThis indicator shows the daily expected trading range of the instrument.
An upper and lower line denotes the range. It is calulated based on the volatility index selected (NSE:India VIX is used by default). Also it shows developing upper and lower line for the next trading day.
Non-directional option strategies (like straddle, strangle) can be performed based on the expected trading range.
EMA Options Clouds With SignalsEMA Clouds for Options!
This indicator can help you confidently open and close options positions. Note that you should set stop a little below midline EMA . Risk reward for good signals is fairly consistent in profit. Most of the simulations I ran got between 1:2 and 1:4 profits. The losers usually can be avoided by making sure you are not in a choppy trading channel. Wait for EMAs to start separating and don't blindly follow every buy/sell.
3 wave EMA + Clouds:
Defaults:
EMA 8/32/64
Signals (off by default - turn on in settings):
Buy Call/Sell Call (open/exit call positions)
Buy Put/Sell Put (open/exit put positions)
Enter signals bullish:
Close over Middle EMA AND Short EMA > Middle EMA > Long EMA
Exit signals bullish:
Close under Middle EMA OR trend turns bearish (Short EMA < Middle EMA < Long EMA )
Enter signals bearish:
Close under Middle EMA AND Short EMA < Middle EMA < Long EMA
Exit signals bearish:
Close over Middle EMA OR Short EMA > Middle EMA > Long EMA
Cloud Colors (Default)
Green: Bullish
Red: Bearish
White: Chop/Transition
OpenMarketLondon Open Market to New York Open Market.
Only weekday is visible.
Summer -- 1500-2000
Winter -- 1600-2100
CPR Option Selling StrategyGood afternoon traders,
This is a script I built for option selling, in attempt to have a high success rate.
The gist of how it works:
It uses the opening or close of the current chart's timeframe opening bar when referenced against a designated (higher) timeframe's central pivot range (CPR).
Using that comparison, this script calculates an option to sell: put, call, or iron condor. It will calculate a call value using an average of the CPR central pivot and the max value of the prior higher timeframe's high or R1 (whichever is higher.)
It does the same for the put side, but uses the higher timeframe's low or S1 (whichever is lower.)
It will use the option on the other side of the source (open or close) of the CPR as the "option in play."
Settings:
There are many settings, most are simply "viewable" settings, and probably self explanatory, others, not so much:
"Source for Trigger" - this is the value used on the "opening bar," such as the close. This value is the one compared to the Central Pivot Range in determining whether to sell a call (if the source is lower,) sell a put (if the source is higher,) or an iron condor if it's in the CPR.
"Show Historical Win/Loss Percentages" - this shows a table in the bottom right of the W/L percentages for the current ticker and settings. Used for a quick glance at historical success rates.
"Extend Developing Levels Into the Future" - This will extend the developing values for CPR values, call and put values into the future (good for trying to trade early or setting up pre-market trades, assuming there will not be huge gap in one direction or another.)
"Select Higher Timeframe" - "Auto" will choose the higher timeframe for you. "Manual" will use the next field...
"If Manual, Timeframe for Pivots" - allows you to choose a different higher timeframe.
The next two sections are simply whether to show the plots for different levels of traditional and/or camarilla pivot points.
The last section will allow you to just filter on certain days. Really only useful for "backtesting" certain 0DTE trades on some daily options during the hourly chart.
Example use:
An example use (which I completed last week) on the chart referenced in this share: I sold a put-spread for $0.90, selling a 590 and buying a 570 strike in the middle of the week. I was looking at an hourly timeframe chart with a weekly pivot timeframe for the strategy.
Obviously, making only $0.90 on a $20 spread, there is a lot more to lose than to make, but I did some other analysis to go with it, so I felt safe, and I had a stop set for $1.50. So it worked, along with 3 other plays I did, very similar, and if that "Historical Win/Loss Percentage" is accurate, which I am fairly certain it is, I felt good about it.
The key all comes down to what you sell it for, right? That piece only you can determine. :)
Happy trading and enjoy,
Deuce
Binance Futures/Spot PriceShows the last price of either the spot or futures market on Binance, for the current coin.
It shows futures if you are in a spot market, and spot if you are in futures.
Currently this only works for USD stable coin pairs (BUSD, USDT, USDC, ...).
I don't plan to add COIN future pairs, it's not useful to me.
Additionally, it allows you to show the lowest and highest traded price (in the opposite market you are currently on: spot/futures) for a given period, and the respective chart, if you are into that sort of thing.
Bye :D
Trading Made Easy Pressure OscillatorAs always, this is not financial advice and use at your own risk. Trading is risky and can cost you significant sums of money if you are not careful. Make sure you always have a proper entry and exit plan that includes defining your risk before you enter a trade.
Those who have looked at my other indicators know that I am a big fan of Dr. Alexander Elder and John Carter. This is relevant to my trading style and to this indicator in general. While I understand it goes against TradingView rules generally to display other indicators while describing a new one, I need the Bollinger Bands, Bollinger Bands Width, and a secondary directional indicator to explain the full power of this indicator. In short, if this is strongly against the rules, I will edit the post as needed.
Those of you who are aware of John Carter are going to know this already, but for those who don’t, an explanation is necessary. John Carter is a relatively famous retail-turned-institutional (sort of) trader. He is the founder of TradetheMarkets, that later turned into SimplerTrading. Him and his company have a series of YouTube videos, he has made appearances on the MoneyShow, TastyTrade, and has authored a couple of books about trading. However, he is probably most famous for his “Squeeze” indicator that was originally launched on Thinkorswim and through his website but has now been incorporated into several trading platforms and even has a few open-source versions available here. In short, the Squeeze indicator looks to identify periods of consolidation and marry that with a momentum oscillator so you can position yourself in a quiet period before a large move. This in my opinion, is one of the best indicators an option trader can have, since options are priced both on time and volatility. To do this, the Squeeze identifies when the Bollinger Bands, a measure of price standard deviation, have contracted inside the Keltner Channels (a measure of the average range of a stock). This highlights something known as “the Squeeze”, when the 2x standard deviations (95% of all likely price movement using data from the past 20 periods) is less than the 1.5x average true range (ATR) of the stock over the same number of periods. These periods are when a stock is resting and in a period of consolidation and is generally followed by another large move once it has rested long enough. The momentum oscillator is used to determine the direction of this next move.
While I think this is one of the best indicators ever made, it is not without its pitfalls. I find that the “Squeeze” periods sometimes take too long to setup (something that was addressed by John and released in a new indicator, the Squeeze Pro, but even that is still slowish) and that the momentum oscillator was also a bit slow. They used a linear regression formula to track momentum, which can lag considerably at times. Collectively, this meant that getting into moves a few candles late was not uncommon or someone solely trading squeeze setups could have missed very good trade opportunities.
To improve on this, I present, the Trading Made Easy Pressure Oscillator. This more accurately identifies when volatility is reducing and the trading range is likely to contract, increasing the “pressure” on the price. This is often marked several candles before a “Squeeze” has started. To identify these ranges, I applied a 21-period exponential moving average to the Bollinger Bands Width indicator (BBW). As mentioned above, the Bollinger Bands measure the 2x standard deviation of price, typically based on a 20-period SMA. When the BBs expand, it marks periods of high volatility, when they contract, conversely, periods of low volatility. Therefore, applying an EMA to the BBW indicator allows us to confidently mark when volatility has slowed down earlier than traditional methods. The second improvement I made was using the Absolute Price oscillator instead of a linear regression-style oscillator. The APO is very similar to a MACD, it measures the difference between two exponential moving averages, here the 8 and 21 (Fibonacci EMAs). However, I find the APO to be smoother than the MACD, yet more reactive than the linear regression-style oscillators to get you into moves earlier.
Uses:
1) Buying before a bigger than expected move. This is especially relevant for options traders since theta decay will often eat away much of our profits while we wait for a large enough price move to offset the time decay. Here, we buy a call option/shares when the momentum oscillator matches the longer-term trend (i.e. the APO crosses over the zero line when price is above the 200-day EMA, and vice versa for puts/shorting the stock). This coincides with Dr. Elder’s Triple Screen Trading System, that we are aligning ourselves with the path of least resistance. We want to do this when price is currently in an increasing pressure situation (i.e. volatility is contracting) to make sure we are buying an option when premium and Implied Volatility is low so we can get a better price and have a better risk to reward ratio. Low volatility is denoted by a purple dot, high volatility a blue dot along the midline of the indicator. A scalper or short-term swing trader may look to exit when the blue dots turn purple signalling a likely end to a move. A longer-term trend trader can look to other exit scenarios, such as a cross of the oscillator below the zero line, signalling to go short, or using a moving average as a trailing stop.
2) Sell premium after a larger than expected move has finished. After a larger than expected move has completed (a series of blue dots is followed by a purple dot), use this time to sell theta-driven options strategies such as straddles, strangles, iron condors, calendar spreads, or iron butterflies, anything that benefits from contracting volatility and stagnating prices. This is useful here since reducing volatility typically means a contraction of prices and the reduced likelihood of a move outside of the normal range.
3) Divergences. This indicator is sensitive enough to highlight divergences. I personally don’t use it as such as I prefer to trend trade vs. reversion trade. Use at your own risk, but they are there.
In summary, this indicator improves upon the famous Squeeze indicator by increasing the speed at which periods of consolidation are marked and trend identification. I hope you enjoy it.
FunctionBlackScholesLibrary "FunctionBlackScholes"
Some methods for the Black Scholes Options Model, which demonstrates several approaches to the valuation of a European call.
// reference:
// people.math.sc.edu
// people.math.sc.edu
asset_path(s0, mu, sigma, t1, n) Simulates the behavior of an asset price over time.
Parameters:
s0 : float, asset price at time 0.
mu : float, growth rate.
sigma : float, volatility.
t1 : float, time to expiry date.
n : int, time steps to expiry date.
Returns: option values at each equal timed step (0 -> t1)
binomial(s0, e, r, sigma, t1, m) Uses the binomial method for a European call.
Parameters:
s0 : float, asset price at time 0.
e : float, exercise price.
r : float, interest rate.
sigma : float, volatility.
t1 : float, time to expiry date.
m : int, time steps to expiry date.
Returns: option value at time 0.
bsf(s0, t0, e, r, sigma, t1) Evaluates the Black-Scholes formula for a European call.
Parameters:
s0 : float, asset price at time 0.
t0 : float, time at which the price is known.
e : float, exercise price.
r : float, interest rate.
sigma : float, volatility.
t1 : float, time to expiry date.
Returns: option value at time 0.
forward(e, r, sigma, t1, nx, nt, smax) Forward difference method to value a European call option.
Parameters:
e : float, exercise price.
r : float, interest rate.
sigma : float, volatility.
t1 : float, time to expiry date.
nx : int, number of space steps in interval (0, L).
nt : int, number of time steps.
smax : float, maximum value of S to consider.
Returns: option values for the european call, float array of size ((nx-1) * (nt+1)).
mc(s0, e, r, sigma, t1, m) Uses Monte Carlo valuation on a European call.
Parameters:
s0 : float, asset price at time 0.
e : float, exercise price.
r : float, interest rate.
sigma : float, volatility.
t1 : float, time to expiry date.
m : int, time steps to expiry date.
Returns: confidence interval for the estimated range of valuation.
probability_of_touchBased on historical data (rather than theory), calculates the probability of a price level being "touched" within a given time frame. A "touch" means that price exceeded that level at some point. The parameters are:
- level: the "level" to be touched. it can be a number of points, percentage points, or standard deviations away from the mark price. a positive level is above the mark price, and a negative level is below the mark price.
- type: determines the meaning of the "level" parameter. "price" means price points (i.e. the numbers you see on the chart). "percentage" is expressed as a whole number, not a fraction. "stdev" means number of standard deviations, which is computed from recent realized volatlity.
- mark: the point from which the "level" is measured.
- length: the number of days within which the level must be touched.
- window: the number of days used to compute realized volatility. this parameter is only used when "type" is "stdev".
- debug: displays a fuchsia "X" over periods that touched the level. note that only a limited number of labels can be drawn.
- start: only include data after this time in the calculation.
- end: only include data before this time in the calculation.
Example: You want to know how many times Apple stock fell $1 from its closing price the next day, between 2020-02-26 and today. Use the following parameters:
level: -1
type: price
mark: close
length: 1
window:
debug:
start: 2020-02-26
end:
How does the script work? On every bar, the script looks back "length" days and sees if any day exceeded the "mark" price from "length" days ago, plus the limit. The probability is the ratio of such periods wherein price exceeded the limit to the total number of periods.
Options Theoritcal PriceThis script is useful as a quick glance for checking the theoritcal price of the Call and Put option strike.
Spot price is automatically derived from live market.
Enter the strike price and IV value.
For NSE stocks, use 6% as risk free rate if not sure.
Option Expirations - Equities, Indexes, VIX OPEX VIXperationShows monthly and quarterly expirations for Equities, Indexes, & VIX. OPEX, VIXEX, Vixperation.
options_expiration_and_strike_price_calculatorLibrary "options_expiration_and_strike_price_calculator"
TODO: add library description here
fun()
this is a library to help calculate options strike price and expiration that you can add to a script i use it mainly for symbol calulation to place orders to buy options on TD ameritrade so it will be set up to order options on TD ameritrade using json order placer and webhook it fills in the area in the json under symbol i suggest manually adding the year it should look like this is an example of an order to buy 10 call options using json through td ameritrade api
"complexOrderStrategyType": "NONE",
"orderType": "LIMIT",
"session": "NORMAL",
"price": "6.45",
"duration": "DAY",
"orderStrategyType": "SINGLE",
"orderLegCollection":
}
Monthly Options Expiration 2022Monthly options expiration for the year 2022.
Also you can set a flag X no. of days before the expiration date. I use it at as marker to take off existing positions in expiration week or roll to next expiration date or to place new trades.
Happy new year 2022 in advance and all the best traders.
Weekly Put SaleWeekly Put Sale
This study is a tool I use for selling weekly puts at the suggested strike prices.
1. The suggested strike prices are based on the weekly high minus an ATR multiple which can be adjusted in the settings
2. You can also adjust the settings to Monthly strike prices if you prefer selling options further out
3. I suggest looking for Put sale premium that is between 0.25% to 0.75% of the strike price for weekly Puts and 1% to 3% of the strike price for monthly Puts
Disclaimers: Selling Puts is an advanced strategy that is risky if you are not prepared to acquire the stock at the strike price you sell at on the expiration date. You must make your own decisions as you will bear the risks associated with any trades you place. To sum it up, trading is risky, and do so at your own risk.
Bank Nifty strike price 2/3σ Calculates the strike prices for the Bank Nifty index in steps of 50 and marks the 2 and 3 sigma price levels.
vol_bracketThis simple script shows an "N" standard deviation volatility bracket, anchored at the opening price of the current month, week, or quarter. This anchor is meant to coincide roughly with the expiration of options issued at the same interval. You can choose between a manually-entered IV or the hv30 volatility model.
Unlike my previous scripts, which all show the volatility bracket as a rolling figure, the anchor helps to visualize the volatility estimate in relation to price as it ranges over the (approximate) lifetime of a single, real contract.
portfolio_strikesA simple script for keeping track of your options portfolio. Basically, you can write one line of code per strategy (single, vertical, or strangle) to keep a line drawn on the underlying's chart, at the strike price, from the current bar until expiration. See the comments at the top of the code for more explanation.