Support Resistance Pivot EMA Scalp Strategy [Mauserrifle]A strategy that creates signals based on: pivots, EMA 9+20, RSI, ATR, VWAP, wicks and volume.
The strategy is developed as a helper for quick long option scalping. This strategy is primarily designed for intraday trading on the 2m SPY chart with extended hours. However, users can adapt it for use on different symbols and timeframes. These signals are meant as a helper rather than fully automated trading bots.
One of the key elements is its pivot-based calculation, driven by my integrated indicator "Support and Resistance Pivot Points/Lines ". It enables multi-timeframe pivot calculations which are used to generate the signals and offers customizability, allowing you to define rounding methods and cooldown periods to refine pivot levels. The pivots, in combination with EMA crossovers, VWAP trend, and additional filters (RSI, ATR, VWAP, wicks and volume), create an entry and exit strategy for scalping opportunities that is useful for 0/1 DTE options with an average trade time of six minutes with the default setup for SPY. Option trading should be done outside TradingView. At this moment of release there is no option trading support.
All parameters used in the strategy are tweaked based on deep backtests results and real-time behavior. Be mindful that past performance does not guarantee future results.
The strategy is designed for intermediate and advanced users who are familiar intraday option scalping techniques.
How It Works
The strategy identifies entries based on multiple conditions, including: recently above pivot, recent EMA crossovers, RSI range, candle patterns, and VWAP uptrend. It avoids trades below the VWAP lower band due to poor backtesting results in those conditions. It creates a great number of signals when it detects an uptrend, which entails: VWAP and its lower/upper band slopes are going up, and the number of next high pivot points is greater than the number of lower pivot points. This indicates that we hope it will keep going up. In historical testing, this showed favorable results. This uptrend criteria runs on 15m charts max (where up to the VWAP effectiveness is the greatest).
The strategy also checks for candle and volume patterns, identified in backtesting to improve entry levels on historic data. Which include:
A red candle after multiple green ones, hoping to jump on a trend during a small pullback
Zero lower wick
Percentage and volume is up after lower volume candles
Percentage is up and the first and second EMA slopes are going up
Percentage is up, the first EMA is higher than the second, the price low is below the second EMA and price close above it
The VWAP uptrend overrules the candle and volume conditions (thus lots of signals during those moments).
The above is the base for many signals. There is a strict mode that adds extra checks such as:
not trading when there is no next low or high pivot
requiring a VWAP uptrend only
minimum candle percentages
This mode is for analyzing history and seeing performance during these conditions. It is worth it to create a separate alert for strict mode so you are aware of these conditions during trading.
When no stop has been defined, exits will always happen on pivot crossunder confirmations. If a stop is defined (default config), the strategy exits a position when:
the position is negative or no trail has been set
at least 1 bar has past
OR no stop has been defined (overrules previous)
trail has not been activated
The second exit condition happens when the close is below first EMA(9 by default) and when:
the position has been above first EMA
the gap between close and last pivot isn't small
the position is negative or no trail has been set
OR no stop has been defined (overrules above)
trail has not been activated
There are some more variations on this but the above are the most common. These exit conditions are a safety net because the strategy heavily relies on and favors stops. The settings allow changing stops, profit takers and trails. You can configure it to always sell without the conditions above.
The script will paint the pivot lines, trailing activation/stops, EMAs and entry/exits; with extra information in the data panel. For a complete view add VWAP and RSI to your chart, which are available from TradingView official indicator library. The strategy will not rely on those added indicators since VWAP and RSI are programmed in. You can add them to track the behavior of the signals based on these filters you have configured and have a complete view trading this strategy.
As mentioned earlier, the default settings are built for SPY 2m charts, with extended hours and real-time data. Open the strategy on this chart to study how all input parameters are used. If you don't have real-time data you need to adjust the minimum volume settings (set it to 0 at first).
The backtest
The default backtest configuration is set up to simulate SPY option trading.
Start capital is set to 10,000 and we risk around 5% of that per trade (1 contract)
Commission is set to 0.005%. The reason: at the time of this publication the SPY index price is approximately $580. Two ITM 0/1 DTE options contracts, each priced around $280, which is approximately $560. The typical commission for such a trade is around $3. To simulate this commission in the backtest on the SPY index itself, a commission of 0.005% per trade has been applied, approximating the options trading costs.
Slippage of 3 is set reflecting liquid SPY
The bar magnifier feature is turned on to have more realistic fills
Trading
In backtesting, setting commission and slippage to 0 on the SPY 2m chart shows many trades result around breaking even. Personally, I view them as an opportunity and safety net to help manage emotional decisions for exits. The signals are designed for short option scalps, allowing traders to take small profits and potentially re-enter during the strategy’s position window. It's advisable to take small potential profits, such as 4%, whenever the opportunity arises and consider re-entering if the setup still looks favorable, for example price still above ema9. Exiting a long position below ema9 is a common strategy for 2m scalping.
The average trade duration is approximately 6 minutes (3 bars). The choice between ITM (in-the-money), ATM (at-the-money), or OTM (out-of-the-money) options will depend on your trading style. Personally, I’ve seen better results with ITM options because they tend to move more in sync with the underlying index, thanks to their higher delta.
It’s important to note that the signals are designed to be a helper for manual trading rather than to automate a bot. Users are encouraged to take small profits and re-enter positions if favorable conditions persist. Be mindful that past performance does not guarantee future results.
For the default SPY setup the losses will mostly be 4-10% for ITM options. Be mindful of extreme volatile conditions where losses may reach 30% quickly, especially when trading ATM/OTM options.
The following settings can be changed:
8 pivot timeframes with left/right bars and days rendered
Here you can configure the timeframes for the pivots, which are crucial. The strategy wants that a crossover has happened recently (so it might enter after a crossunder if the crossover was recent) or the price is still above the crossed pivot.
When you decide to use a pivot timeframe higher than your chart, make sure it aligns the same starting point as the chart timeframe. As stated in the 43000478429 docs, there is a dependency between the resolution and the alignment of a starting point:
1–14 minutes — aligns to the beginning of a week
15–29 minutes — aligns to the beginning of a month
from 30 minutes and higher — aligns to the beginning of a year
This alignment also affects the setting of rendered days. I recommend a max value of 5 days for 1-14 minutes timeframes.
Also make sure a higher pivot timeframe can be divided by the lower. For instance I had repaint issues using 3m pivots on a 2m chart. But 4m pivots work fine.
Please look up docs 43000478429 to make sure this information is still up to date.
Pivot rounding
The pivot rounding option is used to add pivots based on a rounded price and limit the number of pivots. While this feature is disabled by default it can be useful with tweaking strategy variations, because many orders are placed at rounded levels and tend to act as strong price barriers.
There are multiple rounding methods: round, ceil/floor, roundn (decimal) and rounding to the minimal tick.
The next feature is a powerful extension called "Cooldown rounding":
Pivot cooldown rounding
This rounds new pivot levels for a cooldown period to keep the previous pivot line instead of adding a new line when they match the rounded value within the cooldown period. The existing line will be extended. This feature is useful because it makes sure the initial line is added to the exact high/low pivot level but any future lines within the rounding will just extend the existing line. This limits the number of pivots while still having precise levels (which normal rounding lacks) and allows more precise pivot trading.
This feature also helps ensure that the number of rendered lines will not exceed 500 too much, which is the render limit on TradingView.
You can set a maximum minutes for the cooldown. The default is 3 years which will enable the cooldown rounding permanently on the intraday (due to the max bar limit).
Pivot always added when new higher/lower pivot
When using cooldown rounding, one may find it useful to override this behavior when a new lower or higher pivot level has been reached. When enabled the new level will be added despite the fact that they may be rounded the same in the cooldown check. This is a good balance between limiting pivots but also allowing preciser trading.
VWAP bands multiplier
This is used to tweak the inner VWAP working for the upper and lower band. The default VWAP multiplier (0.9) is set based on backtesting since it performed better on historic data (the strategy does not trade below the lowerband). When you add the VWAP indicator from the TradingView library to the chart, make sure it uses the same multiplier setting as within this strategy so you have a correct view of the conditions the strategy acts on.
ATR EMA smoothing length
Used to tweak the ATR EMA smoothing. By default it is set up to 4 based on deep backtesting historic data.
EMA lengths
Changing the EMA length allows you to fine tune the EMA crossing behavior. By default the strategy is set up to EMA 9 and 20 which are considered commonly used values on the 2-minute chart.
Trading intraday time restrictions
For intraday charts you can configure when the strategy starts trading after market open and when it stops, including a hard sell. This makes sure there are no open positions left for the day during backtesting and can also aid in your trading style. For example some scalpers will not trade in the first two hours. Having no signals during this time can be beneficial. It is possible to configure these settings based on the number of bars or minutes.
Not trading on days the market closes earlier
By default the strategy does not trade on days the market closes earlier in the US. This makes sure there are no open positions left open during backtesting. Make sure to change it when using it on such a day. The days are: day before independence day, day after thanksgiving, Christmas eve and new years eve.
Not trading below VWAP lowerband
Backtesting has shown poor performance when trading below the VWAP lowerband but you are free to allow it to trade in such conditions. Past performance does not guarantee future results.
Minimum volume
A minimum volume can be set up. The current value is based on better deep backtest results for SPY using real-time data (48000). When you do not have a data plan for SPY, please set it to 0 and tweak based on backtests.
Minimum ATRP
The strategy has shown during my trading that it is sensitive to higher ATRP values and more volatile market conditions. There is more chance the index moves and we can profit from this during option scalping (if it moves in your favor). The default is based on SPY backtesting (0.04%), as a balance to have a lot of trades but also capture minimal movement.
RSI range
A RSI range can be set using a minimum and maximum value so we can limit trading during overbought/oversold conditions. Backtesting for SPY has shown the strategy performs better on historic data within a tighter range, so a default range has been set to 40-65.
Allow orders on every tick (no effect on stop/profit/trail)
This setting is used to allow orders on every tick. The strategy has been developed without trading on every tick but you can change this, for example when you have configured a setup different than the default configuration that you know works well with this. The default setup will not work well with it due to too many constant signals.
Stop percentage + ATRP threshold
One of the most important settings for managing the risk. I recommend setting a stop percentage first and later the ATRP threshold where the stop is calculated based on the current ATRP value. The calculated value will only be in effect when it is greater than the normal stop--the normal stop acts as baseline. The default stop is low (0.03). With a default ATRP threshold stop of 1.12, the calculated value overrules the normal stop when the value is greater. 0.03 acts as a minimum value but in reality the stop will most likely be higher on average for SPY with the default ATRP threshold.
For the default SPY setup the losses will be around 4-10% for ITM options. Be mindful of extreme volatile conditions where losses may reach 30% quickly, especially when trading ATM/OTM options.
Profit taker percentage + ATRP threshold
Same principles as the stop percentage above, but for profit taking. There is a very high ATRP threshold of 4 set by default. Backtests showed that trailing stops perform better on historic data.
Trailing stop
Used to set up a trailing stop. A useful feature to secure profit after a run-up, or get out with a small loss after initial activation. It is important to not use too tight values because they will give unrealistic backtest results and trigger too fast in real-time. Both the trail activation level and trail stop itself can be configured with a percentage value and ATRP value. I recommend setting up the ATRP last. By default the values are 0.05 for activation and 0.03 for the stop based on SPY real-time behavior.
Always sell on pivot crossunder confirmation
The strategy includes pivot crossunder confirmations as sell condition. By default it will not sell on every crossunder confirmation but checks for different conditions (explained in detail earlier in this description). You can change this behavior.
Always sell below first EMA when position has been above
The strategy sells below the first EMA when the position has been above it. By default it will not always sell but checks for different conditions (mentioned earlier in this description). You can change this behavior.
Buy modes pivot
By default the strategy buys between pivots as long as there has been a pivot crossover and EMAs crossover recently or price is still above it. You can change the behavior so it only buys on pivot crossovers or pivot crossover confirmations. Backtesting on the default setup shows decreased performance but for other strategy variations and pivot setups this feature can be useful since many scalpers do not buy between pivots.
Strict mode
There is a strict mode that adds extra checks such as not trading when there is no next low or high pivot, requiring a VWAP uptrend only and minimum candle percentages. This mode is for analyzing history and seeing performance during these conditions. It is worth it to create a separate alert for strict mode so you are aware of these conditions during trading. The deep backtests improved with these setting but past performance does not guarantee future results.
In the strict mode section you can override the stop, minimum ATRP, set up a minimum percentage, only trade VWAP uptrends and to not trade candles without a wick.
A summary and some extra detail
At the time of release only long trades are supported
The strategy is meant for quick scalping but one might find other uses for it
Enable extended hours on intraday charts so it captures more pivots
It does not trade extended hours (pre and post market) since options do not trade during those times
real-time data is recommended and required if a symbol has delayed data by default
You can configure that it trades minutes after market open and hard sells minutes after market open
The entries have a specific label text, example: "833 LE1 / 569.71 / P:569.8". This means: / / . The condition number is only for development/debug purposes for me when you have an issue.
The strategy cannot be tweaked to work on multiple symbols and timeframes with a single config. So you will have to make a config for every timeframe and symbol. I recommend using the Indicator Templates feature of TradingView. This way you can save the settings per timeframe and symbol
The strategy is per default config very dependent on (trailing) stops because it trades between pivots too. It wants that a pivot and EMA crossover has happened more recently than a crossunder. But you can change this behavior to always force crossover buys and crossunder sells.
It’s recommended to set up alerts to notify you of entry and exit signals. Watching the chart alone might cause you to miss trades, especially in fast-moving markets.
Only a max of 500 lines can be rendered on the chart, but the strategy will function with more under the hood. When you exceed 500 you will notice the beginning of the chart has no pivots, but beneath everything functions for backtesting.
Changing settings
Changing the settings for a different symbol and/or timeframe can be a challenging task. Here's a how-to you could use the first time to help you get going:
Set commission and slippage to 0. I prefer to do this so it is more clear whether you are balancing on break-even trades
Enable the pivot timeframe equal or above your chart timeframe. Avoid repainting as discussed earlier by choosing timeframes that align with the same timeframe
Set all volume, ATR, stop, profit takers and trail values to 0
Make sure strict mode is disabled at the bottom of the settings
You now have a clean state and you should see the backtest results purely based on pivot and EMA conditions
Tweak the stop and profit taker, beginning with the simple values and then ATRP threshold
At the last moment tweak the trailing stops. Tight trailing stops create an unrealistic backtest so you will need to tweak them based on real-time behavior of the symbol you're using which you will have to monitor during signals while the market is open. The default values are low (2m intraday SPY). Only with the bar magnifier feature it is somewhat possible to tweak realistic with history data. The tighter they are, the more unrealistic your backtest results. As a starting point, set the trailing stop low and find the highest activation level that doesn't change the results drastically, then increase the stop to the value you think reflects real-time behavior.
Keep refining by testing it during real-time behavior. Does it exit too early according to your own judgment? You need to increase the stop and maybe the activation level.
I hope you will find this useful!
DISCLAIMER
Trading is risky & most day traders lose money. This indicator is purely for informational & educational purposes only. Past performance does not guarantee future results.
Optionsstrategies
Rolling Straddle PremiumScript is Basically intended to provide insight's on the Rolling Straddle premium for the selected index based on the input settings.
Important thing to consider for the script to work seamlessly:
Specify the LTP in the input field (need not be very accurate)
Specify the Expiry Date for the Option Strike.
Ensure Profile matches to the chart script (Index Script)
Note: Zones marked in Blue, is the max level that indicator can track the option prices. beyond which it may fail to track, during such time consider reloading the indicator with Latest LTP .
Labels on the chart indicate that If i had shorted the Straddle, what would be my current position of that Straddle. however the rational behind shorting is only the pivot high points (not sure if this is right or wrong! )
Note On Labels: Labels are delayed basis the pivot point candles specified in the indicator settings.
EN: Entry Price (Straddle Premium) of the Strike Specified.
Cur: Current Price ( Current Straddle Premium ) of the Strike Specified.
SH: Max Straddle Premium ( Increase in Premium ) since position is active.
SL: Min Straddle Premium ( Premium Erosion ) since position is active.
Theta Shield | Flux Charts💎 GENERAL OVERVIEW
Introducing our new Theta Shield indicator! Theta is the options risk factor concerning how fast there is a decline in the value of an option over time. This indicator aims to help the trader avoid sideways market phases in the current ticker, to minimize the risk of theta decay. For more information, please check the "How Does It Work" section.
Features of the new Theta Shield Indicator :
Foresight Of Accumulation Zones
Decrease Risk Of Theta Decay
Clear "Valid" & "Non-Valid" Signals
Validness Trail
Alerts
📌 HOW DOES IT WORK ?
In options trading, theta is defined as the rate of decline in the value of an option due to the passage of time. Traders want to avoid this kind of decay in the value of an option. One of the best ways to avoid it is not holding an option contract when the market is going sideways. This indicator uses a stochastic oscillator to try to get a foresight of sideways markets, warning the trader to not hold an option contract while the price is in a range.
The indicator starts by calculating the stochastic value using close, high & low prices of the candlesticks. Then a stoch threshold & a theta length are determined depending on the option contract type defined by the user in the settings of the indicator. Each candlestick that falls above or below the stoch threshold value is counted, and a "theta valid strength" is calculated using the counted candlesticks, which has a value between -100 & 100. Here is the formula of the "theta valid strength" value :
f_lin_interpolate(float x0, float x1, float y0, float y1, float x) =>
y0 + (x - x0) * (y1 - y0) / (x1 - x0)
thetaValid = Total Candlesticks That Fall Above & Below The Threshold In Last "Theta Length" bars.
thetaValidStrength = f_lin_interpolate(0, thetaLength, -100, 100, thetaValid)
Then a trail is rendered, and "Valid" & "Non-Valid" signals are given using this freshly calculated strength value. Valid means that the indicator currently thinks that no accumulation will happen in the near future, so the option positions in the current ticker are protected from the theta decay. Non-Valid means that the indicator thinks the ticker has entered the accumulation phase, so holding any option position is not recommended, as they may be affected by the theta decay.
🚩 UNIQUENESS
This indicator offers a unique way to avoid theta decay in options trading. It uses a stochastic oscillator and thresholds to calculate a "theta strength" value, which is used for rendering validness signals and a trail. Traders can follow the valid & non-valid signals when deciding to hold their options position or not. The indicator also has an alerts feature, so you can get notified when a ticker is about to enter a range, or when it's about to get out of it.
⚙️ SETTINGS
1. General Configuration
Contract Type -> You can set the option contract type here. The indicator will adjust itself to get a better foresight depending on the contract length.
2. Style
Fill Validness -> Will render a trail based on "theta strength" value.
[1] Dynamic Support and Resistance with breakout [Dr Future]This script appears to be designed to identify and visualize dynamic support and resistance levels on a price chart, along with potential breakout signals.
Key Components & Functionality (Inferred):
Dynamic Support and Resistance: The script likely employs algorithms to calculate and plot support and resistance levels that adjust in real-time as price action evolves.
Breakout Detection: The script probably incorporates logic to recognize when the price breaks out of these dynamic support or resistance zones. This could trigger alerts or visual cues on the chart.
Dr Future's Approach: It's worth noting the " " tag, suggesting the script might be based on specific methodologies or insights associated with a trader or analyst known as "Dr Future." Without more context on their strategies, it's difficult to pinpoint the exact techniques used.
Potential Benefits:
Adaptive Levels: Dynamic support and resistance can offer a more responsive approach compared to static levels, as they account for changing market conditions.
Breakout Opportunities: Identifying breakouts can help traders spot potential entry or exit points.
Visual Clarity: Plotting these levels directly on the chart can provide a clearer picture of the current market structure and potential turning points.
Caveats:
False Signals: Like any technical tool, dynamic support and resistance can generate false signals. Breakouts might not always lead to sustained trends.
Parameter Sensitivity: The script's effectiveness likely depends on how its parameters are configured. Fine-tuning might be required to suit different markets or timeframes.
"Dr Future" Factor: The script's performance could be tied to the specific strategies of "Dr Future," which might not be universally applicable.
Important Note:
Without access to the actual code and a deeper understanding of "Dr Future's" methods, this description is based on inference and general knowledge of technical analysis.
Recommendation:
If you're considering using this script, it would be prudent to:
Backtest Thoroughly: Test the script on historical data to assess its performance and identify potential pitfalls.
Understand the Parameters: Familiarize yourself with the script's settings and how they impact the plotted levels and breakout signals.
Combine with Other Tools: Use this script in conjunction with other technical indicators and risk management strategies for a more holistic trading approach.
BE-NSE-Distributed Straddle Intraday Trading StrategyHerewith publishing the script (not the Indicator!) for the benift of Option Traders. I call this a script as this doesn't perform any kind of analysis of candle data and provide general BUY | SELL information. This Script is based on the TRUE VALUES concept which is nothing but LTP.
Idea Behind this Script:
As an option seller i need the lower risk option premium to trade. so that, time can work in our favor. basic question which we get at the first is which option to choose out of many available.
If traders feel the question is apt then this script is for them.
Logic Behind this script:
Upon Market Open, script in the BACKEND ( Under the hood ) deployes 60 possible combinations of STRADDLES for sampling, and continue to monitor the LTP movements and compares it against opposite pairs. lets say out of 30 Straddle options one of the Straddle it picked is ATM CE VS ATM PE. for 1 rs move in underlying how much impact is happening in CE VS PE.
This simple anlysis is done at every 30 seconds. once the Analysis is complete it picks 4 options 2 on the CALL side and 2 on the PUT side, which script feels the movement of prices are smooth. SMOOTH refers that time decay that can work in our favor..
Calculations behid the script:
lets say BNF LTP is 52000 at 9:20 AM, and one of the pair script took for sampling was ATM CE vs PE which are having the LTP of 100 each.
At 9:35 AM, BNF is trading at 52075, and ATM CE is reading the LTP of 122 and ATM PUT is reading the LTP of 70. ideally LTP of Call should be around 135 and Put should be around 65 considering the usual delta of 0.48 . Net Money Index for this Pair Sample is 8
Call Side => 100 - 122 = -22
Put Side => 100 - 70 = 30
Money Index => 30 - 22 = 8 for 15 Min
This Money index is calculated across choosen samples and the Option strikes is provided as an output which has mere possiblity of working in Options Seller's favor.
How to Read the Output:
For the choosen strikes from the time of Entry (Suggested Entry time by script) till the current time, the bottom pane plots the Money index as columns. Green Columns indicate that how much option premium eroded due to time decay. Red Columns indicate that how much Option premium increased during the time.
Note: Script dynamically calculate the strikes and suggests in realtime.
WARNING or a Humble Request:
For those who don't understand the word "Repaint" how it works in Pine Script. plz don't consider using this script. For those who wish to understand I have kept the Observer mode in the settings which shall guide you on why the Money Index shown on the chart when the MARKET IS CLOSED is different than when the MARKET IS OPEN (Realtime).
Disclaimer:
I have tested the script only in BNF and not sure if this works on Nifty, FinNifty or others. you may still try and plz do provide the feedback for improvising the script.
----- BreathEasy --------
The information contained in my scripts/indicators/ideas does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, or individual’s trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
My scripts/indicators/ideas are only for educational purposes!
[Options Strategies] Selling Covered Calls and Puts (TSO) This trading indicator assists with traditional covered options trading strategies like Covered Calls, Covered Puts, and Cash Secured Puts. It also offers advanced features for trading options intelligently by utilizing options specific levels, such as BE (Break Even) and Strike (all visually shown on chart) in combination with S&R (Support and Resistance), Trend Lines, and other technical analysis tools such as MA (Moving Averages) and ATR Average True Range, all integrated within the indicator.
* Covered options approach over trading shares or options separately offers distinct advantages:
- Reduced Risk and Flexibility : Covered options strategy provides a more conservative approach by combining stock ownership with options trading. It reduces risk exposure compared to buying options outright or trading shares alone. Additionally, it offers flexibility in various market conditions.
- Profitability in Sideways Markets: Covered options allow for profitability in scenarios where the stock price is either moving optimally or remaining sideways. In contrast, just holding stocks might not yield significant gains in a sideways market, and buying options can result in losses due to time decay.
- Protection Against Price Movements: In covered options, if the stock price goes against the trade, the loss is mitigated by the premium received from selling the options. This provides a level of protection compared to other trading strategies where losses can accumulate more rapidly.
==============================================================
Strategies / Visual Examples:
---------------------------------------------------------------------------
---------------------------------------------------------------------------
Up to 3 Symbols can be monitored at the same time with alerts for each Symbol and a Stats Table. To see Symbol's visuals (Date Range, Strike, BE, etc.) - the chart has to be loaded with that Symbol. Here is an example of trading multiple stocks at same layout on different charts trading AAPL, BAC and TSLA.
---------------------------------------------------------------------------
---------------------------------------------------------------------------
An example of a Smart Covered Calls trading SPY.
STRATEGY EXPLANATION:
* Trade Open Trigger (Bullish/Sideway)
>>> S&R (Support and Resistance) or Trend Line broken, bounced off or simply near (if price is near/slightly crossing S&R/Trend Line > a bounce often takes place)
>>> Confirmation by additional TA (Technical Analysis) tools.
>>> EXAMPLE: Broken Resistance combined with a Trend Line up-bounce, confirmed by bullish 200EMA.
* TP (Take-Profit)
>>> Contracts Expire at Expiration date: Premium received for selling contracts kept.
>>> Assignment: Premium received for selling contracts kept + stock assigned/sold at a higher price than it was purchased.
* BE/SL (Break Even Stop-Loss) |
>>> BE/SL hit: stock sold at a slight loss with options contracts bought out (BTC - Buy to Close) at a lower price than initially sold (since price went down and these are calls), so technically the loss is reduced by the partial Premium still kept from initially sold contracts at trade open.
>>> Increasing the BE/SL distance: for wider BE/SL > Bid Price needs to be increased:
- Set longer Expiration date.
- Set closer Strike price.
NOTE: With longer Expiration date and closer Strike, chances of assignment increase as well. It's best to find an optimal level, where BE/SL is behind a Support/Resistance level and/or an established trend line and/or Large Length Moving Average, yet not extremely far away.
---------------------------------------------------------------------------
---------------------------------------------------------------------------
An example of a Smart Covered Puts trading SPY.
STRATEGY EXPLANATION:
* Trade Open Trigger (Bearish/Sideway)
>>> S&R (Support and Resistance) or Trend Line broken, bounced off or simply near (if price is near/slightly crossing S&R/Trend Line > a bounce often takes place)
>>> Confirmation by additional TA (Technical Analysis) tools.
>>> EXAMPLE: Broken Resistance combined with a Trend Line down-bounce, confirmed by bearish 200EMA.
* TP (Take-Profit)
>>> Contracts Expire at Expiration date: Premium received for selling contracts kept.
>>> Assignment: Premium received for selling contracts kept + stock assigned/bought-to-cover at a lower price than it was shorted.
* BE/SL (Break Even Stop-Loss) |
>>> BE/SL hit: stock bought-to-cover at a slight loss with options contracts bought out (BTC - Buy to Close) at a lower price than initially sold (since price went up and these are puts), so technically the loss is reduced by the partial Premium still kept from initially sold contracts at trade open.
>>> Increasing the BE/SL distance: for wider BE/SL > Bid Price needs to be increased:
- Set longer Expiration date.
- Set closer Strike price.
NOTE: With longer Expiration date and closer Strike, chances of assignment increase as well. It's best to find an optimal level, where BE/SL is behind a Support/Resistance level and/or an established trend line and/or Large Length Moving Average, yet not extremely far away.
---------------------------------------------------------------------------
---------------------------------------------------------------------------
An example of a Smart Secured Cash Puts trading SPY.
STRATEGY EXPLANATION:
* Trade Open Trigger (Bullish/Sideway)
>>> Bullish steady trend.
>>> Confirmation by additional TA (Technical Analysis) tools.
>>> EXAMPLE: Slowly rising price action above 200EMA.
* TP (Take-Profit)
>>> Early BTC: BTC (Buy to Close) before Expiration date if options premium/contract price already reduced by at least 50-90% (the reduced price is the profit, if premium lost 90% - only 10% will need to be paid to buy options out to close the trade) and if the stock price is nearing Resistance, Trend Line or big length moving average (like 200EMA) as a bounce may happen or even a potential reverse of the trend. If there is no trend reversal or a small correction bounce occurs, with further trend continuation > another Cash Secured Puts trade can be opened with new Expiration date and Strike.
>>> Contracts Expire at Expiration date: Premium received for selling contracts kept, considering the Strike was never hit.
>>> Assignment with stock closing below Strike and above/near BE (Break Even): Premium received for selling contracts kept. NOTE: It is best to get rid of the stock ASAP to then open a new Cash Secured Puts trade with lower Strike and a new Expiration date.
* BE/SL (Break Even Stop-Loss) |
>>> BE/SL hit: contracts bought out (BTC - Buy to Close) at a higher price than initially sold (since price went down and these are puts), the amount/difference in current contract price is the loss (as premium received + contract price increase is the total cost, which will have to be paid to buy the countracts out).
>>> Increasing the BE/SL distance: for wider BE/SL > Bid Price needs to be increased:
- Set longer Expiration date.
- Set closer Strike price.
NOTE: With longer Expiration date and closer Strike, chances of assignment increase as well. It's best to find an optimal level, where BE/SL is behind a Support/Resistance level and/or an established trend line and/or Large Length Moving Average, yet not extremely far away.
---------------------------------------------------------------------------
---------------------------------------------------------------------------
An example of Options Wheel strategy trading TQQQ. See how Strike and BE (Break Even) hits are displayed every time they occur.
STRATEGY EXPLANATION:
* Trade Open Trigger (Bullish/Sideway)
>>> Options Wheel strategy combines Cash Secured Puts with Covered Calls, so a steady bullish trend is preferred with lower volatility.
>>> It's best to start with Cash Secured Puts until assignment hits (stocks purchased), then switch to Covered Calls until assignment hits (stocks sold) and so on.
* TP (Take-Profit)
>>> Contracts Expire at Expiration date: Premium received for selling contracts kept.
>>> Assignment: Premium received for selling contracts kept. Stock is assigned (purchased if Cash Secured Puts were sold | sold if Covered Calls were sold ).
* BE/SL (Break Even Stop-Loss)
>>> Assignment is the stop-loss for this strategy, which ends current trade and starts next one. It is not a direct loss, but could result a long unrealized losses if after stock purchase assignment it goes down for a while or even a complete loss if low-cap company is used and it goes out of business.
>>> BE/SL distance can still be increased/kept optimal: for wider BE/SL > Bid Price needs to be increased:
- Set longer Expiration date.
- Set closer Strike price.
NOTE: With longer Expiration date and closer Strike, chances of assignment increase as well. It's best to find an optimal level, where BE/SL is behind a Support/Resistance level and/or an established Trend Line and/or Large Length Moving Average, yet not extremely far away.
| 3.0_wheel_strategy_tqqq_example.png
===========================================================================
Trading open/close/TP/SL labels, plots and colors explanations:
---------------------------------------------------------------------------
There are 3 approaches: Cashed Secured Puts, Covered Puts, Covered Calls. Here is an example showing all 3 (the Strikes, Bid prices, Expirations were chosen realistically).
>>> There are 3 symbol templates, the color can be changed for each and each symbol template can be unchecked to be fully hidden or all 3 can be used.
>>> Strike: dashed horizontal line plotted at chosen Strike, if Strike is hit within the Date Range - there will be a label shown.
>>> BE (Break Even): dotted horizontal line plotted at calculated BE, if BE is hit within the Date Range - there will be a label shown.
>>> Stock Purchased: solid horizontal line plotted at input price at which the stock was purchased.
>>> Date Range (STO >>> Expiration ): vertical lines with arrows (arrows direction is based on the approach), which connect Strike, BE (Break Even) and Stock Purchased creating an square/rectangle of the whole trade, making it easy to see everything at once.
>>> Stats Table: shows all the necessary data for each symbol.
===========================================================================
GLOBAL SETTINGS ///////////////////////////////////////////////////////////
---------------------------------------------------------------------------
>>> Show: week divider vertical lines: Will show vertical divider lines separating each week.
>>> Show: Mondays and Fridays: Will show M - for Monday, F - for Friday, T - for Tuesday (Tuesday will be shown if there is a Holiday on Monday)
---------------------------------------------------------------------------
OPTIONS SETUP: SYMBOL0X /////////////////////////////////////////////////// | (identical for all 3 symbols)
---------------------------------------------------------------------------
>>> Symbol0X | Show Table: Turns on symbol01, all visuals on chart, calculations, etc. Table can be separately hidden if desired.
>>> Label Size: Size of the labels on chart showing Strike, BE (Break Even), etc.
>>> Label Color: Color for all symbol0X labels.
>>> Text Color: Text color for all symbol0X labels.
>>> Options Trading Style: 1)Covered Calls: Bullish-sideways market approach (need to own 100 shares of stock per each contract sold), Strike price has to be set above the current stock price | 2)Covered Puts: Bearish-sideways market approach (need to own 100 shares of stock per each contract sold), Strike price has to be set below the current stock price | 3)Cash Secured Puts: Bullish-sideways approach (need to have enough cash to acquire shares at Strike price if hit), Strike price has to be set below the current stock price.
>>> # of contracts sold (1 contract > 100shares): # of contracts sold per trade, for Covered Calls and Covered Puts, every contract must be backed up by 100shares of the underlying stock.
>>> Price per 1 contract (Bid): Premium received per each contract sold.
>>> Strike Price.
>>> Stock Purchase Price: Stock purchase price (NOTE: This is only for Covered Call and Covered Puts, for Secured Cash Puts - stock is only purchased if at Expiration it closes beyond Strike price).
>>> STO (Sell to Open) Date: date at which the contracts were sold and Premium received.
>>> Exp (Expiration) Date: date at which contracts expire, if price never breaks the Strike at Expiration - contracts become worthless!
>>> Alert/Label: Futures Expire Soon: With this setting turned on, an Alert will trigger and a Label will be shown at opening of the first candle bar on the Expiration date. It will certainly be before the end of the day, however depending on the chart TimeFrame during alert creation - it may trigger at a different time. For Example: On a Daily chart TimeFrame SPY (S&P500) will trigger such alert at 9:30AM ET. ||| NOTE: Due to difference in timezones - the solid lines representing the STO >>> Exp range may be off by 1 business day from the date input in the indicator Settings > Inputs, so double check and calibrate the date by setting it 1 day behind/ahead from actual dates so that Alert is received on the actual Expiration date.
>>> Strike price Broken - Style: 'Close': Show/Alert Strike price broken only once candle bar is closed | 'Live': Show/Alert Strike price broken immediately once it happens, before candle bar is closed.
>>> Show: Strike price Broken: will show a label near candle bar breaking the Strike price.
>>> Alert: Strike price Broken: will alert at price breaking the Strike price.
>>> BE (Break Even) price Broken - Alert Style: 'Close': Show/Alert BE (Break Even) price broken only once candle bar is closed | 'Live': Show/Alert BE (Break Even) price broken immediately once it happens, before candle bar is closed.
>>> Show: BE (Break Even) price Broken: will show a label near candle bar breaking the BE price.
>>> Alert: BE (Break Even) price Broken: will alert at price breaking the BE price.
---------------------------------------------------------------------------
TA: TREND LINES ///////////////////////////////////////////////////////////
---------------------------------------------------------------------------
>>> Trend Lines - Uptrend/downtrend colors
>>> Show: Trend Lines: Show/Hide trend lines
>>> Show: Trend Line Breaks: Show/Hide labels where trend lines were broken
>>> Alert: Trend Line Breaks: Alert when trend line is broken
>>> Trend Lines - Search - Left Bars / Trend Lines - Search - Right Bars: how many candle bars will be used to calculate Trend Lines, the bigger the number > the more precise and less amount of trend lines will be found
>>> Trend Lines - Extend Setting
---------------------------------------------------------------------------
TA: S&R (SUPPORT AND RESISTANCE) //////////////////////////////////////////
---------------------------------------------------------------------------
>>> S&R (Support and Resistance) - Support/Resistance colors.
>>> Show: S&R (Support and Resistance) Top/Bottom Levels.
>>> Show: S&R (Support and Resistance) Top/Bottom Level Breaks: Show/Hide labels where support/resistance levels were broken
>>> Alert: S&R (Support and Resistance) Top/Bottom Level Breaks: Alert when S&R (Support and Resistance) level is broken
>>> S&R (Support and Resistance) - Search - Left Bars / S&R (Support and Resistance) - Search - Right Bars: how many candle bars will be used to calculate S&R (Support & Resistance) Levels, the bigger the number > the more precise and less amount of support and resistance levels will be found.
>>> S&R Search - Custom Resolution: This is a custom timeframe setting specifically for S&R Search, it disregards current chart timeframe. This is great to use for scalping, for example: with main chart set to 1min and the custom timeframe set to 3min or 5min - there will be stronger support/resistance levels with more detailed price action.
---------------------------------------------------------------------------
TA: ADDITIONAL TOOLS //////////////////////////////////////////////////////
>>> Show - MA (Moving Average).
>>> Show - ATR (Average True Range).
---------------------------------------------------------------------------
---------------------------------------------------------------------------
STATS TABLE ///////////////////////////////////////////////////////////////
Stats Table displays all the necessary date about each options setup.
>>> Table positioning
---------------------------------------------------------------------------
===========================================================================
Adding Alerts in TradngView
---------------------------------------------------------------------------
-Add indicator to chart and make sure to check/uncheck which alerts are required, then simply create it.
-Right-click anywhere on the TradingView chart
-Click on Add alert
-Condition: Select this indicator by it’s name
-Immediately below, change it to "alert() function calls only"
-Expiration: Open-ended (that may require higher tier TradingView account, otherwise the alert will need to be occasionally re-triggered)
-Alert name: Whatever you desire
-Hit “Create”
-Note: If you change ANY Settings within the indicator – you must DELETE the current alert and create a new one per steps above, otherwise it will continue triggering alerts per old Settings!
===========================================================================
If you have any questions or issues with the indicator, please message me directly via TradingView.
---------------------------------------------------------------------------
Good Luck! (NOTE: Trading is very risky, past performance is not necessarily indicative of future results, so please trade responsibly!)
BetaBeta , also known as the Beta coefficient, is a measure that compares the volatility of an individual underlying or portfolio to the volatility of the entire market, typically represented by a market index like the S&P 500 or an investible product such as the SPY ETF (SPDR S&P 500 ETF Trust). A Beta value provides insight into how an asset's returns are expected to respond to market swings.
Interpretation of Beta Values
Beta = 1: The asset's volatility is in line with the market. If the market rises or falls, the asset is expected to move correspondingly.
Beta > 1: The asset is more volatile than the market. If the market rises or falls, the asset's price is expected to rise or fall more significantly.
Beta < 1 but > 0: The asset is less volatile than the market. It still moves in the same direction as the market but with less magnitude.
Beta = 0: The asset's returns are not correlated with the market's returns.
Beta < 0: The asset moves in the opposite direction to the market.
Example
A beta of 1.20 relative to the S&P 500 Index or SPY implies that if the S&P's return increases by 1%, the portfolio is expected to increase by 12.0%.
A beta of -0.10 relative to the S&P 500 Index or SPY implies that if the S&P's return increases by 1%, the portfolio is expected to decrease by 0.1%. In practical terms, this implies that the portfolio is expected to be predominantly 'market neutral' .
Calculation & Default Values
The Beta of an asset is calculated by dividing the covariance of the asset's returns with the market's returns by the variance of the market's returns over a certain period (standard period: 1 years, 250 trading days). Hint: It's noteworthy to mention that Beta can also be derived through linear regression analysis, although this technique is not employed in this Beta Indicator.
Formula: Beta = Covariance(Asset Returns, Market Returns) / Variance(Market Returns)
Reference Market: Essentially any reference market index or product can be used. The default reference is the SPY (SPDR S&P 500 ETF Trust), primarily due to its investable nature and broad representation of the market. However, it's crucial to note that Beta can also be calculated by comparing specific underlyings, such as two different stocks or commodities, instead of comparing an asset to the broader market. This flexibility allows for a more tailored analysis of volatility and correlation, depending on the user's specific trading or investment focus.
Look-back Period: The standard look-back period is typically 1-5 years (250-1250 trading days), but this can be adjusted based on the user's preference and the specifics of the trading strategy. For robust estimations, use at least 250 trading days.
Option Delta: An optional feature in the Beta Indicator is the ability to select a specific Delta value if options are written on the underlying asset with Deltas less than 1, providing an estimation of the beta-weighted delta of the position. It involves multiplying the beta of the underlying asset by the delta of the option. This addition allows for a more precise assessment of the underlying asset's correspondence with the overall market in case you are an options trader. The default Delta value is set to 1, representing scenarios where no options on the underlying asset are being analyzed. This default setting aligns with analyzing the direct relationship between the asset itself and the market, without the layer of complexity introduced by options.
Calculation: Simple or Log Returns: In the calculation of Beta, users have the option to choose between using simple returns or log returns for both the asset and the market. The default setting is 'Simple Returns'.
Advantages of Using Beta
Risk Management: Beta provides a clear metric for understanding and managing the risk of a portfolio in relation to market movements.
Portfolio Diversification: By knowing the beta of various assets, investors can create a balanced portfolio that aligns with their risk tolerance and investment goals.
Performance Benchmarking: Beta allows investors to compare an asset's risk-adjusted performance against the market or other benchmarks.
Beta-Weighted Deltas for Options Traders
For options traders, understanding the beta-weighted delta is crucial. It involves multiplying the beta of the underlying asset by the delta of the option. This provides a more nuanced view of the option's risk relative to the overall market. However, it's important to note that the delta of an option is dynamic, changing with the asset's price, time to expiration, and other factors.
[BCT] Option Pricing via Markov Chain Monte Carlo SimulationOverview:
This script offers a toolkit for quantitative options trading, using Monte Carlo simulations based on actual historical returns to model potential future price paths for underlying assets. A range of metrics related to options trading are also provided.
Monte Carlo Simulations:
The script employs Monte Carlo simulations to model future price paths based on the historical returns of the underlying asset. These simulated paths are represented as parabolas at the 2-sigma, 25th percentile, and median levels for quick reference.
Methodologies:
For calculating options prices at At-the-Money (or any user-selected strike), two methodologies are used:
Simple Averaging: Takes the mean of the simulated asset price paths.
Kernel Density Estimation (KDE): Applied to the simulated asset price paths to produce a smoothed estimate of its probability density function, thereby aiding in a more nuanced option price calculation.
Bootstrap Resampling:
Bootstrap resampling is specifically applied to the simulated asset price paths to generate an estimate of the standard deviation of the options prices. Note that while bootstrap methods are employed, they serve as statistical tools and do not guarantee statistical reliability.
Metrics Displayed:
Model-Estimated At-the-Money (or selected strike) Straddle Price
Model-Estimated At-the-Money (or selected strike) Call Price
Model-Estimated At-the-Money (or selected strike) Put Price
Model-Estimated Standard deviation for Option Prices from simulated price paths
Underlying Monte Carlo Simulation Results (represented as parabolas at the 2 sigma, 25 percentile and median)
This is not financial advice. Use at your own risk.
Disclaimer: Options trading carries a high level of risk and may not be suitable for all investors. This script is intended to serve as an educational tool and should not be considered financial advice. While designed to aid in decision-making, the script's indicators are not guarantees of performance or outcomes. Always conduct your own due diligence before making trading decisions.
Options Price CalculatorIn the team, we continue to explore and expand the boundaries of TradingView.
For now, there is not much an options trader can do with options in TradingView.
We wanted to change that and created a simple option pricer.
You can set up in parameters a set of strikes, implied volatility, and days to expiry.
The indicators will take a risk-free rate from US01Y and the underlying price from your current chart.
It will compute prices and greeks for both put and call options.
Thanks to @MUQWISHI for helping code it.
Disclaimer
Please remember that past performance may not indicate future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting.
This post and the script don’t provide any financial advice.
Implied and Historical Volatility v4There is a famous option strategy📊 played on volatility📈. Where people go short on volatility, generally, this strategy is used before any significant event or earnings release. The basic phenomenon is that the Implied Volatility shoots up before the event and drops after the event, while the volatility of the security does not increase in most of the scenarios. 💹
I have tried to create an Indicator using which you
can analyse the historical change in Implied Volatility Vs Historic Volatility.
To get a basic idea of how the security moved during different events.
Notes:
a) Implied Volatility is calculated using the bisection method and Black 76 model option pricing model.
b) For the risk-free rate I have fetched the price of the “10-Year Indian Government Bond” price and calculated its yield to be used as our Risk-Free rate.
Jerry J8 30-123 Spy Dashboard ProPlease watch the J8 Scalping Tutorial Video below for a walkthrough on how these indicators work.
This script is used in conjunction with Jerry J8 30-123 SPY Scalping PRO” Indicator(which creates the buy and sell orders as a strategy). The Dashboard shows the 4 main criteria statuses from the strategy. I find the dashboard makes scalping the SPY much easier.
This study project is designed for scalping options that expire daily with bull put and bear call credit spreads on a 3 minute chart. The name 30_123 is a reference to 4 main criteria being met to give a green light for a potential trade. The criteria:
* 30 = 30 minute trend
* 1 = 3 minute trend
* 2 = Moving average criteria
* 3 = RSI criteria
4 = Secondary trend. Bonus if in sync but not a requirement.
* The strategy also utilizes momentum as a criteria but this is not shown on the dashboard.
This indicator is designed to trade options that expire daily including the SPY, IWM, QQQ, and NDX. However, it can be used with multiple symbols on a 3 minute chart.
When the 30_123 conditions are all green with all criteria are met a bull signal is created.
When the 30_123 conditions are all red with all criteria are met a bear signal is created.
This study is the dashboard that is designed to show how the main J8 strategy indicator is working and it shows which criteria have been met. Additionally there are multiple user INPUTS that you can adjust for the 4 main criteria plus inputs to help you with your credit spread criteria.
For example, if the SPY is at 400 we could have an order to sell a BULL PUT CREDIT SPREAD and I would likely sell the 398p and buy the 397p; The 398p delta would be approximately -.2. The spread position profits with any close over 398 and/or can be closed early with a bullish price move. IMPORTANT: If the SPY closed the day at $399 on the chart it would look like a loss based on the buy and sell orders but the spread would be a full profit since the close was above 398.
---- IRON CONDOR
For the SPY ticker only an iron condor label is generated when the SPY is trading sideways and meets specified criteria. When the criteria is met the Iron Condor label appears and it provides a recommendation for what option to buy and sell. The iron condor recommendations can be adjusted with user inputs.
This Indicator dashboard shows the criteria labels and colors the criteria as green if bullish and red if bearish. When the criteria are not met the dashboard shows “NO CLEAR SIGNAL”. There is also a label that shows whether you are looking for bullish or bearish positions based on the 30 minute trend.
The chart shown on the indicator is the RSI and for this indicator an RSI over 50 is bullish and under 50 is bearish. The line color shows the RSI trend. RSI OB (overbought) and OS (oversold) areas are shaded. The RSI can remain in an OB or OS state for a prolonged period and while some people use OB and OS as a reversal signal I use it as a strong trend indication and recognize it will not last forever. You can SET the OB and OS levels with inputs.
---- USER INPUTS
Paint Bars: Turns on/off the candle coloring. Default is OFF.
Iron Condor Settings: Defaults are what I use and can be used as a guide.
Criteria: Trend, moving averages, and RSI settings can all be adjusted.
---- SETUP & HINTS
Add "Jerry J8 30-123 SPY Scalping PRO” indicator to show bull and bear signals
Add "Jerry J8 MACD Optimal Entry Zone” indicator to show best MACD range for entry
I also like to add "Jerry Momentum Dream" indicator to see the momentum
With this indicator we’re looking for the 30, 1, 2, and 3 criteria to be met which increases our likelihood of success. IMPORTANT. Never automatically enter a position without reviewing the other indicators and drawing your own conclusions. You want to choose the entries that are the most appealing to you that take into account volume, time of day, and risk/reward. Positions should be closed based on your risk/reward goals.
Indicators are not a magic pill and should be used to support trading decisions, not to make them for you. Past performance is not a guarantee of future returns. The results of individual stocks/indexes with any strategy do not constitute proof they will repeat in the future.
DISCLAIMER: The information contained in our scripts/indicators/ideas does not constitute financial advice or a solicitation to buy or sell any securities of any type. Trading and investing in the stock market and cryptocurrencies involves substantial risk of loss and is not suitable for every investor. I’m NOT a financial adviser. All trading strategies are used at your own risk.
Please Use the AUTHOR’s INSTRUCTIONS link below for more information.
NOTE: The PERFORMANCE SUMMARY below does not accurately reflect the trading strategy because the entry orders generated in the strategy are based on the stock price and our actual order is a credit spread that is profitable even if the price moves against us a little bit. What could show as a loss in the strategy could be a profit in the credit spread.
VolatilityCone by ImpliedVolatilityThis volatility cone draws the implied volatility as standard deviations from a measurement date.
For best results set measurement date to high volume bars.
How to use:
1) Select VolatilityCone from Indicators
2) Click to the chart to set the measurement date
3) Determine the impliedvolatility for the measurement date of your symbol
e.g.
For S&P500 use VIX value at measurement date for implied volatility
Volatility Cone [Loxx]When it comes to forecasting volatility, it seems that the old axiom about weather is applicable: "Everyone talks about it, but no one can do much about it!" Volatility cones are a tool that may be useful in one’s attempt to do something about predicting the future volatility of an asset.
A "volatility cone" is a plot of the range of volatilities within a fixed probability band around the true parameter, as a function of sample length. Volatility cone is a visualization tool for the display of historical volatility term structure. It was introduced by Burghardt and Lane in early 1990 and is popular in the option trading community. This is mostly a static indicator due to processor load and is restricted to the daily time frame.
Why cones?
When we enter the options arena, in an effort to "trade volatility," we want to be able to compare current levels of implied volatility with recent historical volatility in an effort to assess the relative value of the option(s) under consideration Volatility cones can be an effective tool to help us with this assessment. A volatility cone is an analytical application designed to help determine if the current levels of historical or implied volatilities for a given underlying, its options, or any of the new volatility instruments, such as VolContractTM futures, VIX futures, or VXX and VXZ ETNs, are likely to persist in the future. As such, volatility cones are intended to help the user assess the likely volatility that an underlying will go on to display over a certain period. Those who employ volatility cones as a diagnostic tool are relying upon the principle of "reversion to the mean." This means that unusually high levels of volatility are expected to drift or move lower (revert) to their average (mean) levels, while relatively low volatility readings are expected to rise, eventually, to more "normal" values.
How to use
Suppose you want to analyze an options contract expiring in 3-months and this current option has an current implied volatility 25.5%. Suppose also that realized volatility (y-axis) at the 3-month mark (90 on the x-axis) is 45%, median in 35%, the 25th percentile is 30%, and the low is 25%. Comparing this range to the implied volatility you would maybe conclude that this is a relatively "cheap" option contract. To help you visualize implied volatility on the chart given an expiration date in bars, the indicator includes the ability to enter up to three expirations in bars and each expirations current implied volatility
By ascertaining the various historical levels of volatility corresponding to a given time horizon for the options futures under consideration, we’re better prepared to judge the relative "cheapness" or "expensiveness" of the instrument.
Volatility options
Close-to-Close
Close-to-Close volatility is a classic and most commonly used volatility measure, sometimes referred to as historical volatility .
Volatility is an indicator of the speed of a stock price change. A stock with high volatility is one where the price changes rapidly and with a bigger amplitude. The more volatile a stock is, the riskier it is.
Close-to-close historical volatility calculated using only stock's closing prices. It is the simplest volatility estimator. But in many cases, it is not precise enough. Stock prices could jump considerably during a trading session, and return to the open value at the end. That means that a big amount of price information is not taken into account by close-to-close volatility .
Despite its drawbacks, Close-to-Close volatility is still useful in cases where the instrument doesn't have intraday prices. For example, mutual funds calculate their net asset values daily or weekly, and thus their prices are not suitable for more sophisticated volatility estimators.
Parkinson
Parkinson volatility is a volatility measure that uses the stock’s high and low price of the day.
The main difference between regular volatility and Parkinson volatility is that the latter uses high and low prices for a day, rather than only the closing price. That is useful as close to close prices could show little difference while large price movements could have happened during the day. Thus Parkinson's volatility is considered to be more precise and requires less data for calculation than the close-close volatility. One drawback of this estimator is that it doesn't take into account price movements after market close. Hence it systematically undervalues volatility. That drawback is taken into account in the Garman-Klass's volatility estimator.
Garman-Klass
Garman Klass is a volatility estimator that incorporates open, low, high, and close prices of a security.
Garman-Klass volatility extends Parkinson's volatility by taking into account the opening and closing price. As markets are most active during the opening and closing of a trading session, it makes volatility estimation more accurate.
Garman and Klass also assumed that the process of price change is a process of continuous diffusion (geometric Brownian motion). However, this assumption has several drawbacks. The method is not robust for opening jumps in price and trend movements.
Despite its drawbacks, the Garman-Klass estimator is still more effective than the basic formula since it takes into account not only the price at the beginning and end of the time interval but also intraday price extremums.
Researchers Rogers and Satchel have proposed a more efficient method for assessing historical volatility that takes into account price trends. See Rogers-Satchell Volatility for more detail.
Rogers-Satchell
Rogers-Satchell is an estimator for measuring the volatility of securities with an average return not equal to zero.
Unlike Parkinson and Garman-Klass estimators, Rogers-Satchell incorporates drift term (mean return not equal to zero). As a result, it provides a better volatility estimation when the underlying is trending.
The main disadvantage of this method is that it does not take into account price movements between trading sessions. It means an underestimation of volatility since price jumps periodically occur in the market precisely at the moments between sessions.
A more comprehensive estimator that also considers the gaps between sessions was developed based on the Rogers-Satchel formula in the 2000s by Yang-Zhang. See Yang Zhang Volatility for more detail.
Yang-Zhang
Yang Zhang is a historical volatility estimator that handles both opening jumps and the drift and has a minimum estimation error.
We can think of the Yang-Zhang volatility as the combination of the overnight (close-to-open volatility ) and a weighted average of the Rogers-Satchell volatility and the day’s open-to-close volatility . It considered being 14 times more efficient than the close-to-close estimator.
Garman-Klass-Yang-Zhang
Garman Klass is a volatility estimator that incorporates open, low, high, and close prices of a security.
Garman-Klass volatility extends Parkinson's volatility by taking into account the opening and closing price. As markets are most active during the opening and closing of a trading session, it makes volatility estimation more accurate.
Garman and Klass also assumed that the process of price change is a process of continuous diffusion (geometric Brownian motion). However, this assumption has several drawbacks. The method is not robust for opening jumps in price and trend movements.
Despite its drawbacks, the Garman-Klass estimator is still more effective than the basic formula since it takes into account not only the price at the beginning and end of the time interval but also intraday price extremums.
Researchers Rogers and Satchel have proposed a more efficient method for assessing historical volatility that takes into account price trends. See Rogers-Satchell Volatility for more detail.
Exponential Weighted Moving Average
The Exponentially Weighted Moving Average (EWMA) is a quantitative or statistical measure used to model or describe a time series. The EWMA is widely used in finance, the main applications being technical analysis and volatility modeling.
The moving average is designed as such that older observations are given lower weights. The weights fall exponentially as the data point gets older – hence the name exponentially weighted.
The only decision a user of the EWMA must make is the parameter lambda. The parameter decides how important the current observation is in the calculation of the EWMA. The higher the value of lambda, the more closely the EWMA tracks the original time series.
Standard Deviation of Log Returns
This is the simplest calculation of volatility . It's the standard deviation of ln(close/close(1))
Sampling periods used
5, 10, 20, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330, and 360
Historical Volatility plot
Purple outer lines: High and low volatility values corresponding to x-axis time
Blue inner lines: 25th and 75th percentiles of volatility corresponding to x-axis time
Green line: Median volatility values corresponding to x-axis time
White dashed line: Realized volatility corresponding to x-axis time
Additional things to know
Due to UI constraints on TradingView it will be easier to visualize this indicator by double-clicking the bottom pane where it appears and then expanded the y- and x-axis to view the entire chart.
You can click on each point on the graph to see what the volatility of that point is.
Option expiration dates will show up as large dots on the graph. You can input your own values in the settings.
Variety Distribution Probability Cone [Loxx]Variety Distribution Probability Cone forecasts price within a range of confidence using Geometric Brownian Motion (GBM) calculated using selected probability distribution, volatility, and drift. Below is detailed explanation of the inner workings of the indicator and the math involved. While normally this indicator would be used by options traders, this can also be used by regular directional traders who wish to observe a forecast of the confidence interval of possible prices over time.
What is a Random Walk
A random walk is a path which consists of a set of random steps. The starting point is zero and following movement may be one step to the left or to the right with equal probability. In the random walk process, there is no observable trend or pattern which are followed by the objects that is the movements are completely random. That is why the prices of a stock as it moves up and down can be modeled by random a walk process.
Stock Prices and Geometric Brownian Motion
Brownian motion, as first conceived by the botanist Robert Brown (1827), is a mathematical model used to describe random movements of small particles in a fluid or gas. These random movements are observed in the stock markets where the prices move up and down, randomly; hence, Brownian motion is considered as a mathematical model for stock prices.
P(exp(lnS0 + (mu + 1/2*sigma^2)t - z(0.05)*sigma*t^0.5) <= St <= exp(lnS0 + (mu + 1/2*sigma^2)t + z(0.05)*sigma*t^0.5)) = 0.95
Probability Distributions
Typically the normal distribution is used, but for our purposes here we extend this to Student t-distribution, Cauchy, Gaussian KDE, and Laplace
Student's t-Distribution
The probability density function of the Student’s t distribution is given by
g(x) = (L(v+1)/2) / L(v/2) * 1 / L(sqrt(v)) * (1 + x^2/v) ^ (-(v+1)/2)
with v degrees of freedom and v >= 0, denoted by X ~ t(v). The mean is 0 and the variance is v/(v-2). It is known that as v tends to infinity, the Student’s t-distribution tends to a standard normal probability density function, which has a variance of one. Blattberg and Gonedes were the first to propose that stock returns could be modeled by this distribution. (Blattberg and Gonedes, 1974) Platen and Sidorowicz later reaffirmed these findings.(Platen and Rendek, 2007) Finally, Cassidy, Hamp, and Ouyed used these findings to derive the Gosset formula, which is the Student t version of the Black-Scholes model.(Cassidy et al., 2010) They found that v = 2.65 provides the best fit when looking at the past 100 years of returns. They realized that as markets become more turbulent, the degrees of freedom should be adjusted to a smaller value.(Cassidy et al., 2010)
Cauchy Distribution
The probability density function of the Cauchy distribution is given by
f(x) = 1 / (theta*pi*(1 + ((x-n)/v)))
where n is the location parameter and theta is the scale parameter, for -infinity < x < infinity and is denoted by X ~ CAU(L,v). This model is similar to the normal distribution in that it is symmetric about zero, but the tails are fatter. This would mean that the probability of an extreme event occurring lies far out in the distributions tail. Using a crude example, if the normal distribution gave a probability of an extreme event occurring of 0.05% and the “best case” scenario of this event occurring 300 years, then using the Cauchy distribution one would find that the probability of occurring would be around 5% and now the “best case” scenario might have been reduced to only 63 years. Thus giving extreme events more of a likelihood of occurring. The mean, variance, and higher order moments are not defined (they are infinite); this implies that n and theta cannot be related to a mean and standard deviation. The Cauchy distribution is related to the Student’s t distribution T ~ CAU(1,0) when v = 1. In 1963, Benoit Mandelbrot was the first to suggest that stock returns follow a stable distribution, in particular, the Cauchy distribution.(Mandelbrot, 1963) His work was validated by Eugene Fama in 1965.(Fama, 1965) Recent research by Nassim Taleb came to the same conclusion as Mandelbrot, saying that stock returns follow a Cauchy distribution, as reported in his New York Times best-seller book “The Black Swan”.(Taleb, 2010)
Laplace Distribution
In probability theory and statistics, the Laplace distribution is a continuous probability distribution named after Pierre-Simon Laplace. It is also sometimes called the double exponential distribution, because it can be thought of as two exponential distributions (with an additional location parameter) spliced together along the abscissa, although the term is also sometimes used to refer to the Gumbel distribution. The difference between two independent identically distributed exponential random variables is governed by a Laplace distribution, as is a Brownian motion evaluated at an exponentially distributed random time. Increments of Laplace motion or a variance gamma process evaluated over the time scale also have a Laplace distribution.
The probability density function of the Cauchy distribution is given by
f(x) = 1/2b * exp(-|x-µ|/b)
Here, µ is a location parameter and b > 0, which is sometimes referred to as the "diversity", is a scale parameter. If µ = 0 and b=1, the positive half-line is exactly an exponential distribution scaled by 1/2.
The probability density function of the Laplace distribution is also reminiscent of the normal distribution; however, whereas the normal distribution is expressed in terms of the squared difference from the mean µ, the Laplace density is expressed in terms of the absolute difference from the mean. Consequently, the Laplace distribution has fatter tails than the normal distribution.
Gaussian Kernel Density Estimation
In statistics, kernel density estimation (KDE) is the application of kernel smoothing for probability density estimation, i.e., a non-parametric method to estimate the probability density function of a random variable based on kernels as weights. KDE is a fundamental data smoothing problem where inferences about the population are made, based on a finite data sample. In some fields such as signal processing and econometrics it is also termed the Parzen–Rosenblatt window method, after Emanuel Parzen and Murray Rosenblatt, who are usually credited with independently creating it in its current form. One of the famous applications of kernel density estimation is in estimating the class-conditional marginal densities of data when using a naive Bayes classifier, which can improve its prediction accuracy.
Let (x1, x2, ..., xn) be independent and identically distributed samples drawn from some univariate distribution with an unknown density f at any given point x. We are interested in estimating the shape of this function f. Its kernel density estimator is:
f(x) = 1/nh * sum(k(x-xi)/h, n)
where K is the kernel—a non-negative function—and h > 0 is a smoothing parameter called the bandwidth. A kernel with subscript h is called the scaled kernel and defined as Kh(x) = 1/h K(x/h). Intuitively one wants to choose h as small as the data will allow; however, there is always a trade-off between the bias of the estimator and its variance.
The probability density function of Gaussian Kernel Density Estimation is given by
f(x) = 1 / (v * 2*pi)^0.5 * exp(-(x - m)^2 / (2 * v))
where v is the bandwidth component h squared
KDE Bandwidth Estimation
Bandwidth selection strongly influences the estimate obtained from the KDE (much more so than the actual shape of the kernel). Bandwidth selection can be done by a "rule of thumb", by cross-validation, by "plug-in methods" or by other means. The default is Scott's Rule.
Scott's Rule
n ^ (-1/(d+4))
with n the number of data points and d the number of dimensions.
In the case of unequally weighted points, this becomes
neff^(-1/(d+4))
with neff the effective number of datapoints.
Silverman's Rule
(n * (d + 2) / 4)^(-1 / (d + 4))
or in the case of unequally weighted points:
(neff * (d + 2) / 4)^(-1 / (d + 4))
With a set of weighted samples, the effective number of datapoints neff
is defined by:
neff = sum(weights)^2 / sum(weights^2)
Manual input
You can provide your own bandwidth input. This is useful for those who wish to run external to TradingView Grid Search Machine Learning algorithms to solve for the bandwidth per ticker.
Inverse CDF of KDE Calculation
1. Create an array of random normalized numbers, using an inverse CDF of a normal distribution of mean of zero
and standard deviation one
2. Create a line space range of values -3 to 3
3. Create a Gaussian Kernel Density Estimate CDF by iterating over the line space array created in step 2. For each line space item, find the mean difference between the line space and the random variable divided by the bandwidth.
4. Derive test statistics from the resulting KDE inverse CDF, we use cubic spline interpolation to solve for line space value for a given alpha computed using the user selected probability percent value in the settings.
Volatility
Close-to-Close
Close-to-Close volatility is a classic and most commonly used volatility measure, sometimes referred to as historical volatility.
Volatility is an indicator of the speed of a stock price change. A stock with high volatility is one where the price changes rapidly and with a bigger amplitude. The more volatile a stock is, the riskier it is.
Close-to-close historical volatility calculated using only stock's closing prices. It is the simplest volatility estimator. But in many cases, it is not precise enough. Stock prices could jump considerably during a trading session, and return to the open value at the end. That means that a big amount of price information is not taken into account by close-to-close volatility.
Despite its drawbacks, Close-to-Close volatility is still useful in cases where the instrument doesn't have intraday prices. For example, mutual funds calculate their net asset values daily or weekly, and thus their prices are not suitable for more sophisticated volatility estimators.
Parkinson
Parkinson volatility is a volatility measure that uses the stock’s high and low price of the day.
The main difference between regular volatility and Parkinson volatility is that the latter uses high and low prices for a day, rather than only the closing price. That is useful as close to close prices could show little difference while large price movements could have happened during the day. Thus Parkinson's volatility is considered to be more precise and requires less data for calculation than the close-close volatility.
One drawback of this estimator is that it doesn't take into account price movements after market close. Hence it systematically undervalues volatility. That drawback is taken into account in the Garman-Klass's volatility estimator.
Garman-Klass
Garman Klass is a volatility estimator that incorporates open, low, high, and close prices of a security.
Garman-Klass volatility extends Parkinson's volatility by taking into account the opening and closing price. As markets are most active during the opening and closing of a trading session, it makes volatility estimation more accurate.
Garman and Klass also assumed that the process of price change is a process of continuous diffusion (geometric Brownian motion). However, this assumption has several drawbacks. The method is not robust for opening jumps in price and trend movements.
Despite its drawbacks, the Garman-Klass estimator is still more effective than the basic formula since it takes into account not only the price at the beginning and end of the time interval but also intraday price extremums.
Researchers Rogers and Satchel have proposed a more efficient method for assessing historical volatility that takes into account price trends. See Rogers-Satchell Volatility for more detail.
Rogers-Satchell
Rogers-Satchell is an estimator for measuring the volatility of securities with an average return not equal to zero.
Unlike Parkinson and Garman-Klass estimators, Rogers-Satchell incorporates drift term (mean return not equal to zero). As a result, it provides a better volatility estimation when the underlying is trending.
The main disadvantage of this method is that it does not take into account price movements between trading sessions. It means an underestimation of volatility since price jumps periodically occur in the market precisely at the moments between sessions.
A more comprehensive estimator that also considers the gaps between sessions was developed based on the Rogers-Satchel formula in the 2000s by Yang-Zhang. See Yang Zhang Volatility for more detail.
Yang-Zhang
Yang Zhang is a historical volatility estimator that handles both opening jumps and the drift and has a minimum estimation error.
We can think of the Yang-Zhang volatility as the combination of the overnight (close-to-open volatility) and a weighted average of the Rogers-Satchell volatility and the day’s open-to-close volatility. It considered being 14 times more efficient than the close-to-close estimator.
Garman-Klass-Yang-Zhang
Garman Klass is a volatility estimator that incorporates open, low, high, and close prices of a security.
Garman-Klass volatility extends Parkinson's volatility by taking into account the opening and closing price. As markets are most active during the opening and closing of a trading session, it makes volatility estimation more accurate.
Garman and Klass also assumed that the process of price change is a process of continuous diffusion (geometric Brownian motion). However, this assumption has several drawbacks. The method is not robust for opening jumps in price and trend movements.
Despite its drawbacks, the Garman-Klass estimator is still more effective than the basic formula since it takes into account not only the price at the beginning and end of the time interval but also intraday price extremums.
Researchers Rogers and Satchel have proposed a more efficient method for assessing historical volatility that takes into account price trends. See Rogers-Satchell Volatility for more detail.
Exponential Weighted Moving Average
The Exponentially Weighted Moving Average (EWMA) is a quantitative or statistical measure used to model or describe a time series. The EWMA is widely used in finance, the main applications being technical analysis and volatility modeling.
The moving average is designed as such that older observations are given lower weights. The weights fall exponentially as the data point gets older – hence the name exponentially weighted.
The only decision a user of the EWMA must make is the parameter lambda. The parameter decides how important the current observation is in the calculation of the EWMA. The higher the value of lambda, the more closely the EWMA tracks the original time series.
Standard Deviation of Log Returns
This is the simplest calculation of volatility. It's the standard deviation of ln(close/close(1))
Pseudo GARCH(2,2)
This is calculated using a short- and long-run mean of variance multiplied by θ.
θavg(var ;M) + (1 − θ)avg(var ;N) = 2θvar/(M+1-(M-1)L) + 2(1-θ)var/(M+1-(M-1)L)
Solving for θ can be done by minimizing the mean squared error of estimation; that is, regressing L^-1var - avg(var; N) against avg(var; M) - avg(var; N) and using the resulting beta estimate as θ.
Manual
User input % value
Drift
Cost of Equity / Required Rate of Return (CAPM)
Standard Capital Asset Pricing Model used to solve for Cost of Equity of Required Rate of Return. Due to the processor overhead required to compute CAPM, the user must plug in values for beta, alpha, and expected market return using Loxx's CAPM indicator series. Used for stocks.
Mean of Log Returns
Average of the log returns for the underlying ticker over the user selected period of evaluation. General purpose use.
Risk-free Rate (r)
10, 20, or 30 year bond yields for the user selected currency. Under equilibrium the drift of the empirical GBM must be the risk-free rate. If the price process is a GBM under the empirical measure, then a consequence of viability is that it is also a GBM under an equivalent (risk-neutral) measure.
Risk-free Rate adjusted for Dividends (r-q)
This is the Risk-free Rate minus the Dividend Yield.
Forex (r-rf)
This is derived from the Garman and Kohlhagen (1983) modified Black-Scholes model can be used to price European currency options. This is simply the diffeence between Risk-free Rate of the Forex currency in question. This is used for Forex pricing.
Martingale (0)
When the drift parameter is 0, geometric Brownian motion is a martingale. In probability theory, a martingale is a sequence of random variables (i.e., a stochastic process) for which, at a particular time, the conditional expectation of the next value in the sequence is equal to the present value, regardless of all prior values. Typically used for futures or margined futures.
Manual
User input % value
Additional notes
Indicator can be used on any timeframe. The T (time) variable used to annualize volatility and inside the GBM formula is automatically calculated based on the timeframe of the chart.
Confidence interval of volatility is calculated using an inverse CDF of a Chi-Squared Distribution. You change the volatility input used to create the probability cones from from realized volatility to upper or lower confidence levels of volatility to better visualize extremes of range. Generally, you'd stick with realized volatility.
Days per year should be 252 for everything but Cryptocurrency. These are days trader per year. Maximum future forecast bars is 365. Forecast bars are limited to the maximum of selected days per year.
Includes the ability to overlay option expiration dates by bars to see the range of prices for that date at that bar
You can select confidence % you wish for both the cone in general and the volatility. There are three levels for the cones, this will show on the three different levels up and down on the chart.
The table on the right displays important calculated values so you don't have to remember what they are or what settings you selected
All values are annualized no matter the timeframe.
Additional distributions and measures of volatility and drift will be added in future releases.
APIBridge Nifty Options Algo StrategyUsing Pinescript, we will use charts of Cash/Future to trade in Options. Note this strategy works well with even the free version of TradingView.
The Relative Strength Index ( RSI ). Is a momentum oscillator that measures the speed and change of price movements. The RSI oscillates between zero and 100. Increasing RSI shows increasing bullish momentum. Decreasing RSI shows increasing bearish momentum. We take RSI upper bound as 80 to indicate bullish momentum and RSI lower bound as 20 to indicate bearish momentum.
We use the above premise to create options buy-only strategy which trades in ATM strikes by default. This strategy requires very less margin (Minimum Rs . 15000).
Since this strategy uses underlying data (cash/future) to place trades in Options, please ignore the backtest of this strategy given by TradingView. TradingView does not provide options data but this strategy bypasses it.
Strategy Premise
The Relative Strength Index (RSI) is a momentum oscillator that measures the speed and change of price movements. The RSI oscillates between zero and 100. Increasing RSI shows increasing bullish momentum. Decreasing RSI shows increasing bearish momentum. We take RSI upper bound as 80 to indicate bullish momentum and RSI lower bound as 20 to indicate bearish momentum.
We use the above premise to create options buy-only strategy which trades in ATM strikes by default. This strategy requires very less margin (Rs. 15000 should be sufficient).
NSE Options Algo Strategy Logic
Long Entry: When RSI goes above 80, send LE in an auto-calculated option strike Call. When RSI goes below 20, send LE in auto-calculated option strike Put.
Long Exit: When we hit Stop loss or Target. In case SL/TGT does not hit and reverse RSI goes above 80 send Long Exit in auto-calculated option. Put as per last trade; RSI goes below 20, send LX in auto-calculated option call as per last trade.
For Long and Short entry the order is fired in the option buying side with auto strike price selection.
Option Strategy Parameters for TraingView Charts
RSI Length(Mandatory): Number of bars used to calculated RSI.
Upper Band(Mandatory): To specify upper band of RSI.
Lower Band(Mandatory): For specifying lower band of RSI.
Use reversal from Upper Band (Optional): This will enable short entry when RSI is falling below 80 from upper band. Recommended to keep unchecked initially.
Use reversal from Lower Band (Optional): This will enable long entry when RSI is raising above 20 from lower band. Recommended to keep unchecked initially.
Quantity: We use this specify the trade quantity (for Nifty min 75)
Custom Stop Loss in Points: Movement in chart price against the momentum which will trigger exit in options positions
Custom Target in Points: Movement in chart price against the momentum which will trigger exit in options positions
Base symbol: This is the base instrument symbol like NIFTY or BANK NIFTY.
Strike distance from ATM: Our default strike selection is considered as first ATM option (with nearest distance, only 100s are considered ). This strike distance allows to calculate ATM options which are at fixed distance.
Expiry: Expiry of option. Weekly and monthly both expiry are allowed.
Instrument: For index instrument will be OPTIDX, for stock instrument will be OPTSTK
Strategy Tag: The Strategy of Nifty options configured in Api bridge.
Setting Up Alert
Before setting up the alert make sure that you have selected desired script, time frame, strategy settings, and APIbridge configuration. Click in settings add alert and paste {{strategy.order.comment}} in message box.
Important: Do not change any settings during live trading. It may break the sequence of exit for the correct call/put.
5MSM BRAHMA//Created By Patrick199415
//High Low DayBox
study(title="High Low DayBox", shorttitle="High Low DayBox", overlay=true)
st = input(true, title="Show Todays OHLC?")
// sy = input(false, title="Show Yesterdays OHLC?")
ph = security(tickerid, 'D', high)
// pdh = security(tickerid, 'D', high)
pl = security(tickerid, 'D', low)
// pdl = security(tickerid, 'D', low)
//offs_daily = 0
plot(st and ph ? ph : na, title="Daily High", style=line, linewidth=1, color=blue)
//plot( sy and pdh ? pdh : na, title="Previous Daily High", style=cross, linewidth=1, color=lime)
plot(st and pl ? pl : na, title="Daily Low", style=line, linewidth=1, color=red)
//plot( sy and pdl ? pdl : na, title="Previous Daily Low", style=cross, linewidth=1, color=red)
5MSM MAHESH 15It´s just the histogram of the MACD . (Actually it´s not a histogram, I like the Area visualisation more. But you can switch.)
5min stock market property
When I´m using the MACD , I´m just searching for a divergence between Price and the MACD-histogram. I´m not interested in the MACD-signalline or the MACD-line in any way. As you can see, The omission of them leads to better visualisation. It´s much easier to spot a divergence. On the one hand because that way the histogram scales bigger, on the other hand becauce the lines can´t overdraw the histogram.
Rules bullish Divergence: Price makes a lower low, oscillator makes higher low.
Rules bearish Divergence: Price makes a higher high, oscillator makes lower high.
Price Pivots for NASDQ 100 StocksPrice Pivots for NASDQ 100 Stocks
What is this Indicator?
• This indicator calculates the price range a Stock can move in a Day.
Advantages of this Indicator
• This is a Leading indicator, not Dynamic or Repaint.
• Helps to identify the tight range of price movement.
• Can easily identify the Options strike price.
• Develops a discipline in placing Targets.
Disadvantages of this Indicator
• The indicator is specifically made for NASDQ 100 stocks. The levels won't work for other stocks.
• The indicator shows nothing for other indexes and stocks other than above mentioned.
• The data need to be entered manually.
Who to use?
Highly beneficial for Day Traders, it can be used for Swing and Positions as well.
What timeframe to use?
• Any timeframe.
• The highlighted levels in Red and Green will not show correct levels in 1 minute timeframe.
• 5min is recommended for Day Traders.
When to use?
• Wait for proper swing to form.
• Recommended to avoid 1st 1 hour or market open, that is 9.15am to 10.15 or 10.30am.
• Within this time a proper swing will be formed.
What are the Lines?
• The concept is the price will move from one pivot to another.
• Entry and Exit can be these levels as Reversal or Retracement.
Gray Lines:
• Every lines with price labels are the Strike Prices in the Option Chain.
• Price moves from 1 Strike Price level to another.
• The dashed lines are average levels of 2 Strike Prices.
Red & Green Lines:
• The Red and Green Lines will appear only after the first 1 hour.
• The levels are calculated based on the 1st 1 hour.
• Red Lines are important Resistance levels, these are strong Bearish reversal points. It is also a breakout level, this need to be figured out from the past levels, trend, percentage change and consolidation.
• Green Lines are important Support levels, these are strong Bullish reversal points. It is also a breakdown level, this need to be figured out from the past levels, trend, percentage change and consolidation.
What are the Labels?
• First Number: Price of that level.
• Numbers in (): Percentage change and Change of price from LTP (Last Traded Price) to that Level.
How to use?
Entry:
• Enter when price is closer to the Red or Green lines.
• Enter after considering previous Swing and Trend.
• Note the 50% of previous Swing.
• Enter Short when price reverse from each level.
• If 50% of swing and the pivot level is closer it can be a good entry.
Exit:
• Use the logic of Entry, each level can be a target.
• Exit when price is closer to the Red or Green lines.
Indicator Menu
Source
• Custom: Enter the price manually after choosing the Source as Custom to show the Pivots at that price.
• LTP: Pivot is calculated based on Last Traded Price.
• Day Open: Pivot is calculated based on current day opening price.
• PD Close: Pivot is calculated based on previous day closing price.
• PD HL2: Pivot is calculated based on previous day average of High and Low.
• PD HLC3: Pivot is calculated based on previous day average of High, Low and Close.
"Time (Vertical Lines)"
• This is a marker of every 1 hour.
• Usually major price movement happen between previous day last 1 hour to today first 1 hour.
• Two swings can happen between first 2 hour of current day.
• At the end of the day last 1 hour another important movement will happen.
• Usually rest of the time won't show any interesting movement.
To the Users
• Certain symbols may show the levels as a single line. For such symbols choose a different Source or Timeframe from the indicator menu.
• Please inform if any of the Symbol's price levels don't react to the pivots , include the Symbol a well.
• Also inform if you notice any wrong values, errors or abnormal behavior in the indicator.
• Feel free to suggest or adding new features and options.
General Tips
• It is good if Stock trend is same as that of Index trend.
• Lots of indicators creates lots of confusion.
• Keep the chart simple and clean.
• Buy Low and Sell High.
• Master averages or 50%.
• Previous Swing High and Swing Low are crucial.
Important Note
• Currently the levels are in testing stage.
• Eventually the levels of certain symbols will be corrected after each update and test.
TICK Scalping strategy, SPY 1 min1 min chart scalping version of my other TICK strategy with adjusted parameters and additional entry and exit conditions better suited for 1 min SPY chart. Please refer to my original TICK strategy for explanation.
Important notes:
1. This strategy is designed for same day SPY option scalping on the 1 min chart . All profit shown in back testing report is based on Profit/Loss (P/L) estimates from trading options with approximately 6 weeks of data. By default, it is set to 10 option contracts. By default the initial capital is set to $5000. Pyramiding is set to 3.
2. This strategy works better with non-extended market data .
3. This strategy is mainly developed for SPY trading on 1 min chart, it probably will not be very profitable with other tickers or time frame without tweaking all the parameters first.
Cheers and enjoy~! Let's all make money~!!
Straddle MoverStraddle Mover is an indicator especially made for option writer / seller who wants to do straddle and adjust the position based on the market trend / movement. It can be use for iron fly strategy too.
Settings: User must know the settings of the indicator before using.
First one is Option Strike Difference , user need to enter the correct option strike difference of the particular instrument / stock / indices, one can get it from option chain. For example, Nifty having 50 points differences in each option strike and bank nifty having 100 points. So, Nifty user must enter 50 and Bank nifty user must enter 100 in this setting.
Second is Straddle Type based on , user can choose the type of the straddle mover. There are two options to choose, 1) High/Low is based on current day high/low average near strike to make straddle and 2) Trend is based on recent N number of candle(s) average near strike to make straddle.
Third is Trend Length , default value is 20 which generally used in vwma , donchian channel and other trend finding indicators. User can change if need.
If user select high/low based type then length is not important.
Note : Option Strike Difference and Straddle type based on is very important setting to use this indicator.
User must do adjustments based on their own risk and strategy. This indicator is only for education purpose.
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.