PROTECTED SOURCE SCRIPT

CBH-ZigZag_v3

It automates the detection and visualization of patterns to Fibonacci lines and by integrating options strike calculation to selecting and automates option chart analysis on spot chart itself reducing the manual effort involved in technical analysis and enhancing decision-making.

ZigZag Calculation Logic:
This function calculates the ZigZag pattern based on a percentage change from the most recent high or low prices.
It tracks the most recent high and low prices, updating them if the price breaks higher or lower than the previous high or low.
The reverse range is the threshold at which the ZigZag will reverse direction (based on the user-set percentage).
When the price reverses beyond this threshold, a pivot point is established, and the direction of the ZigZag is flipped.
The script tracks up to 7 previous ZigZag pivot points for potential use in pattern detection.

Pattern Detection Calculation Logic:
The conditions check whether 7 previous ZigZag pivot points, if triangulated, satisfy a specific pattern or ratios resembling harmonic triangle relationships adjusted by a margin of error.
It employs geometric and ratio-based calculations to detect patterns.
The loop ensures a check against a discrete set of harmonic values derived from the ratio.
Detected patterns are labeled with identifiers (A_1 to A_7).
Generates alerts for detected patterns, and draws labels on the chart for visualization.

Patterns Levels(Fibonacci lines) Calculation Logic:
It draws Fibonacci lines on a price chart based on a high and low price, of above detected patterns upon selecting from dropdown(A_1 to A_7).
The function only executes when the bar state is confirmed and this ensures that the Fibonacci lines are only drawn when certain conditions are met from detected patterns (e.g., after new price action is confirmed).
Same detected patterns are also used to calculate Input level for options Call/Put and are labeled accordingly.

SF-Line Calculation Logic:
Helps identify trends by comparing the closing price with SMAs of the high and low prices.
Plots a step line at highs during an uptrend or lows during a downtrend.
Visualized in green for uptrends and red for downtrends.
Traders can use the SF-Line to follow trends and determine potential reversal points based on the level or to filter out false positives.

H/L-Price Calculation Logic:
Signal system calculates dynamic levels using HMAs for high and low prices over two periods
It identifies potential "high" and "low" price conditions based on crossovers and crossunders of the close price with dynamically calculated levels.
Alternating logic ensures distinct sequential signals (high and low).
Identify trend reversals and momentum shifts.
Use alerts and visual signals to act on trading opportunities.

Buy/Sell Calculation Logic:
A decision-making logic to identify Buy and Sell opportunities. It checks specific conditions in a sequential manner (involving price levels from H/L-Price & volume).
Buy Logic: Progresses through three stages based on conditions like price crossing the current ZigZag level, volume thresholds, and H/Low- Price
Sell Logic: Mirrors Buy logic with opposite conditions.
Final stage triggers visual and alert signals, making this system suitable confirmation of Buy/Sell opportunities.

To get options chart analysis on spot chart itself:
Expiry D M Y: Inputs for expiry date in DD/MM/YY format.
Options Call / Put : Inputs from pattern levels.
By using above 2 functions it dynamically creates option symbols for Calls and Puts using the base symbol, expiry date, and strike prices:

Options Call / Put Calculation Logic:
Monitors signals at multi timeframe intervals using SMA, EMA & HMA for real-time options trading on input strike price and generates dynamic calls (CE) and puts (PE).
Designed for options traders seeking systematic entry and exit points based on market trends and custom expiry/strike settings.

OS-Level & OS-Signals Calculation Logic:
Detects new bars or periods for recalculations.
Computes basic pivot for selected timeframes.
Tracks HMA crosses on a select time frame with basic pivot.
Identifies the closest level using conditional logic and closest level to current market price is plotted as OS-Level. Generates alerts as (OS-Level Changed) when closestValue changes.
Same OS-Level is to be used as input for OS-Signal to check premiums trading in the same range.

Zero to 6 months in trading use below trade setup, rest trade as you like …
How to select the input level for Call & Put ???
Go to the 15 minute time frame and look for the most recent Zigzag pattern displayed on the chart then select that pattern level from the list you will get Ce_Strike_ and Pe_ Strike, use these strikes as input level for call & put.
Switch to 5 min or less and trade with Signals.

Bullish Trend: If the current market price(candle close) is between the Green & Blue line.
Confirmation: SF-Line color should be Green.
Entry: Buy or L or CE and candle high should be above SF-Line(color doesn't matter).
Target: whichever comes first T1 or T2 or T3(Black lines) or H or Sell or PE.
Stop loss: candle close below Blue line or SF-Line turns Red.

Bearish Trend: If the current market price(candle close) is between the Blue & Red line.
Confirmation: SF-Line color should be Red.
Entry: Sell or H or PE and candle low should be below SF-Line(color doesn't matter).
Target: whichever comes first T1 or T2 or T3(Black lines) or L or Buy or CE.
Stop loss: candle close above Blue line or SF-Line turns Green.

How to use OS Levels - - - Scalper ???
Don't mix this feature with any other logic or signal.
For Index Options.
Use a 1 minute time frame.
Buy Signal: Candle close above the pink line mark its high & low.
Entry : Green candle closes above that signal candle high.
Stop loss: Signal candle low.

Sell Signal: Candle close below the pink line mark its high & low.
Entry : Red candle closes below that signal candle low.
Stop loss: Signal candle high.

How to use OS Level - - - Swing1 ???
Entry & Stop loss same as SCALPER.
For Index Options, Stock Options & Stock.
Use any time frame less than 15 minutes.
To filter os signal use SF-Line

How to select OS Signal Input - - - Swing1 ???
Usually its first level change of the day.
You can change input on every change but that level should show some OS labels in the historical chart(7 days back period).

How to use OS Level - - - Swing2 & Swing3 ???
They are slower versions of Swing1.
Trade same as Swing1 Setup.

>>>Contact Telegram Id : @harshvardhan131 <<<

免責聲明