Forex Insight Pro 6.0Forex Insight Pro 6.0 for TradingView gives you abilities to see the stories hiding in the graphs of the markets. It marks and reminds you about important parameters that are happening on the graph so that you will not forget to consider them before placing orders. These parameters include:
Automatic CC(X) counting that compare the close of the right price bar to that of left price bar in a group of X consecutive bars such as CC(5,9) of a group of 5 bars will compare the close price of the right bar to the left bar (ignoring 3 bars in the middle). If the right bar closed higher, the count number would be printed above the bar. If the left bar closed higher, the count number would be printed below the bar. Nine consecutive series of up counts will define the lowest price as CC(5,9) support line and nine consecutive series of down counts will define the highest price as CC(5,9) resistance line. The count numbers and support / resistance lines are automatically printed on the graph if enabled.
Show a set of simple moving average lines such as SMA5, SMA13, SMA50, SMA200, SMA800, if enabled. The color of SMA50 line (which is the same as the the middle line of Bollinger band (50,2) can be set to change based on increasing/decreasing values of itself, or of the MACD(12,26,9).
Show Bollinger bands (50,2), if enabled.
Show the high and low levels of the previous day, if enabled.
Show the important time areas for Forex trading during Asian, London, and New York sessions, if enabled.
Automatic printing of the events happening in the graph to remind the readers of parameters under considerations (if enabled) including:
- Print "SMA5>13" and "SMA5<13" for SMA5 crossed above and below SMA13.
- Print "SMA50>200" and SMA50<200" for SMA50 crossed above and below SMA200.
- Print "Max" and "Min" for local maximum and local minimum bars.
- Print "C75" and "C25" for the bars that closed above 75% and closed below 25% of its ranges.
- Print "C>SMA5" and "C30" and "RSI<70" for RSI(14) that crossed above 30 % and below 70 %.
- Print "MACD>0" and "MACD<0" for MACD(12,26,9) that crossed above and below zero.
- Print "MACD>Sig" and "MACD<Sig" for MACD(12,26,9) that crossed above and below their own SMA9.
- Print "Gap" for the up and down price gaps.
=================================================================================================
The source code of Forex Insight Pro 6.0 custom indicator is protected.
Only invited TradingView members can apply this indicator to their forex, crypto currency and stock price graphs.
Lifetime invitation is for 100 USD with free future upgrades and online supports.
Rental invitation is for 10 USD/month with free future upgrades and online supports.
Paypal, Bank transfer and Bitcoin payments are welcome.
A 7-day trial can be requested from the author (DrGraph or Nimit Chomnawang, PhD) via TradingView private chat
or in the comment field below.
=================================================================================================
How to install the script:
------------------------------
*Go to the bottom of this page and click on "Add to Favorite Scripts".
*Open a new chart and click on the "Indicators" tab.
*Click on the "Favorites" tab and choose "Forex Insight Pro 6.0".
*Right click anywhere on the graph, choose "Settings".
*In "Style" tab, choose the Dark Theme.
*In "Scale" tab, choose decimal places of 1/100000.
*In "Background" tab, uncheck "Indicator Arguments" and "Indicator Values".
*In "Timezone/Sessions" tab, choose your local time zone.
*At the bottom of settings window, click on "Template", "Save As...", then name this theme of graph setting for future call up such as "Forex Insight Pro".
*Click OK.
For free TradingView plan, you can add two more indicators to the chart. That means you may add RSI or MACD indicators with same parameters as those setup in Forex Insight Pro and Volume indicator to your graph. DrGraph regularly publish his educational ideas on using features provided in Forex Insight Pro for profitable investments. You can follow him for how to use the tools in trading stocks, forex, and binary options.
Cari dalam skrip untuk "the script"
Forex Insight Pro 6.0Forex Insight Pro 6.0 for TradingView gives you abilities to see the stories hiding in the graphs of the markets. It marks and reminds you about important parameters that are happening on the graph so that you will not forget to consider them before placing orders. These parameters include:
Automatic CC(X) counting that compare the close of the right price bar to that of left price bar in a group of X consecutive bars such as CC(5,9) of a group of 5 bars will compare the close price of the right bar to the left bar (ignoring 3 bars in the middle). If the right bar closed higher, the count number would be printed above the bar. If the left bar closed higher, the count number would be printed below the bar. Nine consecutive series of up counts will define the lowest price as CC(5,9) support line and nine consecutive series of down counts will define the highest price as CC(5,9) resistance line. The count numbers and support / resistance lines are automatically printed on the graph if enabled.
Show a set of simple moving average lines such as SMA5, SMA13, SMA50, SMA200, SMA800, if enabled. The color of SMA50 line (which is the same as the the middle line of Bollinger band (50,2) can be set to change based on increasing/decreasing values of itself, or of the MACD(12,26,9).
Show Bollinger bands (50,2), if enabled.
Show the high and low levels of the previous day, if enabled.
Show the important time areas for Forex trading during Asian, London, and New York sessions, if enabled.
Automatic printing of the events happening in the graph to remind the readers of parameters under considerations (if enabled) including:
- Print "SMA5>13" and "SMA5<13" for SMA5 crossed above and below SMA13.
- Print "SMA50>200" and SMA50<200" for SMA50 crossed above and below SMA200.
- Print "Max" and "Min" for local maximum and local minimum bars.
- Print "C75" and "C25" for the bars that closed above 75% and closed below 25% of its ranges.
- Print "C>SMA5" and "C30" and "RSI<70" for RSI(14) that crossed above 30 % and below 70 %.
- Print "MACD>0" and "MACD<0" for MACD(12,26,9) that crossed above and below zero.
- Print "MACD>Sig" and "MACD<Sig" for MACD(12,26,9) that crossed above and below their own SMA9.
- Print "Gap" for the up and down price gaps.
=================================================================================================
The source code of Forex Insight Pro 6.0 custom indicator is protected.
Only invited TradingView members can apply this indicator to their forex, crypto currency and stock price graphs.
Lifetime invitation is for 100 USD with free future upgrades and online supports.
Rental invitation is for 10 USD/month with free future upgrades and online supports.
Paypal, Bank transfer and Bitcoin payments are welcome.
A 7-day trial can be requested from the author (DrGraph or Nimit Chomnawang, PhD) via TradingView private chat
or in the comment field below.
=================================================================================================
How to install the script:
------------------------------
*Go to the bottom of this page and click on "Add to Favorite Scripts".
*Open a new chart and click on the "Indicators" tab.
*Click on the "Favorites" tab and choose "Forex Insight Pro 6.0".
*Right click anywhere on the graph, choose "Settings".
*In "Style" tab, choose the Dark Theme.
*In "Scale" tab, choose decimal places of 1/100000.
*In "Background" tab, uncheck "Indicator Arguments" and "Indicator Values".
*In "Timezone/Sessions" tab, choose your local time zone.
*At the bottom of settings window, click on "Template", "Save As...", then name this theme of graph setting for future call up such as "Forex Insight Pro".
*Click OK.
For free TradingView plan, you can add two more indicators to the chart. That means you may add RSI or MACD indicators with same parameters as those setup in Forex Insight Pro and Volume indicator to your graph. DrGraph regularly publish his educational ideas on using features provided in Forex Insight Pro for profitable investments. You can follow him for how to use the tools in trading stocks, forex, and binary options.
Forex Insight Pro 5.0Forex Insight Pro 5.0 for TradingView gives you abilities to see the stories hiding in the graphs of the markets. It marks and reminds you about important parameters that are happening on the graph so that you will not forget to consider them before placing orders. These parameters include:
Automatic CC(X) counting that compare the close of the right price bar to that of left price bar in a group of X consecutive bars such as CC(5,9) of a group of 5 bars will compare the close price of the right bar to the left bar (ignoring 3 bars in the middle). If the right bar closed higher, the count number would be printed above the bar. If the left bar closed higher, the count number would be printed below the bar. Nine consecutive series of up counts will define the lowest price as CC(5,9) support line and nine consecutive series of down counts will define the highest price as CC(5,9) resistance line. The count numbers and support / resistance lines are automatically printed on the graph if enabled.
Show a set of simple moving average lines such as SMA5, SMA13, SMA50, SMA200, SMA800, if enabled. The color of SMA50 line (which is the same as the the middle line of Bollinger band (50,2) can be set to change based on increasing/decreasing values of itself, or of the MACD(12,26,9).
Show Bollinger bands (50,2), if enabled.
Show the high and low levels of the previous day, if enabled.
Show the important time areas for Forex trading during Asian, London, and New York sessions, if enabled.
Automatic printing of the events happening in the graph to remind the readers of parameters under considerations (if enabled) including:
- Print SMA5>13 and SMA5<13 for SMA5 crossed above and below SMA13.
- Print Max and Min for local maximum and local minimum bars.
- Print C75 and C25 for the bars that closed above 75% and closed below 25% of its ranges.
- Print C>SMA5 and C30 and RSI<70 for RSI(14) that crossed above 30 % and below 70 %.
- Print MACD>0 and MACD<0 for MACD(12,26,9) that crossed above and below zero.
- Print MACD>Sig and MACD<Sig for MACD(12,26,9) that crossed above and below their own SMA9.
=================================================================================================
The source code of Forex Insight Pro 5.0 custom indicator is protected.
Only invited TradingView members can apply this indicator to their forex, crypto currency and stock price graphs.
Lifetime invitation is for 100 USD with free future upgrades and online supports.
Rental invitation is for 10 USD/month with free future upgrades and online supports.
Paypal, Bank transfer and Bitcoin payments are welcome.
A 7-day trial can be requested from the author (DrGraph or Nimit Chomnawang, PhD) via TradingView private chat
or in the comment field below.
=================================================================================================
How to install the script:
------------------------------
*Go to the bottom of this page and click on "Add to Favorite Scripts".
*Open a new chart and click on the "Indicators" tab.
*Click on the "Favorites" tab and choose "Forex Insight Pro 5.0".
*Right click anywhere on the graph, choose "Settings".
*In "Style" tab, choose the Dark Theme.
*In "Scale" tab, choose decimal places of 1/100000.
*In "Background" tab, uncheck "Indicator Arguments" and "Indicator Values".
*In "Timezone/Sessions" tab, choose your time zone.
*At the bottom of settings window, click on "Template", "SaveAs...", then name this theme of graph setting for future call up such as "Forex Insight Pro".
*Click OK.
For free TradingView plan, you can add two more indicators to the chart. That means you may add RSI or MACD indicators with same parameters as those setup in Forex Insight Pro and Volume indicator to your graph. DrGraph regularly publish his educational idea on using features provided in Forex Insight Pro for profitable investments. You can follow him for how to use the tools.
Forex Insight Pro 4.0Forex Insight Pro 4.0 for TradingView gives you abilities to see the stories hiding in the graphs of markets. It marks and reminds you about important parameters that are happening on the graph so that you will not forget to consider before placing orders. These parameter include:
Helps you count cc(x) that compares the close price of the last bar to that of x-1 bar earlier (the right most bar and the left most bar of x consecutive bars). It marks a number above the price bar if the close of the right is higher and mark a number below the price bar if the close of the right is lower. A sequence of consecutive numbers from cc(x) counting of x=5 below the price bars up to count number 9 will show exhaustion of downtrend and the highest price among these 9 bars will set a cc(5) resistance line. A sequence of consecutive numbers from cc(x) counting of x=5 above the price bars up to count number 9 will show exhaustion of uptrend and the lowest price among these 9 bars will set a cc(5) support line. Both cc(5) support and resistance lines are often respected by the price actions as reversal levels.
Helps you to notice increment / decrement of Middle line of the Bollinger band indicator or increment/decrement of MACD indicator in colors. The normal Bollinger band indicator will have the gray middle line. You can set its color to blue/pink to reflect increasing/decreasing value of the Bollinger middle line or set its color to lime/red to reflect increasing/decreasing MACD value.
Helps you to notice RSI value when it comes back down from overbought condition by printing "RSI-Dn" above the price bar or when it comes back up from oversold condition by printing "RSI-Up" below the price bar.
Helps you to notice the crossing of MACD line and its smoothing Signal line by printing "MACD > Sig" below the price bar if the MACD line crosses above the Signal line and printing "MACD < Sig" above the price bar if the MACD line crosses below the Signal line. Crossing of MACD and Signal lines could be used as warning signs that the reversal of the price trend might follow in the near future.d as warning signs that the reversal of the price trend might follow in the near future.
Helps you to notice the crossing of MACD line between the positive and negative zones by printing "MACD > 0" below the price bar if the MACD line changes to positive region and printing "MACD < 0" above the price bar if the MACD line crosses into the negative region. Changing the sign of MACD value could be used as warning signs that the reversal of the price trend might follow in the near future.
Helps you to notice the crossing of the fast simple moving average line and slow simple moving average line by printing "F > S" below the price bar if the fast SMA line crosses above the slow SMA line and printing "F < S" above the price bar if the fast SMA line crosses below the slow SMA line. Crossings of fast and slow SMA often indicate reversal of the price trends. the price bar if the fast SMA line crosses below the slow SMA line. Crossings of fast and slow SMA often indicate reversal of the price trends.
Helps you to label the Local Maximum and Local Minimum bars. If the high price of the middle bar inside a group of 3 bars is higher than its left and right neighbors, the label "Max" is printed above that middle price bar. Similarly, the label "Min" is printed below that middle price bar if the low price of it inside a group of 3 bars is lower than those of its left and right neighbors. Local Maximum and Minimum helps a lot in drawing the most recent supply and demand lines in which the price may breakout from.
Helps you to label "C75" to the price bars that close at or above 75% of their own range and label "C25" to the price bars that close at or below 25% of their ow n range. A C75 bar is often followed by an uptrend while a C25 is often followed by a downtrend.
Helps you to see the highest and lowest prices of the previous day. These levels are very important for M and W trading in the time frame smaller than daily graph since both intraday double top and double bottom pattern often appear around the previous day's high and low prices.
Helps you to see the time periods of business hours for people working in the financial markets in Asia, Lodon, and New York. The market prices are active and often provide high opportunities for making profits during these time periods.
Parameters of features in the above list could be changed, or turned on/off easily in the input options of Forex Insight Pro 4.0 custom indicator.
=================================================================================================
The source code of Forex Insight Pro 4.0 custom indicator is protected.
Only invited TradingView members can apply this indicator to their forex, crypto currency and stock price charts.
Lifetime invitation is for 100 USD with free future upgrade and online support.
Rental invitation is for 10 USD/month.
Paypal, bank transfer and Bitcoin payments are welcome.
The author (DrGraph or Nimit Chomnawang, PhD) can be contacted with his TradingView handle.
=================================================================================================
How to install the script:
------------------------------
*Go to the bottom of this page and click on "Add to Favorite Scripts".
*Open a new chart and click on the "Indicators" tab.
*Click on the "Favorites" tab and choose "Forex Insight Pro 4.0".
*Right click anywhere on the graph, choose "Settings".
*In "Style" tab, choose the Dark Theme.
*In "Background" tab, uncheck "Indicator Arguments" and "Indicator Values".
*In "Timezone/Sessions" tab, choose Time Zone = Exchange or your time zone.
*At the bottom of settings window, click on "Template", "SaveAs...", then name this theme of graph setting for future call up such as "Forex Insight Pro".
*Click OK.
For free TradingView plan, you can add two more indicators to the chart. That means you may add RSI or MACD indicators with same parameters as those setup in Forex Insight Pro and Volume indicator to your graph. DrGraph regularly publish his educational idea on using features provided in Forex Insight Pro for profitable investments. You can follow him for how to use the tools.
ZenAlgo - Golden VeinOverview and Motivation
This indicator combines multiple volume-weighted average price (VWAP) calculations from different timeframes and then merges them into a single composite line called “the Vein”. It begins by pulling a user-defined source (for instance, a typical price) and then anchors a VWAP on daily, weekly, monthly, quarterly, semiannual, and yearly intervals. By viewing all these timeframes together, the script captures multi-period trends in a way that stands apart from simpler, single-timeframe VWAP indicators. This comprehensive perspective is designed to offer practical benefits to those who monitor both short- and long-term VWAP behavior within a single tool.
Because it tracks many timeframes simultaneously, it can highlight instances when short-term and long-term VWAPs converge or diverge. Traders who need multi-timeframe validation may find this approach particularly helpful. Other free indicators typically restrict themselves to one or two timeframes, so the built-in multi-timeframe data in this script can save effort for those who rely heavily on VWAP analysis.
Core Inputs and Offsets
At the start, the script takes a single price input (e.g., the average of high, low, and close) and uses it to compute multiple VWAP lines. Users can also choose a distance factor (based on an ATR calculation) to control how far labels are placed from any crossover events. This distance sets how clearly the chart will display labels without overcrowding.
Beyond giving a cleaner visual, having a user-defined distance for labels means the script can adapt to any ticker’s volatility. If one trades assets with large intraday swings, the script leaves enough space for labels to remain readable. This flexibility is something that simpler free VWAP scripts might lack.
Multi-Timeframe VWAP Computations
The script calculates distinct VWAP lines: Daily, Weekly, Monthly, Quarterly (3-Month), Semiannual (6-Month), and Yearly (12-Month). Each line resets whenever it detects a new period has started, ensuring that each timeframe’s VWAP properly anchors to its own session window. This allows the indicator to track how the market perceives fair value (through VWAP) on multiple horizons, all at once.
Simultaneously checking these various intervals can offer added clarity to traders who want to compare immediate market conditions (e.g., daily) to broader contexts (e.g., quarterly or yearly). Tools that only show one or two timeframes may miss the nuances that arise when, say, daily VWAP aligns with monthly VWAP at a turning point.
Crossover Detection and Labeling
Whenever two different VWAP lines intersect, the script generates an internal crossover signal. It then draws small labels (e.g., D↑W or M↓Q) to highlight that a lower timeframe VWAP has moved above or below a higher timeframe VWAP. These labels use color-coding and an ATR-based offset to remain visible.
An additional subtle feature is how daily VWAP crossovers can optionally be displayed only on a specific weekday and hour. That allows users who only want to track daily crossovers under certain conditions (for example, a fixed point in the weekly cycle) to filter out other signals. This adaptability can be worth paying for if one needs advanced filtering—an area where simpler free VWAP cross indicators typically do not offer such granular control.
The “Golden VWAP” (Composite Calculation)
All six VWAP lines (daily, weekly, monthly, quarterly, semiannual, yearly) feed into a central average called “the Vein”. The script takes the midpoint of these six values on each bar, effectively combining short-, medium-, and long-term VWAP data into one. This composite serves as a reference line for overall market direction.
A volatility band (either a standard-deviation-based range or a user-defined percentage) wraps around this composite. The script thereby creates an upper and a lower boundary around the Golden VWAP, called “Resistance” and “Support.” Traders may interpret price moves beyond these levels as higher-probability expansions or contractions, but there is no guarantee of outcome. In choppier markets, breakouts above or below these bands might not lead to follow-through, so interpretation should always be combined with other evidence.
Simplified Market State Logic
By checking how price and the Golden VWAP behave from one bar to the next, the script tags the market state with labels like Bullish, Bearish, Super Bullish, or Super Bearish. These classifications hinge on whether the Golden VWAP is rising or falling, and whether price has crossed above or below the composite band. An optional table in the lower-left corner of the chart displays this label.
While such classification is convenient for scanning changing conditions quickly, it should be interpreted with caution. If the market is sideways or if volume patterns are erratic, the script can produce signals that do not align with real momentum. Treat these states as indications of potential bias rather than automatic buy or sell triggers.
Added Value
By gathering VWAP lines across multiple timeframes, generating alerts on all possible combinations of crossovers, and overlaying a composite VWAP with adjustable volatility bands, this script goes beyond typical single-timeframe VWAP indicators. It aims to let users track short-term shifts (e.g., daily crossing weekly) in the context of longer-term trends (e.g., yearly). This granularity and automation can reduce the need for multiple charts or manual recalculations of different VWAP windows.
Why It Can Be Worth Paying For
The capability to simultaneously anchor VWAP to multiple timeframes, detect crossovers, filter out daily signals by weekday/hour, and visualize a composite “Vein” with adjustable ranges represents a comprehensive feature set that free scripts often do not bundle together. For those who rely on multi-timeframe VWAP analysis, the time saved and clarity gained may justify a paid solution.
Interpreting Values
Crossover labels: Identify points where one timeframe’s VWAP moves above or below another. The direction (up or down) suggests potential momentum shifts.
Golden VWAP line: Treat it as the average “fair value” across all anchored periods. Large price moves above or below this line’s surrounding band might signal increased directional conviction—or false breakouts if volume is deceptive.
Market states: Use the Bullish/Super Bullish/Bearish/Super Bearish labels to gauge how price interacts with the composite’s slope and band.
How to Use It Best
Combine these signals with other risk-management methods.
Monitor multiple crossovers in tandem: for example, daily crossing weekly plus monthly crossing quarterly may offer stronger confluence.
Use the optional daily-label toggle to stay focused on selected higher-confidence signals if you find too many crossovers distracting.
Remember that every alert or label should be evaluated in broader market context and your own trading strategy.
Potential Shortcomings
As with any technical study, VWAP lines and crossovers are not foolproof predictors. The script can be less reliable in low-volume or fast-moving conditions. Large price shocks can cause abrupt changes that do not fit the typical patterns this indicator looks for.
In short, this script’s distinct advantage is showing multiple anchored VWAPs and a composite perspective in one place, offering fine control of alerts and appearance settings. Those who benefit most are chartists who want deeper VWAP insights across various timescales without juggling multiple separate indicators. However, like any technical tool, it should be understood as an aid rather than a guarantee of outcomes.
Day’s Open ForecastOverview
This Pine Script indicator combines two primary components:
1. Day’s Open Forecast:
o Tracks historical daily moves (up and down) from the day’s open.
o Calculates average up and down moves over a user-defined lookback period.
o Optionally includes standard deviation adjustments to forecast potential intraday levels.
o Plots lines on the chart for the forecasted up and down moves from the current day's open.
2. Session VWAP:
o Allows you to specify a custom trading session (by time range and UTC offset).
o Calculates and plots a Volume-Weighted Average Price (VWAP) during that session.
By combining these two features, you can gauge potential intraday moves relative to historical behavior from the open, while also tracking a session-specific VWAP that can act as a dynamic support/resistance reference.
How the Code Works
1. Collect Daily Moves
o The script detects when a new day starts using time("D").
o Once a new day is detected, it stores the previous day’s up-move (dayHigh - dayOpen) and down-move (dayOpen - dayLow) into arrays.
o These arrays keep track of the last N days (default: 126) of up/down move data.
2. Compute Statistics
o The script computes the average (f_average()) of up-moves and down-moves over the stored period.
o It also computes the standard deviation (f_stddev()) of up/down moves for optional “forecast bands.”
3. Forecast Lines
o Plots the current day’s open.
o Plots the average forecast lines above and below the open (Avg Up Move Level and Avg Down Move Level).
o If standard deviation is enabled, plots additional lines (Avg+StdDev Up and Avg+StdDev Down).
4. Session VWAP
o The script detects the start of a user-defined session (via input.session) and resets accumulation of volume and the numerator for VWAP.
o As each bar in the session updates, it accumulates volume (vwapCumulativeVolume) and a price-volume product (vwapCumulativeNumerator).
o The session VWAP is then calculated as (vwapCumulativeNumerator / vwapCumulativeVolume) and plotted.
5. Visualization Options
o Users can toggle standard deviation usage, historical up/down moves plotting, and whether to show the forecast “bands.”
o The vwapSession and vwapUtc inputs let you adjust which session (and time zone offset) the VWAP is calculated for.
________________________________________
How to Use This Indicator on TradingView
1. Create a New Script
o Open TradingView, then navigate to Pine Editor (usually found at the bottom of the chart).
o Copy and paste the entire code into the editor.
2. Save and Add to Chart
o Click Save (give it a relevant title if you wish), then click Add to chart.
o The indicator will appear on your chart with the forecast lines and VWAP.
o By default, it is overlayed on the price chart (because of overlay=true).
3. Customize Inputs
o In the indicator’s settings, you can:
Change lookback days (default: 126).
Enable or disable standard deviation (Include Standard Deviation in Forecast?).
Adjust the standard deviation multiplier.
Choose whether to plot bands (Plot Bands with Averages/StdDev?).
Plot historical moves if desired (Plot Historical Up/Down Moves for Reference?).
Set your custom session and UTC offset for the VWAP calculation.
4. Interpretation
o “Current Day Open” is simply today’s open price on your chart.
o Up/Down Move Lines: Indicate a potential forecast based on historical averages.
If standard deviation is enabled, the second set of lines acts as an extended range.
o VWAP: Helpful for determining intraday price equilibrium over the specified session.
Important Notes / Best Practices
• The script only updates the historical up/down move data once per day (when a new day starts).
• The VWAP portion resets at the start of the specified session each day.
• Standard deviation multiplies the average up/down range, giving you a sense of “volatility range” around the day’s open.
• Adjust the lookback length (dayCount) to balance how many days of data you want to average. More days = smoother but possibly slower to adapt; fewer days = more reactive but potentially less reliable historically.
Educational & Liability Disclaimers
1. Educational Disclaimer
o The information provided by this indicator is for educational and informational purposes only. It is a technical analysis tool intended to demonstrate how to use historical data and basic statistics in Pine Script.
2. No Financial Advice
o This script does not constitute financial or investment advice. All examples and explanations are solely illustrative. You should always do your own analysis before making any investment decisions.
3. No Liability
o The author of this script is not liable for any losses or damages—monetary or otherwise—that may occur from the application of this script.
o Past performance does not guarantee future results, and you should never invest money you cannot afford to lose.
By adding this indicator to your TradingView chart, you acknowledge and accept that you alone are responsible for your own trading decisions.
Enjoy using the “Day’s Open Forecast” and Session VWAP for better market insights!
Candle Partition Statistics with IQV and Chi2NOTE: THE FORMULA IN THE CHART IS NOT PART OF THE CODE
This Pine Script calculates statistical measures for candle partitions based on whether a candle is bullish or bearish and whether the price is above or below an EMA. It evaluates statistical properties such as the Index of Qualitative Variation (IQV) and the Chi-Square (χ²) statistic to assess variations in price action.
Concept of Index of Qualitative Variation (IQV)
IQV is a statistical measure used to quantify the diversity or dispersion of categorical variables. In this script, it is used to measure how evenly the four categories of candles (green above EMA, red above EMA, green below EMA, red below EMA) are distributed.
Purpose of IQV in the Script:
IQV ranges from 0 to 1, where 0 indicates no variation (one category dominates) and 1 indicates maximum variation (categories are equally distributed).
A high IQV suggests balanced distributions of bullish/bearish candles above/below the EMA, indicating market uncertainty or mixed sentiment.
A low IQV suggests dominance of a particular candle type, indicating a strong trend.
Concept of Chi-Square (χ²) Test
Chi-square (χ²) is a statistical test that measures the difference between expected and observed frequencies of categorical data. It assesses whether short-term price behavior significantly deviates from historical trends.
Purpose of Chi-Square in the Script:
A high χ² value means that short-term candle distributions are significantly different from historical patterns, indicating potential trend shifts.
If χ² exceeds a predefined significance threshold (chi_threshold), an alert (Chi² Alert!) is triggered.
It helps traders identify periods where recent price behavior deviates from historical norms, possibly signaling trend reversals or market regime changes.
Key Takeaways:
IQV helps measure the diversity of price action, detecting whether the market is balanced or trending.
Chi-square (χ²) identifies significant deviations in short-term price behavior compared to long-term trends.
Both metrics together provide insights into whether the market is stable, trending, or shifting.
The Nasan C-score enhances trend strength by incorporating volatility. It is calculated as:
enhanced_t_s =(𝑡𝑠 × avg_movement x 100)/SMA(𝑐lose)
Key Components:
𝑡𝑠 : Measures trend strength based on price movements relative to EMA.
ts=green_EMAup_a+0.5×red_EMAup_a−(0.5×green_EMAdown_a+red_EMAdown_a)
avg_movement: The SMA of absolute close-open differences, capturing volatility.
Normalization: The division by SMA(close) adjusts the score relative to price levels.
Purpose of the Nasan C-score
Enhanced Trend Strength
It amplifies the trend strength value by factoring in volatility (price movement).
If price volatility is high, trend strength variations have a greater impact.
Volatility-Adjusted Momentum
By scaling 𝑡𝑠 with average movement, the score adjusts to changing price dynamics.
Higher price fluctuations lead to a higher score, making trend shifts more prominent.
How It Can Be Used in Trading
Higher values of Nasan C-score indicate strong bullish or bearish trends.
Comparing it with past values helps determine whether momentum is increasing or fading.
Thresholds can be set to identify significant trend shifts based on historical highs and lows.
[blackcat] L2 Six Round Positioning█ OVERVIEW
The script is an indicator designed to plot the direction (up, down, no change) of several moving averages (MA) on a separate chart, without overlaying the price data. It calculates Simple Moving Averages (SMA) for 3, 5, 8, 34, 60, 120, and 250 periods and uses conditional logic to determine the color and position of the plotted columns based on whether each MA is increasing, decreasing, or unchanged.
█ LOGICAL FRAMEWORK
The script is structured into three main sections:
1 — Input Parameters: None explicitly defined, but the script uses default settings for the indicator function.
2 — Calculations: Computes Simple Moving Averages (SMA) for seven different periods.
3 — Plotting: Uses conditional logic to plot columns representing the direction of each MA, with positions and colors indicating whether the MA is increasing, decreasing, or unchanged.
The flow of data is straightforward: the script calculates the SMAs, determines their direction, sets the appropriate color, and then plots the columns.
█ CUSTOM FUNCTIONS
• No custom functions are defined in this script. All calculations and plotting are done using built-in Pine Script functions such as ta.sma for SMA calculation and plot for plotting.
█ KEY POINTS AND TECHNIQUES
• Use of ta.sma: The script effectively uses the ta.sma function to calculate Simple Moving Averages for different periods.
• Conditional Logic: The script employs conditional logic (ternary operators) to determine the color and position of the plotted columns based on the direction of each MA.
• Plotting with plot: The plot function is used extensively to display the direction of each MA with different colors and positions.
• Color Transparency: The use of color.new with transparency (e.g., color.new(color.green, 50)) allows for visually distinct colors that are not too overpowering.
█ EXTENDED KNOWLEDGE AND APPLICATIONS
• Modifications: The script could be enhanced by adding input parameters to allow users to customize the periods of the moving averages, colors, and transparency levels.
• Extensions: Similar techniques could be applied to other types of moving averages (e.g., EMA, WMA) or to other technical indicators.
• Strategy Development: This indicator could serve as a component in a larger trading strategy by providing insights into the overall trend direction across multiple timeframes.
• Related Concepts: Understanding of moving averages, conditional logic, and plotting techniques in Pine Script would be beneficial for further development and customization of this script.
Strategy:Reversal-CatcherWhat
This is a plain and vanilla reversal based strategy for intraday (15m) timeframe on Futures prices of the assets.
Now what all it comprises of?
It finds out the dynamic support & resistance from Bollinger Band (20 period, 1.5 std dev).
It finds out the potential divergence of price deviation from 5 period exponential moving average (EMA).
If the previous candle (N-1) shows a divergence it confirms the reversal by checking the present candle (N) to be closed inside the Bollinger Band.
It confirms the momentum by checking RSI shows a crossover/crossunder to oversold (30) / overbought (70) region.
It also confirms whether the trend is up (then only reversal trade to short) or down (then only reversal trade to long). The trend is checked with EMA-21 and EMA-50.
Re-affirmation Condition : It re-affirms the position of two successive candles called as `hhLLong` and `hhLLShort` in the script.
Why
In Indian context, retail participants are pre-dominantly (yes- 80% of Indian daily volume) Options buyers mainly in weekly indices (Nifty, BankNifty, FinNifty, CNXMidcap, Sensex, Bankx .. well everyday is expiry now in India, except -- Thank God -- Saturday & Sunday).
And in Index Options the momentum plays a big role.
If one can catch a good reversal point the potential of high Risk-to-Reward trade (hence earn handsomely) is very likely (please note: there is no holy grail in trading. Nothing works 100%).
So this is the attempt to catch a reversal.
Re-affirmation of Reversal
hhLLong : It's a reversal point after an uptrend. It checks the relative positioning of current candle compared to that of previous candle. [The details are in the script. Check for variable hhLLong in script.
hhLLShort : It's a reversal point after a downtrend. It checks the relative positioning of current candle compared to that of previous candle. [The details are in the script. Check for variable hhLLShort in script.
Unique-ness
What's unique in it? Why we decided to publicly share this:
Already given the context of The Great Indian Options Buyers community. It should be helpful to them, we believe.
It takes Very Less Number of Trades with High Accuracy . Please check the result in NSE:NIFTY1! in 15m timeframe. 71% accuracy with roughly a trade in a month.
There is no point giving brokers' the brokerages taking 10 trades a day and ending not-so-good EoD. Better lets take less trades with better result possibility. .
Mention
There are many people uses this variation of Bolling Band, 5EMA
Many people use RSI, trends and relative positioning of candles.
--> We are grateful to all of them. It's really difficult to mention everyone's name. But all people somehow influence the thought process. Thanks for all of them.
Statutory Disclaimer
There is no silver bullet / holy grail in trading. Nothing works 100% time. One has to be careful about the loss (s)he can bear in case of the trade goes against.
We, as the author of this script, is not responsible for any trading or position decision one is taken based on the outcome of this.
It is our sole discretion to change, add, delete the portion or withdraw the whole script without any prior notice or intimation.
In Indian Context : We are not SEBI registered, will never be SEBI registered.
Monthly Strategy Performance TableWhat Is This?
This script code adds a Monthly Strategy Performance Table to your Pine Script strategy scripts so you can see a month-by-month and year-by-year breakdown of your P&L as a percentage of your account balance.
The table is based on realized equity rather than open equity, so it only updates the metrics when a trade is closed.
That's why some numbers will not match the Strategy Tester metrics (such as max drawdown), as the Strategy Tester bases metrics like max drawdown on open trade equity and not realized equity (closed trades).
The script is still a work-in-progress, so make sure to read the disclaimer below. But I think it's ready to release the code for others to play around with.
How To Use It
The script code includes one of my strategies as an example strategy. You need to replace my strategy code with your own. To do that just copy the source code below into a blank script, delete lines 11 -> 60 and paste your strategy code in there instead of mine. The script should work with most systems, but make sure to read the disclaimer below.
It works best with a significant amount of historical data, so it may not work very effectively on intraday timeframes as there is a severe limitation of available bars on TradingView. I recommend using it on 4HR timeframes and above, as anything less will produce very little usable data. Having a premium TradingView plan will also help boost the number of available bars.
You can hover your mouse over a table cell to get more information in the form of tooltips (such as the Long and Short win rate if you hover over your total return cell).
Credit
The code in this script is based on open-source code originally written by QuantNomad, I've made significant changes and additions to the original script but all credit for the idea and especially the display table code goes to them - I just built on top of it:
Why Did I Make This?
None of this is trading or investment advice, just my personal opinion based on my experience as a trader and systems developer these past 6+ years:
The TradingView Strategy Tester is severely limited in some important ways. And unless you use complex Excel formulas on exported test data, you can't see a granular perspective of your system's historical performance.
There is much more to creating profitable and tradeable systems than developing a strategy with a good win rate and a good return with a reasonable drawdown.
Some additional questions we need to ask ourselves are:
What did the system's worst drawdown look like?
How long did it last?
How often do drawdowns occur, and how quickly are they typically recovered?
How often do we have a break-even or losing month or year?
What is our expected compounded annual growth rate, and how does that growth rate compare to our max drawdown?
And many more questions that are too long to list and take a lifetime of trading experience to answer.
Without answering these kinds of questions, we run the risk of developing systems that look good on paper, but when it comes to live trading, we are uncomfortable or incapable of enduring the system's granular characteristics.
This Monthly Performance Table script code is intended to help bridge some of that gap with the Strategy Tester's limited default performance data.
Disclaimer
I've done my best to ensure the numbers this code outputs are accurate, and according to my testing with my personal strategy scripts it appears to work fine. But there is always a good chance I've missed something, or that this code will not work with your particular system.
The majority of my TradingView systems are extremely simple single-target systems that operate on a closed-candle basis to minimize many of the data reliability issues with the Strategy Tester, so I was unable to do much testing with multiple targets and pyramiding etc.
I've included a Debug option in the script that will display important data and information on a label each time a trade is closed. I recommend using the Debug option to confirm that the numbers you see in the table are accurate and match what your strategy is actually doing.
Always do your own due diligence, verify all claims as best you can, and never take anyone's word for anything.
Take care, and best of luck with your trading :)
Kind regards,
Matt.
PS. If you're interested in learning how this script works, I have a free hour-long video lesson breaking down the source code - just check out the links below this script or in my profile.
BUY/SELL + ADVANCE DECLINEThis script is a custom trading view indicator that helps to identify potential buy and sell signals based on the RSI (Relative Strength Index) and SMA (Simple Moving Average) indicators. The script also identifies potential reversals using a combination of RSI and price action. It plots buy, sell, and reversal signals on the chart along with an SMA line. Additionally, it provides alerts based on the buy, sell, and reversal conditions.
Changes made to the original script:
Fixed the undeclared identifier 'c' error by calculating the difference between the current closing price and the previous closing price: c = close - close .
Added an "ADD Value Floating Label" to the chart. The label shows the difference between the current and previous closing prices (ADD value) along with a "Bullish" or "Bearish" indicator based on the value of 'c'. The label is positioned at the top right of the visible chart area and remains static.
Here's a summary of the major components of the script:
Input settings: Define the input parameters for RSI and SMA.
Calculation of RSI and SMA: Compute the RSI and SMA values based on the input parameters.
Color definitions: Define colors for different conditions and levels.
Condition definitions: Define various conditions for buy, sell, reversal, and other criteria.
Buy and sell conditions: Determine buy and sell signals based on RSI, SMA, and price action.
Reversal conditions: Identify potential reversals using RSI and price action.
Plot signals: Display buy, sell, and reversal signals on the chart.
Bar colors: Color the bars based on the identified signals.
Plot SMA: Display the SMA line on the chart.
Alert conditions: Set up alerts for buy, sell, and reversal conditions.
ADD Value Floating Label: Add a label to the chart showing the ADD value and a "Bullish" or "Bearish" indicator.
Divergences in 52 Week Moving Averages, Adjusted and SmoothedThis script description is intended to be holistic and comprehensive for the understanding of the interested parties who view the script.
Following the PineCoders suggestions, I have provided detailed breakdowns both within the code and in the description immediately below:
► Description
This description is intended to be detailed and meaningful, conveying the understanding of the script’s intention to the user:
The theory: Divergences and extreme readings in 52-Week highs on major indexes can provide a view into a potential pending move in the opposite direction of how the market has been trending. By comparing the 52-Week Hi/Lo indices and applying an Exponential Moving Average (EMA), we can assess how extreme a move is from the average. If the move provides an extreme reading, it would potentially be beneficial to “fade” the move (take a position in the opposing direction).
The intention: The intentionality of this script is to provide a visualization of when the highly-probable opportunity to fade over a multi-day or multi-week period arises. In addition to this, based on backtesting prior moves and reading the various levels of significant reversals, three tiers: “Standard”, “Sensitive”, and “Highly Sensitive” have been applied, the user can choose which sensitivity level they would like to see, there are far less false positives on the Standard and Sensitive settings, while Highly Sensitive often signals multiple times with the move coming a few days later.
The application: The settings allow the user to customize their sensitivity to the fade signals, with the ability to customize the visual that shows up as well. For higher-highs that are fade-worthy, the signal will appear on the top of the candle, for lower-lows that are fade-worthy, the signal will appear on the bottom of the candle. The users risk criteria should be the primary driver of the entry/exit, although when backtesting it appears that the significant move is typically completed within a 2-4 week period at max and 3-5 day period at minimum.
A personal note: I am a futures trader intraday but would very strongly caution users when using this strategy with futures (unless their risk tolerance is higher than most). The most beneficial strategy when fading moves would be to enter in tranches, starting at the first signal and adding on any pullback (as long as the pullback is not below the initial entry point). 1-6 Week Date-To-Expiry options would be the primary method for applying this strategy. I would also like to add that SPY/SPX options (SPDR S&P 500 ETF Trust / CBOE S&P 500 Index) are the most liquid options that could be applied in this strategy.
► Description (additional)
With the understanding that few users can read pinescript (Pine), the description above contains all of the necessary information that is necessary for a user to understand the intention for script utilization. For those who do understand Pine, the code is commented in each section in order to provide an understanding of the underlying functions, calculations, and thought process that went on during the writing of the script.
► Description (additional)
This script’s description contains no delegations, all aspects of the script as well as the initial idea behind it are contained in the description above, which is self-contained in it’s entirety with a clear and defined purpose that is written with the intent to holistically capture the intent of the potential use for this indicator.
► General House Rule #2
This script and the description (as well as my profile) contain no links or associations to promotion of any kind, I am not a business, I am not an individual that will in any way make money from this script or the promotion of another person, idea, company, entity, or legal persons (foreign or domestic).
► Originality and usefulness
This is an original and custom script (and idea) that is not a rehashing or a copy of any code from any other programmers in the tradingview community.
Crypto Uptrend Script + Pullback//Volume CandlesDescription: his is an adaption of my Pullback candle - This works on all timeframes and Markets (Forex//Stocks//)
Crypto Uptrend Script with Pullback Candle allows traders to get into a trend when the price is at end of a pullback and entering a balance phase in the market (works on all markets). The use of Moving averages to help identify a Trends and the use of Key levels to help traders be aware of where strong areas are in the market.
This script can work really well in Crypto Bull Runs when used on HTF and with confluences
The script has key support and resistance zones which are made up of quarterly data. Price reacts to these areas but patience is required as price will take time to come into these areas
I have updated the Pullback Candle with the use of Volume to filter out the weak Pullback Candles -
There are new candles to the script.
The First candle is the Bullish Volume Candle - This candle is set to a multiplier of 2x with a crossover of 50/100 on Volume - this then will paint a purple candle.
Uses of the Bullish Volume Candle:
Breakthrough of key areas // special chart patterns
Rejection of key areas
End of a impulse wave (Profit Takers)
The second candle is a Hammer - I prefer using the Hammers on Higher Timeframes however they do work on all timeframes. .
The third candle is a Exhaustion of impulse downward move.
Uses of this candle - can denote a new trend but has to be with confluence to a demand area // support area or with any use of technical analysis - using this alone is not advised
The fourth candle is a indecision candle in the shape of a Doji - this candle can help identify if the trend is in a continuation or a reversal
This script can work really well in Crypto Bull Runs
Disclaimer: There will be Pullbacks with High Volume (Breakouts) and not go the way as intended but this script is to allow traders to get into trends at good price levels. The script can paint signals in areas where price is too expensive so please do your own due diligence on the markets as this script is to help get into good areas of price
Please leave a thumbs up if you like this script and message me for information on how to use the script.
Weis V5 zigzag jayySomehow, I deleted version 5 of the zigzag script. Same name. I have added some older notes describing how the Weis Wave works.
I have also changed the date restriction that stopped the script from working after Dec 31, 2022.
What you see here is the Weis zigzag wave plotted directly on the price chart. This script is the companion to the Weis cumulative wave volume script.
What is a Weis wave? David Weis has been recognized as a Wyckoff method analyst he has written two books one of which, Trades About to Happen, describes the evolution of the now-popular Weis wave. The method employed by Weis is to identify waves of price action and to compare the strength of the waves on characteristics of wave strength. Chief among the characteristics of strength is the cumulative volume of the wave. There are other markers that Weis uses as well for example how the actual price difference between the start of the Weis wave from start to finish. Weis also uses time, particularly when using a Renko chart
David Weis did a futures io video which is a popular source of information about his method. (Search David Weis and futures.io. I strongly suggest you also read “Trades About to Happen” by David Weis.
This will get you up and running more quickly when studying charts. However, you should choose the Traditional method to be true to David Weis technique as described in his book "Trades About to Happen" and in the Futures IO Webcast featuring David Weis
. The Weis pip zigzag wave shows how far in terms of bar close price a Weis wave has traveled through the duration of a Weis wave. The Weis zigzag wave is used in combination with the Weis cumulative volume wave. The two waves should be set to the same "wave size".
To use this script, you must set the wave size: Using the traditional Weis method simply enter the desired wave size in the box "How should wave size be calculated", in this example I am using a traditional wave size of .25. Each wave for each security and each timeframe requires its own wave size. Although not the traditional method devised by David Weis a more automatic way to set wave size would be to use Average True Range (ATR). Using ATR is not the true Weis method but it does give you similar waves and, importantly, without the hassle described above. Once the Weis wave size is set then the zigzag wave will be shown with volume. Because Weis used the closing price of a wave to define waves a line Bar highs and bar lows are not captured by the Weis Wave. The default script setting is now cumulative volume waves using an ATR of 7 and a multiplication factor of .5.
To display volume in a way that does not crowd out neighbouring volumes Weis displayed volume as a maximum of 3 digits (usually). Consider two Weis Wave volumes 176,895,570 and 2,654,763,889. To display wave volume as three digits it is necessary to take a number such as 176,895,570 and truncate it. 176,895,570 can be represented as 177 X 10 to the power of 6. The number displayed must also be relative to other numbers in the field. If the highest volume on the page is: 2,654,763,889 and with only three numbers available to display the result the value shown must be 265 (265 X 10 to the power of 7). Since 176,895,570 is an order of magnitude smaller than 2,654,763,889 therefore 175,895,570 must be shown as 18 instead of 177. In this way, the relative magnitudes of the two volumes can be understood. All numbers in the field of view must be truncated by the same order of magnitude to make the relative volumes understandable. The script attempts to calculate the order of magnitude value automatically. If you see a red number in the field of view it means the script has failed to do the calculation automatically and you should use the manual method – use the dialogue box “Calculate truncated wave value automatically or manually”. Scroll down from the automatic method and select manual. Once "manual" is selected the values displayed become the power values or multipliers for each wave.
Using the manual method you will select a “Multiplier” in the next dialogue box. Scan the field and select the largest value in the field of view (visible chart) is the multiplier of interest. If you select a lower number than the maximum value will see at least one red “up”. If you are too high you will see at least one red “down”. Scroll in the direction recommended or the values on the screen will be totally incorrect. With volume truncated to the highest order values, the eye can quickly get a feel for relative volumes. It also reduces the crowding and overlapping of values on the screen. You can opt to show the full volume to help get a sense of the magnitude of the true volumes.
How does the script determine if a Weis wave is continuing to grow or not?
The script evaluates the closing price of each new bar relative to the "Weis wave size". Suppose the current bar closes at a new low close, within the current down wave, at $30.00. If the Weis wave size is $0.10 then the algorithm will remember the $30.00 close and compare it to the close of the next bar. If the bar close price does not close equal to or lower than $30.00 or close equal to or higher than $30.10 then the wave is still a down wave with a current low of $30.00. This is true even if the bar low is less than $30.00 or the bar high is greater than 30.10 – only the bar’s closing price matters. If a bar's closing price climbs back up to a close of $30.11 then because the closing price has moved more than $0.10 (the Weis wave size) then that is a wave reversal with a new up-trending wave. In the above example if there was currently a downward trending wave and the bar closes were as follows $30.00, $30.09, $30.01, $30.05, $30.10 The wave direction would continue to stay downward trending until the close of $30.10 was achieved. As such $30.00 would be the low and the following closes $30.09, $30.01, $30.05 would be allocated to the new upward-trending wave. If however There was a series of bar closes like this $30.00, $30.09, $30.01, $30.05, $29.99 since none of the closes was equal to above the 10-cent reversal target of $30.10 but instead, a new Weis wave low was achieved ($29.99). As such the closes of $30.09, $30.01, $30.05 would all be attributed to the continued down-trending wave with a current low of $29.99, even though the closing price for the interim bars was above $30.00. Now that the Weis Wave low is now 429.99 then, in order to reverse this continued downtrend price will need to close at or above $30.09 on subsequent bar closes assuming now new low bar close is achieved. With large wave sizes, wave direction can be in limbo for many bars before a close either renews wave direction or reverses it and confirms wave direction as either a reversal or a continuation. On the zig-zag, a wave line and its volume will not be "printed" until a wave reversal is confirmed.
The wave attribution is similar when using other methods to define wave size. If ATR is used for wave size instead of a traditional wave constant size such as $0.10 or $2 or 2000 pips or ... then the wave size is calculated based on current ATR instead of the Weis wave constant (Traditional selected value).
I have the option to display pseudo-Ord volume. In truth, Ord used more traditional zig-zag pivots of bar highs and lows. Waves using closes as pivots can have some significant differences. This difference can be lessened by using smaller time frames and larger wave sizes.
There are other options such to display the delta price or pip size of a Weis Wave, the number of bars in a wave, and a few other options.
New Bearish Downtrend Script - Perfect for Short SellingIts been a while since i last uploaded a script, what i have for you today is a script which works very efficiently for downtrends and spotting reversals. This is a script i use on a weekly basis when looking to short sell.
This script includes :
Updated** Rally Candles for HTF and LTF ( End of Impulsive move signal) - The psychology of the candle when used with market information can be viewed as a end or near to the end of a big impulsive leg - when this candle occurs in BEARISH CONDITIONS, we can assume price is likely to move away short term.
Major and Minor Support Levels HTF (Areas of interest)
The Psychology on these levels is price will do something at these key levels - it takes in the last quarter price action of High Open Low Close to generate the price levels and when price comes into these areas we are likely to see a bounce or rejection from this area.
Bearish Breakout Volume Candle - This candle will paint a Purple colour bar when volume breaks above the 7day average - this shows strong momentum in the market and will usually be seen when price is in a downtrend with strong momentum.. However when this does occur we can expect a short term bounce or base so don't trade the volume bar alone.
Indecision Candles - Psychology of this candle is to show exhaustion in the trend and ideally what to see this candle appear with Rally Candles at key areas for stronger set up. When the trend is moving up, the bearish doji can appear - i tend to look at this situation as a pause in the trend.
200 EMA
Everything in this script has alert conditions to provide an edge in the markets
This is an example of how the script will look on the HTF I'm using the Daily Timeframe for reference on TSLA
This is an example of how the script looks like on the LTF, price hit the Major Resistance twice and failed to hit the 3rd time and on each leg of the impulse, the chart portrayed the LTF Rally Candles
Heres an example on how to use both Major Resistance ( Area of Interest) Rally Candle and Volume Breakout as a trade set up idea - This setup idea was on Crude Oil last week and into this week.
When added to confluences such as Supply Zones, Mitigation Levels, Quasimodo patterns etc... this will enhance the script.
I will answer any questions if i haven't made the script clear or take any requests to improve the script.
Also will be uploading the Bullish Uptrend Script soon.
Buy/Sell on the levelsThis script is generally
My describe is:
There are a lot of levels we would like to buy some crypto.
When the price has crossed the level-line - we buy, but only if we have the permission in array(2)
When we have bought the crypto - we lose the permission for buy for now(till we will sell it on the next higher level)
When we sell some crypto(on the buying level + 1) we have the permission again.
There also are 2 protect indicators. We can buy if these indicators both green only(super trend and PIVOT )
Jun 12
Release Notes: Hello there,
Uncomment this section before use for real trade:
if array.get(price_to_sellBue, i) >= open and array.get(price_to_sellBue, i) <= close// and
//direction < 0 and permission_for_buy != 0
Here is my script.
In general - this is incredible simple script to use and understand.
First of all You can see this script working with only long orders, it means we going to get money if crypto grows only. Short orders we need to close the position on time.
In this script we buy crypto and sell with step 1% upper.
You can simply change the step by changing the price arrays.
Please note, if You want to see where the levels of this script is You Have to copy the next my indicator called LEVEL 1%
In general - if the price has across the price-level we buy some crypto and loose permission for buying for this level till we sell some crypto. There is ''count_of_orders" array field with value 2. When we bought some crypto the value turns to 0. 0 means not allowed to by on this level!!! The script buy if the bar is green only(last tick).
The script check every level(those we can see in "price_to_sellBue" array).
If the price across one of them - full script runs. After buying(if it possible) we check is there any crypto for sell on the level.
We check all levels below actual level( of actual level - ''i'' than we check all levels from 0 to i-1).
If there is any order that has value 0 in count of orders and index <= i-1 - we count it to var SELL amount and in the end of loop sell all of it.
Pay attention - it sells only if price across the level with red bar AND HAS ORDERS TO SELL WHICH WAS BOUGHT BELOW!!!
In Strategy tester it shows not-profitables orders sometimes, because if You have old Long position - it sells it first. First in - first out.
If the price goes down for a long time and You sell after 5 buys You sell the first of it with the highest value.
There is 2 protection from horrible buying in this strategy. The first one - Supertrend. If the supertrend is red - there is no permission for buy.
The second one - something between PIVOT and supertrend but with switcher.
If the price across last minimum - switcher is red - no permission for buy and the actual price becomes last minimum . The last maximum calculated for last 100 bars.
When the price across last maximum - switcher is green, we can buy. The last minimum calculation for last 100 bars, last maximum is actual price.
This two protections will save You from buying if price get crash down.
Enjoy my script.
Should You need the code or explanation, You have any ideas how to improve this crypt, contact me.
Vladyslav.
Jun 12
Release Notes: Here has been uncommented the protection for buy in case of price get down.
5 hours ago
Release Notes: Changed rages up to actual price to make it work
CVD - Cumulative Volume Delta Candles█ OVERVIEW
This indicator displays cumulative volume delta in candle form. It uses intrabar information to obtain more precise volume delta information than methods using only the chart's timeframe.
█ CONCEPTS
Bar polarity
By bar polarity , we mean the direction of a bar, which is determined by looking at the bar's close vs its open .
Intrabars
Intrabars are chart bars at a lower timeframe than the chart's. Each 1H chart bar of a 24x7 market will, for example, usually contain 60 bars at the lower timeframe of 1min, provided there was market activity during each minute of the hour. Mining information from intrabars can be useful in that it offers traders visibility on the activity inside a chart bar.
Lower timeframes (LTFs)
A lower timeframe is a timeframe that is smaller than the chart's timeframe. This script uses a LTF to access intrabars. The lower the LTF, the more intrabars are analyzed, but the less chart bars can display CVD information because there is a limit to the total number of intrabars that can be analyzed.
Volume delta
The volume delta concept divides a bar's volume in "up" and "down" volumes. The delta is calculated by subtracting down volume from up volume. Many calculation techniques exist to isolate up and down volume within a bar. The simplest techniques use the polarity of interbar price changes to assign their volume to up or down slots, e.g., On Balance Volume or the Klinger Oscillator . Others such as Chaikin Money Flow use assumptions based on a bar's OHLC values. The most precise calculation method uses tick data and assigns the volume of each tick to the up or down slot depending on whether the transaction occurs at the bid or ask price. While this technique is ideal, it requires huge amounts of data on historical bars, which usually limits the historical depth of charts and the number of symbols for which tick data is available.
This indicator uses intrabar analysis to achieve a compromise between the simplest and most precise methods of calculating volume delta. In the context where historical tick data is not yet available on TradingView, intrabar analysis is the most precise technique to calculate volume delta on historical bars on our charts. Our Volume Profile indicators use it. Other volume delta indicators in our Community Scripts such as the Realtime 5D Profile use realtime chart updates to achieve more precise volume delta calculations, but that method cannot be used on historical bars, so those indicators only work in real time.
This is the logic we use to assign intrabar volume to up or down slots:
• If the intrabar's open and close values are different, their relative position is used.
• If the intrabar's open and close values are the same, the difference between the intrabar's close and the previous intrabar's close is used.
• As a last resort, when there is no movement during an intrabar and it closes at the same price as the previous intrabar, the last known polarity is used.
Once all intrabars making up a chart bar have been analyzed and the up or down property of each intrabar's volume determined, the up volumes are added and the down volumes subtracted. The resulting value is volume delta for that chart bar.
█ FEATURES
CVD Candles
Cumulative Volume Delta Candles present volume delta information as it evolves during a period of time.
This is how each candle's levels are calculated:
• open : Each candle's' open level is the cumulative volume delta for the current period at the start of the bar.
This value becomes zero on the first candle following a CVD reset.
The candles after the first one always open where the previous candle closed.
The candle's high, low and close levels are then calculated by adding or subtracting a volume value to the open.
• high : The highest volume delta value found in intrabars. If it is not higher than the volume delta for the bar, then that candle will have no upper wick.
• low : The lowest volume delta value found in intrabars. If it is not lower than the volume delta for the bar, then that candle will have no lower wick.
• close : The aggregated volume delta for all intrabars. If volume delta is positive for the chart bar, then the candle's close will be higher than its open, and vice versa.
The candles are plotted in one of two configurable colors, depending on the polarity of volume delta for the bar.
CVD resets
The "cumulative" part of the indicator's name stems from the fact that calculations accumulate during a period of time. This allows you to analyze the progression of volume delta across manageable chunks, which is often more useful than looking at volume delta cumulated from the beginning of a chart's history.
You can configure the reset period using the "CVD Resets" input, which offers the following selections:
• None : Calculations do not reset.
• On a fixed higher timeframe : Calculations reset on the higher timeframe you select in the "Fixed higher timeframe" field.
• At a fixed time that you specify.
• At the beginning of the regular session .
• On a stepped higher timeframe : Calculations reset on a higher timeframe automatically stepped using the chart's timeframe and following these rules:
Chart TF HTF
< 1min 1H
< 3H 1D
<= 12H 1W
< 1W 1M
>= 1W 1Y
The indicator's background shows where resets occur.
Intrabar precision
The precision of calculations increases with the number of intrabars analyzed for each chart bar. It is controlled through the script's "Intrabar precision" input, which offers the following selections:
• Least precise, covering many chart bars
• Less precise, covering some chart bars
• More precise, covering less chart bars
• Most precise, 1min intrabars
As there is a limit to the number of intrabars that can be analyzed by a script, a tradeoff occurs between the number of intrabars analyzed per chart bar and the chart bars for which calculations are possible.
Total volume candles
You can choose to display candles showing the total intrabar volume for the chart bar. This provides you with more context to evaluate a bar's volume delta by showing it relative to the sum of intrabar volume. Note that because of the reasons explained in the "NOTES" section further down, the total volume is the sum of all intrabar volume rather than the volume of the bar at the chart's timeframe.
Total volume candles can be configured with their own up and down colors. You can also control the opacity of their bodies to make them more or less prominent. This publication's chart shows the indicator with total volume candles. They are turned off by default, so you will need to choose to display them in the script's inputs for them to plot.
Divergences
Divergences occur when the polarity of volume delta does not match that of the chart bar. You can identify divergences by coloring the CVD candles differently for them, or by coloring the indicator's background.
Information box
An information box in the lower-left corner of the indicator displays the HTF used for resets, the LTF used for intrabars, and the average quantity of intrabars per chart bar. You can hide the box using the script's inputs.
█ INTERPRETATION
The first thing to look at when analyzing CVD candles is the side of the zero line they are on, as this tells you if CVD is generally bullish or bearish. Next, one should consider the relative position of successive candles, just as you would with a price chart. Are successive candles trending up, down, or stagnating? Keep in mind that whatever trend you identify must be considered in the context of where it appears with regards to the zero line; an uptrend in a negative CVD (below the zero line) may not be as powerful as one taking place in positive CVD values, but it may also predate a movement into positive CVD territory. The same goes with stagnation; a trader in a long position will find stagnation in positive CVD territory less worrisome than stagnation under the zero line.
After consideration of the bigger picture, one can drill down into the details. Exactly what you are looking for in markets will, of course, depend on your trading methodology, but you may find it useful to:
• Evaluate volume delta for the bar in relation to price movement for that bar.
• Evaluate the proportion that volume delta represents of total volume.
• Notice divergences and if the chart's candle shape confirms a hesitation point, as a Doji would.
• Evaluate if the progress of CVD candles correlates with that of chart bars.
• Analyze the wicks. As with price candles, long wicks tend to indicate weakness.
Always keep in mind that unless you have chosen not to reset it, your CVD resets for each period, whether it is fixed or automatically stepped. Consequently, any trend from the preceding period must re-establish itself in the next.
█ NOTES
Know your volume
Traders using volume information should understand the volume data they are using: where it originates and what transactions it includes, as this can vary with instruments, sectors, exchanges, timeframes, and between historical and realtime bars. The information used to build a chart's bars and display volume comes from data providers (exchanges, brokers, etc.) who often maintain distinct feeds for intraday and end-of-day (EOD) timeframes. How volume data is assembled for the two feeds depends on how instruments are traded in that sector and/or the volume reporting policy for each feed. Instruments from crypto and forex markets, for example, will often display similar volume on both feeds. Stocks will often display variations because block trades or other types of trades may not be included in their intraday volume data. Futures will also typically display variations.
Note that as intraday vs EOD variations exist for historical bars on some instruments, differences may also exist between the realtime feeds used on intraday vs 1D or greater timeframes for those same assets. Realtime reporting rules will often be different from historical feed reporting rules, so variations between realtime feeds will often be different from the variations between historical feeds for the same instrument. The Volume X-ray indicator can help you analyze differences between intraday and EOD volumes for the instruments you trade.
If every unit of volume is both bought by a buyer and sold by a seller, how can volume delta make sense?
Traders who do not understand the mechanics of matching engines (the exchange software that matches orders from buyers and sellers) sometimes argue that the concept of volume delta is flawed, as every unit of volume is both bought and sold. While they are rigorously correct in stating that every unit of volume is both bought and sold, they overlook the fact that information can be mined by analyzing variations in the price of successive ticks, or in our case, intrabars.
Our calculations model the situation where, in fully automated order handling, market orders are generally matched to limit orders sitting in the order book. Buy market orders are matched to quotes at the ask level and sell market orders are matched to quotes at the bid level. As explained earlier, we use the same logic when comparing intrabar prices. While using intrabar analysis does not produce results as precise as when individual transactions — or ticks — are analyzed, results are much more precise than those of methods using only chart prices.
Not only does the concept underlying volume delta make sense, it provides a window on an oft-overlooked variable which, with price and time, is the only basic information representing market activity. Furthermore, because the calculation of volume delta also uses price and time variations, one could conceivably surmise that it can provide a more complete model than ones using price and time only. Whether or not volume delta can be useful in your trading practice, as usual, is for you to decide, as each trader's methodology is different.
For Pine Script™ coders
As our latest Polarity Divergences publication, this script uses the recently released request.security_lower_tf() Pine Script™ function discussed in this blog post . It works differently from the usual request.security() in that it can only be used at LTFs, and it returns an array containing one value per intrabar. This makes it much easier for programmers to access intrabar information.
Look first. Then leap.
[Sextan] M-Oscillator BacktestLevel: 1
NOTE: This is a request by @scantor516 to backtest M-Oscillator by Mango2Juice with my Sextan framework. I ONLY take 5 minutes to perform it and how much time would you cost for this work?
Courtesy of Mango2Juice for M-Oscillator script.
You can backtest many of my indicators in minutes now! Of course,you can define your own indicator in the highlighted area in compliance with the uniform format, which guarantee when you use "Indicator on Indicator" function, it would not produce any error.
Background
Backtesting of technical indicators and strategies is the most common way to understand a quantitative strategy. However, the complicated configuration and adaptation work of backtesting many quantitative tools makes many traders who do not understand the code daunted. Moreover, although I have written a lot of strategies, I am still not very satisfied with the backtest configuration and writing efficiency. Therefore, I have been thinking about how to build a backtesting framework that can quickly and easily evaluate the backtesting performance of any indicator with a "long/short entry" indicator, that is, a "simple backtesting tool for dummies". The performance requirements should be stable, and the operation should be simple and convenient. It is best to "copy", "paste", and "a few mouse clicks" to complete the quick backtest and evaluation of a new indicator.
Luckily, I recently realized that TradingView provides an "Indicator on Indicator" feature, which is the perfect foundation for doing "hot swap" backtesting. My basic idea is to use a two-layer design. The first layer is the technical indicator signal source that needs to be embedded, which is only used to provide buy and sell signals of custom strategies; the second layer is the trading system, which is used to receive the output signals of the first layer, and filter the signals according to the agreed specifications. , Take Profit, Stop Loss, draw buy and sell signals and cost lines, define and send custom buy and sell alert messages to mobile phones, social software or trading interfaces. In general, this two-layer design is a flexible combination of "death and alive", which can meet the needs of most traders to quickly evaluate the performance of a certain technical indicator. The first layer here is flexible. Users can insert their own strategy codes according to my template, and they can draw buy and sell signals and output them to the second layer. The second layer is fixed, and the overall framework is solidified to ensure the stability and unity of the trading system. It is convenient to compare different or similar strategies under the same conditions. Finally, all trading signals are drawn on the chart, and the output strategy returns. test report.
The main function:
The first layer: "{Sextan} Your Indicator Source", the script provides a template for personalized strategy input, and the signal and definition interfaces ensure full compatibility with the second layer. Backtesting is performed stably in the backtesting framework of the layer. The first layer of this script is also relatively simple: enter your script in the highlighted custom script area, and after ensuring the final buy and sell signals long = bool condition, short = bool condition, the design of the first layer is considered complete. Input it into the PINE script editor of TradingView, save it and add it to the chart, you can see the pulse sequence in yellow (buy) and purple (sell) on the sub-picture, corresponding to the main picture, you can subjectively judge that the quality of the trading point of the strategy is good Bad.
The second layer: "{Sextan} PINEv4 Sextans Backtest Framework". This script is the standardized trading system strategy execution and alarm, used to generate the final report of the strategy backtest and some key indicators that I have customized that I find useful, such as: winning rate , Odds, Winning Surface, Kelly Ratio, Take Profit and Stop Loss Thresholds, Trading Frequency, etc. are evaluated according to the Kelly formula. To use the second layer, first load it into the TrainingView chart, no markers will appear on the chart, since you have not specified any strategy source signals, click on the gear-shaped setting next to the "{Sextan} PINEv4 Sextans BTFW" header button, you can open the backtest settings, the first item is to select your custom strategy source. Because we have added the strategy source to the chart in the previous step, you can easily find an option "{Sextan} Your Indicator Source: Signal" at the bottom of the list, this is the strategy source input we need, select and confirm , you can see various markers on the main graph, and quickly generate a backtesting profit graph and a list of backtesting reports. You can generate files and download the backtesting reports locally. You can also click the gear on the backtest chart interface to customize some conditions of the backtest, including: initial capital amount, currency type, percentage of each order placed, amount of pyramid additions, commission fees, slippage, etc. configuration. Note: The configuration in the interface dialog overrides the same configuration implemented by the code in the backtest script.
How to output charts:
The first layer: "{Sextan} Your Indicator Source", the output of this script is the pulse value of yellow and purple, yellow +1 means buy, purple -1 means sell.
The second layer: PINEv4 Sextans Backtest Framework". The output of this script is a bit complicated. After all, it is the entire trading system with a lot of information:
1. Blue and red arrows. The blue upward arrow indicates long position, the red downward arrow indicates short position, and the horizontal bar at the end of the purple arrow indicates take profit or stop loss exit.
2. Red and green lines. This is the holding cost line of the strategy, green represents the cost of holding a long position, and red represents the cost of holding a short position. The cost line is a continuous solid line and the price action is relatively close.
3. Green and yellow long take profit and stop loss area and green and yellow long take profit and stop loss fork. Once a long position is held, there is a conditional order for take profit and stop loss. The green horizontal line is the long take profit ratio line, and the yellow is the long stop loss ratio line; the green cross indicates the long take profit price, and the yellow cross indicates the long position. Stop loss price. It's worth noting that the prongs and wires don't necessarily go together. Because of the optimization of the algorithm, for a strong market, the take profit will occur after breaking the take profit line, and the profit will not be taken until the price falls.
4. The purple and red short take profit and stop loss area and the purple red short stop loss fork. Once a short position is held, there will be a take profit and stop loss conditional order, the red is the short take profit ratio line, and the purple is the short stop loss ratio line; the red cross indicates the short take profit price, and the purple cross indicates the short stop loss price.
5. In addition to the above signs, there are also text and numbers indicating the profit and loss values of long and short positions. "L" means long; "S" means short; "XL" means close long; "XS" means close short.
TradingView Strategy Tester Panel:
The overview graph is an intuitive graph that plots the blue (gain) and red (loss) curves of all backtest periods together, and notes: the absolute value and percentage of net profit, the number of all closed positions, the winning percentage, the profit factor, The maximum trading loss, the absolute value and ratio of the average trading profit and loss, and the average number of K-lines held in all trades.
Another is the performance summary. This is to display all long and short statistical indicators of backtesting in the form of a list, such as: net profit, gross profit, Sharpe ratio, maximum position, commission, times of profit and loss, etc.
Finally, the transaction list is a table indexed by the transaction serial number, showing the signal direction, date and time, price, profit and loss, accumulated profit and loss, maximum transaction profit, transaction loss and other values.
Remarks
Finally, I will explain that this is just the beginning of this model. I will continue to optimize the trading system of the second layer. Various optimization feedback and suggestions are welcome. For valuable feedback, I am willing to provide some L4/L5 technical indicators as rewards for free subscription rights.
Volume X-ray [LucF]█ OVERVIEW
This tool analyzes the relative size of volume reported on intraday vs EOD (end of day) data feeds on historical bars. If you use volume data to make trading decisions, it can help you improve your understanding of its nature and quality, which is especially important if you trade on intraday timeframes.
I often mention, when discussing volume analysis, how it's important for traders to understand the volume data they are using: where it originates, what it includes and does not include. By helping you spot sizeable differences between volume reported on intraday and EOD data feeds for any given instrument, "Volume X-ray" can point you to instruments where you might want to research the causes of the difference.
█ CONCEPTS
The information used to build a chart's historical bars originates from data providers (exchanges, brokers, etc.) who often maintain distinct historical feeds for intraday and EOD timeframes. How volume data is assembled for intraday and EOD feeds varies with instruments, brokers and exchanges. Variations between the two feeds — or their absence — can be due to how instruments are traded in a particular sector and/or the volume reporting policy for the feeds you are using. Instruments from crypto and forex markets, for example, will often display similar volume on both feeds. Stocks will often display variations because block trades or other types of trades may not be included in their intraday volume data. Futures will also typically display variations. It is even possible that volume from different feeds may not be of the same nature, as you can get trade volume (market volume) on one feed and tick volume (transaction counts) on another. You will sometimes be able to find the details of what different feeds contain from the technical information provided by exchanges/brokers on their feeds. This is an example for the NASDAQ feeds . Once you determine which feeds you are using, you can look for the reporting specs for that feed. This is all research you will need to do on your own; "Volume X-ray" will not help you with that part.
You may elect to forego the deep dive in feed information and simply rely on the figure the indicator will calculate for the instruments you trade. One simple — and unproven — way to interpret "Volume X-ray" values is to infer that instruments with larger percentages of intraday/EOD volume ratios are more "democratic" because at intraday timeframes, you are seeing a greater proportion of the actual traded volume for the instrument. This could conceivably lead one to conclude that such volume data is more reliable than on an instrument where intraday volume accounts for only 3% of EOD volume, let's say.
Note that as intraday vs EOD variations exist for historical bars on some instruments, there will typically also be differences between the realtime feeds used on intraday vs 1D or greater timeframes for those same assets. Realtime reporting rules will often be different from historical feed reporting rules, so variations between realtime feeds will often be different from the variations between historical feeds for the same instrument. A deep dive in reporting rules will quickly reveal what a jungle they are for some instruments, yet it is the only way to really understand the volume information our charts display.
█ HOW TO USE IT
The script is very simple and has no inputs. Just add it to 1D charts and it will calculate the proportion of volume reported on the intraday feed over the EOD volume. The plots show the daily values for both volumes: the teal area is the EOD volume, the orange line is the intraday volume. A value representing the average, cumulative intraday/EOD volume percentage for the chart is displayed in the upper-right corner. Its background color changes with the percentage, with brightness levels proportional to the percentage for both the bull color (% >= 50) or the bear color (% < 50). When abnormal conditions are detected, such as missing volume of one kind or the other, a yellow background is used.
Daily and cumulative values are displayed in indicator values and the Data Window.
The indicator loads in a pane, but you can also use it in overlay mode by moving it on the chart with "Move to" in the script's "More" menu, and disabling the plot display from the "Settings/Style" tab.
█ LIMITATIONS
• The script will not run on timeframes >1D because it cannot produce useful values on them.
• The calculation of the cumulative average will vary on different intraday timeframes because of the varying number of days covered by the dataset.
Variations can also occur because of irregularities in reported volume data. That is the reason I recommend using it on 1D charts.
• The script only calculates on historical bars because in real time there is no distinction between intraday and EOD feeds.
• You will see plenty of special cases if you use the indicator on a variety of instruments:
• Some instruments have no intraday volume, while on others it's the opposite.
• Missing information will sometimes appear here and there on datasets.
• Some instruments have higher intraday than EOD volume.
Please do not ask me the reasons for these anomalies; it's your responsibility to find them. I supply a tool that will spot the anomalies for you — nothing more.
█ FOR PINE CODERS
• This script uses a little-known feature of request.security() , which allows us to specify `"1440"` for the `timeframe` argument.
When you do, data from the 1min intrabars of the historical intraday feed is aggregated over one day, as opposed to the usual EOD feed used with `"D"`.
• I use gaps on my request.security() calls. This is useful because at intraday timeframes I can cumulate non- na values only.
• I use fixnan() on some values. For those who don't know about it yet, it eliminates na values from a series, just like not using gaps will do in a request.security() call.
• I like how the new switch structure makes for more readable code than equivalent if structures.
• I wrote my script using the revised recommendations in the Style Guide from the Pine v5 User Manual.
• I use the new runtime.error() to throw an error when the script user tries to use a timeframe >1D.
Why? Because then, my request.security() calls would be returning values from the last 1D intrabar of the dilation of the, let's say, 1W chart bar.
This of course would be of no use whatsoever — and misleading. I encourage all Pine coders fetching HTF data to protect their script users in the same way.
As tool builders, it is our responsibility to shield unsuspecting users of our scripts from contexts where our calcs produce invalid results.
• While we're on the subject of accessing intrabar timeframes, I will add this to the intention of coders falling victim to what appears to be
a new misconception where the mere fact of using intrabar timeframes with request.security() is believed to provide some sort of edge.
This is a fallacy unless you are sending down functions specifically designed to mine values from request.security() 's intrabar context.
These coders do not seem to realize that:
• They are only retrieving information from the last intrabar of the chart bar.
• The already flawed behavior of their scripts on historical bars will not improve on realtime bars. It will actually worsen because in real time,
intrabars are not yet ordered sequentially as they are on historical bars.
• Alerts or strategy orders using intrabar information acquired through request.security() will be using flawed logic and data most of the time.
The situation reminds me of the mania where using Heikin-Ashi charts to backtest was all the rage because it produced magnificent — and flawed — results.
Trading is difficult enough when doing the right things; I hate to see traders infected by lethal beliefs.
Strive to sharpen your "herd immunity", as Lionel Shriver calls it. She also writes: "Be leery of orthodoxy. Hold back from shared cultural enthusiasms."
Be your own trader.
█ THANKS
This indicator would not exist without the invaluable insights from Tim, a member of the Pine team. Thanks Tim!
Impact Zones - Skylyne InvestingWhat is the Impact Zone system:
The creation of Impact Zones started with our love for trading the Bond Market. Impact Zones were originally specifically tailored for the Bond market and now have been mastered to capture most of the Asset Classes out in the market today (Please look at Impact Zone Settings section for asset classes covered by this script). The Impact Zone system is a zone break (or market level break) following system with specific take profit points already established for you on the open of the market day (depending on your asset timing will vary).
*This script was designed for Intraday Trading, Long term or Swing Trading is not recommended with this system
The script will create buy and sell signals on the break of the Impact Zones when specific criteria is met along with the break of the zone. You do not have to use only our signals provided, you can also create your own trading rules based on our script.
Items to highlight:
Skylyne Upper Zone: Green Zone
Skylyne Middle: Yellow Line
Skylyne Lower Zone: Red Zone
Skylyne Take Profit Lines: Purple Lines
Skylyne Average: Orange Line (dynamic support/resistance)
Skylyne Overnight Session: Dark Blue (No Trade Zones)
Skylyne Signals: Buy / Sell
You can think of the Upper Zone as a bull zone and Lower zone as a bear zone, when price enters these zones we want to start watching price action to determine direction the market will take on the break or specified zone, whether it be a break and reversal or a break and run. This can be confirmed with either our signals (buy & sell) or the use of the dynamic support and resistance line (Skylyne Average).
Our script is written to capture market zones and place then on your screen with ease, we also have programmed in specific take profits and stop loss levels we have found the market respects on the intraday trading based on the Impact Zone captured.
The Impact Zones and Take Profit Levels change at Market open everyday. The levels provided will stay on your chart until the next Market open where the Impact Zones and Levels will change to accommodate that trading Day.
We recommend only using that trading days levels, however; using past levels can help trades depending on the case
The three Trades we want to highlight are:
1. Break of Impact Zones
a. This trade is taken when a break of the impact zone happens either in the positive or negative direction and traded to the next zone or take profit line (stop losses can be set with zones or the dynamic skylyne average crossovers)
2. Break of Skylyne Average
a. This trade is taken when price action confirms a bullish or bearish bias on the break of the average line (we would close this trade on the reverse break of the Skylyne Average using the zones as targets)
3. Break of the Skylyne Mid:
a. This trade is taken when a break of the Skylyne Mid level occurs and we use the upper and lower bounds of the Impact Zones as take profit and stop losses
Impact Zone Settings:
*Trading Category and Overnight Category must match the Asset Class being viewed on chart for accurate signals
1. Trading Category
a. Bonds
b. Corn/Wheat
c. Stocks
d. Index Futures
e. Euro/Dollar
f. Gold/Silver
2. Overnight Category
a. Bonds
b. Corn/Wheat
c. Stocks
d. Index Futures
e. Euro/Dollar
f. Gold/Silver
3. Chart Aggregation Limit (Default Value is 25 minutes)
Impact Zone Overnight Trading:
Impact Zone Overnight sessions are highlighted in a dark blue color and we use these highlighted time sessions as a NO TRADE session. Our system was built to be traded during normal market trading hours and overnight sessions tend to be less predictive in terms of direction and or zone reliance. If you choose to trade overnight sessions with Impact Zones, make sure you make a very in depth trading plan and stick to the rules set for yourself.
Impact Zone Signals:
1. Signals for buy or sell of the asset class happen on breaks of the Impact Zones, and when specific criteria are met that we determined necessary to evaluate the overall trend of the market
2. Not every break of the Impact Zones will trigger a signal
3. No signal will be generated during overnight sessions, we recommend studying overnight sessions before beginning to create your own overnight trading session plans based on Impact Zones
4. When a signal is generated you will use the next take profit line (purple line) in the direction of your trade you are in. Other trading signals were discussed above
5. If while you are in a trade and the skylyne average (orange line) is broke in the opposite direction of your trade you will take this as a dynamic stop, and in some cases a dynamic take profit
Impact Zone Charting Timeframes:
1. Recommendation of using the 1 minute chart aggregation bars to maximize profits and limit losses
2. The script has a default charting aggregation limit of 25 minutes, adjustments to the input (in the settings) to increase the aggregation limit need to be made in order to use higher than 25 minute timeframes
Charting Example:
First note is to notice how our publish example uses the 1-minute timeframe aggregation, this is because our script was written to maximize profit on the 1 minute time frame. The script can be used on any time frame, however; make sure that you increase the aggregation limit input when using timeframes above 25 minutes.
From the chart included in the script post, you can notice that buy and sell signals happen only when specified criteria is met, and not every time there is a crossover of the Impact Zones there is a signal. You do not only have to trade the buy and sell signals that our system provides, however; our team believes that these signals are one of the best ways to trade the Impact Zone script. If you deviate from only using signals provided and choose to use the Impact Zones differently, we recommend using the next level, or zone, in the direction of your trade as your take profit (As described in trade we want to highlight section)
Super Cipher BThis is the first release of Super Cipher B. The script will get regular updates and includes a user manual.
This is the first release of the script which is already powerful. The script has been designed to work as a binance futures trading bot.
I only recommend using it as it is now on coins that are in a long term bullish market.
I am not responsible for possible losses using this script as no script in the world can 100% guarantee to never take any losses.
The script is a modified version with new strategies and functionality. The original script was published for free by VumanChu, this script is based on the original code of that script. This is a version of the script used for Binance Futures botting and will provide buy Dots which are more failsafe than the original green divergence dot in the VumanChu script.
All info on how to set up the script for botting is inside the user manual: The user manual also includes my current profits on 3commas.
Weis pip zigzag jayyWhat you see here is the Weis pip zigzag wave plotted directly on the price chart. This script is the companion to the Weis pip wave ( ) which is plotted in the lower panel of the displayed chart and can be used as an alternate way of plotting the same results. The Weis pip zigzag wave shows how far in terms of price a Weis wave has traveled through the duration of a Weis wave. The Weis pip zigzag wave is used in combination with the Weis cumulative volume wave. The two waves must be set to the same "wave size".
To use this script you must set the wave size. Using the traditional Weis method simply enter the desired wave size in the box "Select Weis Wave Size" In this example, it is set to 5. Each wave for each security and each timeframe requires its own wave size. Although not the traditional method a more automatic way to set wave size would be to use ATR. This is not the true Weis method but it does give you similar waves and, importantly, without the hassle described above. Once the Weis wave size is set then the pip wave will be shown.
I have put a pip zigzag of a 5 point Weis wave on the bar chart - that is a different script. I have added it to allow your eye to see what a Weis wave looks like. You will notice that the wave is not in straight lines connecting wave tops to bottoms this is a function of the limitations of Pinescript version 1. This script would need to be in version 4 to allow straight lines. There are too many calculations within this script to allow conversion to Pinescript version 4 or even Version 3. I am in the process of rewriting this script to reduce the number of calculations and streamline the algorithm.
The numbers plotted on the chart are calculated to be relative numbers. The script is limited to showing only three numbers vertically. Only the highest three values of a number are shown. For example, if the highest recent pip value is 12,345 only the first 3 numerals would be displayed ie 123. But suppose there is a recent value of 691. It would not be helpful to display 691 if the other wave size is shown as 123. To give the appropriate relative value the script will show a value of 7 instead of 691. This informs you of the relative magnitude of the values. This is done automatically within the script. There is likely no need to manually override the automatically calculated value. I will create a video that demonstrates the manual override method.
What is a Weis wave? David Weis has been recognized as a Wyckoff method analyst he has written two books one of which, Trades About to Happen, describes the evolution of the now popular Weis wave. The method employed by Weis is to identify waves of price action and to compare the strength of the waves on characteristics of wave strength. Chief among the characteristics of strength is the cumulative volume of the wave. There are other markers that Weis uses as well for example how the actual price difference between the start of the Weis wave from start to finish. Weis also uses time, particularly when using a Renko chart. Weis specifically uses candle or bar closes to define all wave action ie a line chart.
David Weis did a futures io video which is a popular source of information about his method.
This is the identical script with the identical settings but without the offending links. If you want to see the pip Weis method in practice then search Weis pip wave. If you want to see Weis chart in pdf then message me and I will give a link or the Weis pdf. Why would you want to see the Weis chart for May 27, 2020? Merely to confirm the veracity of my algorithm. You could compare my Weis chart here () from the same period to the David Weis chart from May 27. Both waves are for the ES!1 4 hour chart and both for a wave size of 5.
TA Basics: further "Steps" with our Moving AverageSo far in this series of posts, we have worked thru creating a basic zero-lag moving average, then moved forward all the way to coding a "Fibonacci" Weighted Moving Average.
in this post we take a look at a technique that can help traders minimize noise in the underlying data and get better insight on the changes that are happening in the data series represented by the moving average. we'll look at adding "stepping" to our Fibonacci Moving Average as an example. we introduce the Stepping Fibonacci Moving Average , or Step_FiMA
note that you can use the same technique with any plot you may have. feel free to copy or leverage the relevant parts of the script - the script is commented to make this easier.
How is this useful?
==================
with "stepping", you get your indicator to "round" the outcome into pre-specified bands or ranges. this works very similar to how, for example, range or Renko charts work. you can easily see the difference in the chart above once we look at a non-stepped and a stepping moving average of the same length side-by-side
the more granular your timeframe is, you will see the effect of the stepping clearer - here's how the same chart looks when we go into the 1-hr aggregation
Notes about this script
====================
there are couple of pieces i wanted to highlight in the script if you plan to use some of it :
1 - the step(x) function is meant to try to automatically pick the best "suitable" step size based on the range of the underlying series (for example, the closing price). these ranges i included here in the code are just my own "best choices" - you are totally welcome to adjust these ranges and the resulting step size to your own preference
2 - we applied the stepping as a user-choice. user can choose a manual entry, or "0" to get the code to automatically pick the step size, or enter -1 (or actually any value below zero) to cancel the stepping option altogether - this gives us some flexibility on how to use the stepping in an indicator
3 - very important (and somehow confusing): on the "rounding" approach:
the magic math formula that actually creates the stepping is this one
result = round(input / step) * step
now, this tells the script to "round" the result up or down (the basic rounding) -- so for example, a price of 17 with a step of 5 would be rounded (down) to 15, where as a price of 18 would be rounded "up" to 20 -- this is not the way some of us would expect or want, cause the price never reached 20 and they would want an 18 to still be rounded to 15 - and the stepping line not to show 20 *until* the price actually hits or exceeds 20 -- in that case, you would need to replace the function "round" with the function "floor" --
so the new formula becomes: floor(input / step) * step
-- in an ideal world, we can make this rounding choice a user-option in the settings -- maybe in an improved version
4 - we kept the smoothing option, and it takes place before the stepping is applied - we continue to use that smoothing to further minimize the level changes in the FiMA line.
I hope you find this script useful in your journey with technical analysis and DIY scripting, and good luck in your trading.