XAMD/AMDX ICT 01 [TradingFinder] SMC Quarterly Theory Cycles🔵 Introduction
The XAMD/AMDX strategy, combined with the Quarterly Theory, forms the foundation of a powerful market structure analysis. This indicator builds upon the principles of the Power of 3 strategy introduced by ICT, enhancing its application by incorporating an additional phase.
By extending the logic of Power of 3, the XAMD/AMDX tool provides a more detailed and comprehensive view of daily market behavior, offering traders greater precision in identifying key movements and opportunities
This approach divides the trading day into four distinct phases : Accumulation (19:00 - 01:00 EST), Manipulation (01:00 - 07:00 EST), Distribution (07:00 - 13:00 EST), and Continuation or Reversal (13:00 - 19:00 EST), collectively known as AMDX.
Each phase reflects a specific market behavior, providing a structured lens to interpret price action. Building on the fractal nature of time in financial markets, the Quarterly Theory introduces the Four Quarters Method, where a currency pair’s price range is divided into quarters.
These divisions, known as quarter points, highlight critical levels for analyzing and predicting market dynamics. Together, these principles allow traders to align their strategies with institutional trading patterns, offering deeper insights into market trends
🔵 How to Use
The AMDX framework provides a structured approach to understanding market behavior throughout the trading day. Each phase has its own characteristics and trading opportunities, allowing traders to align their strategies effectively. To get the most out of this tool, understanding the dynamics of each phase is essential.
🟣 Accumulation
During the Accumulation phase (19:00 - 01:00 EST), the market is typically quiet, with price movements confined to a narrow range. This phase is where institutional players accumulate their positions, setting the stage for future price movements.
Traders should use this time to study price patterns and prepare for the next phases. It’s a great opportunity to mark key support and resistance zones and set alerts for potential breakouts, as the low volatility makes immediate trading less attractive.
🟣 Manipulation
The Manipulation phase (01:00 - 07:00 EST) is often marked by sharp and deceptive price movements. Institutions create false breakouts to trigger stop-losses and trap retail traders into the wrong direction. Traders should remain cautious during this phase, focusing on identifying the areas of liquidity where these traps occur.
Watching for price reversals after these false moves can provide excellent entry opportunities, but patience and confirmation are crucial to avoid getting caught in the manipulation.
🟣 Distribution
The Distribution phase (07:00 - 13:00 EST) is where the day’s dominant trend typically emerges. Institutions execute large trades, resulting in significant price movements. This phase is ideal for trading with the trend, as the market provides clearer directional signals.
Traders should focus on identifying breakouts or strong momentum in the direction of the trend established during this period. This phase is also where traders can capitalize on setups identified earlier, aligning their entries with the market’s broader sentiment.
🟣 Continuation or Reversal
Finally, the Continuation or Reversal phase (13:00 - 19:00 EST) offers a critical juncture to assess the market’s direction. This phase can either reinforce the established trend or signal a reversal as institutions adjust their positions.
Traders should observe price behavior closely during this time, looking for patterns that confirm whether the trend is likely to continue or reverse. This phase is particularly useful for adjusting open positions or initiating new trades based on emerging signals.
🔵 Settings
Show or Hide Phases.
Adjust the session times for each phase :
Accumulation: 19:00-01:00 EST
Manipulation: 01:00-07:00 EST
Distribution: 07:00-13:00 EST
Continuation or Reversal: 13:00-19:00 EST
Modify Visualization : Customize how the indicator looks by changing settings like colors and transparency.
🔵 Conclusion
AMDX provides traders with a practical method to analyze daily market behavior by dividing the trading day into four key phases: Accumulation, Manipulation, Distribution, and Continuation or Reversal. Each phase highlights specific market dynamics, offering insights into how institutional activity shapes price movements.
From the quiet buildup in the Accumulation phase to the decisive trends of the Distribution phase, and the critical transitions in Continuation or Reversal, this approach equips traders with the tools to anticipate movements and make informed decisions.
By recognizing the significance of each phase, traders can avoid common traps during Manipulation, capitalize on clear trends during Distribution, and adapt to changes in the final phase of the day.
The structured visualization of market phases simplifies decision-making for traders of all levels. By incorporating these principles into your trading strategy, you can enhance your ability to align with market trends, optimize entry and exit points, and achieve more consistent results in your trading journey.
Manipulation
Power Of 3 ICT 01 [TradingFinder] AMD ICT & SMC Accumulations🔵 Introduction
The ICT Power of 3 (PO3) strategy, developed by Michael J. Huddleston, known as the Inner Circle Trader, is a structured approach to analyzing daily market activity. This strategy divides the trading day into three distinct phases: Accumulation, Manipulation, and Distribution.
Each phase represents a unique market behavior influenced by institutional traders, offering a clear framework for retail traders to align their strategies with market movements.
Accumulation (19:00 - 01:00 EST) takes place during low-volatility hours, as institutional traders accumulate orders. Manipulation (01:00 - 07:00 EST) involves false breakouts and liquidity traps designed to mislead retail traders. Finally, Distribution (07:00 - 13:00 EST) represents the active phase where significant market movements occur as institutions distribute their positions in line with the broader trend.
This indicator is built upon the Power of 3 principles to provide traders with a practical and visual tool for identifying these key phases. By using clear color coding and precise time zones, the indicator highlights critical price levels, such as highs and lows, helping traders to better understand market dynamics and make more informed trading decisions.
Incorporating the ICT AMD setup into daily analysis enables traders to anticipate market behavior, spot high-probability trade setups, and gain deeper insights into institutional trading strategies. With its focus on time-based price action, this indicator simplifies complex market structures, offering an effective tool for traders of all levels.
🔵 How to Use
The ICT Power of 3 (PO3) indicator is designed to help traders analyze daily market movements by visually identifying the three key phases: Accumulation, Manipulation, and Distribution.
Here's how traders can effectively use the indicator :
🟣 Accumulation Phase (19:00 - 01:00 EST)
Purpose : Identify the range-bound activity where institutional players accumulate orders.
Trading Insight : Avoid placing trades during this phase, as price movements are typically limited. Instead, use this time to prepare for the potential direction of the market in the next phases.
🟣 Manipulation Phase (01:00 - 07:00 EST)
Purpose : Spot false breakouts and liquidity traps that mislead retail traders.
Trading Insight : Observe the market for price spikes beyond key support or resistance levels. These moves often reverse quickly, offering high-probability entry points in the opposite direction of the initial breakout.
🟣 Distribution Phase (07:00 - 13:00 EST)
Purpose : Detect the main price movement of the day, driven by institutional distribution.
Trading Insight : Enter trades in the direction of the trend established during this phase. Look for confirmations such as breakouts or strong directional moves that align with broader market sentiment
🔵 Settings
Show or Hide Phases :mDecide whether to display Accumulation, Manipulation, or Distribution.
Adjust the session times for each phase :
Accumulation: 1900-0100 EST
Manipulation: 0100-0700 EST
Distribution: 0700-1300 EST
Modify Visualization : Customize how the indicator looks by changing settings like colors and transparency.
🔵 Conclusion
The ICT Power of 3 (PO3) indicator is a powerful tool for traders seeking to understand and leverage market structure based on time and price dynamics. By visually highlighting the three key phases—Accumulation, Manipulation, and Distribution—this indicator simplifies the complex movements of institutional trading strategies.
With its customizable settings and clear representation of market behavior, the indicator is suitable for traders at all levels, helping them anticipate market trends and make more informed decisions.
Whether you're identifying entry points in the Accumulation phase, navigating false moves during Manipulation, or capitalizing on trends in the Distribution phase, this tool provides valuable insights to enhance your trading performance.
By integrating this indicator into your analysis, you can better align your strategies with institutional movements and improve your overall trading outcomes.
Advanced Pivot Manipulation SuperTrend - Consolidation ZoneHere’s the description translated into English for your TradingView publication:
---
Advanced Pivot Manipulation SuperTrend - Consolidation Zone
Description :
This advanced indicator combines multiple technical tools to provide a comprehensive analysis of trends, key levels, and consolidation zones. Ideal for traders seeking to spot opportunities while avoiding the traps of flat markets, it helps you better understand market dynamics and improve your trading decisions.
Key Features:
1.
Dynamic SuperTrend with Pivot Points:
- An enhanced SuperTrend algorithm based on pivot points for more precise trend tracking.
- Thresholds (Up/Dn) are dynamically adjusted using ATR (Average True Range) for improved volatility adaptation.
2. Consolidation Zones:
- Automatically identifies periods when the market moves within a narrow range (1% by default).
- Consolidation zones are visually highlighted to help avoid risky trades.
3. Dynamic Support and Resistance:
- Automatically calculates support and resistance levels based on a rolling period (configurable).
- These levels serve as key references for potential breakouts or trend reversals.
4. Advanced Detection Tools:
- Includes a volume multiplier and shadow-to-body ratio to signal unusual or potentially manipulated moves (e.g., spoofing).
5. Intuitive Visuals:
- SuperTrend lines are color-coded to indicate bullish (green) or bearish (red) trends.
- Semi-transparent lines mark support and resistance levels, and red backgrounds indicate consolidation zones.
Customizable Parameters:
- Pivot Point Period: Adjust the period for detecting pivot highs and lows.
- ATR Factor and Period: Control the sensitivity of the SuperTrend indicator.
- Lookback Period for S/R: Define the duration for calculating support and resistance levels.
- Volume Multiplier and Shadow/Body Ratio: Configure thresholds for detecting high volumes or anomalies in candlestick patterns.
How to Use:
- Easily identify dominant trends using the SuperTrend.
- Spot consolidation zones to avoid inefficient trades or prepare breakout strategies.
- Use support and resistance levels as reference points for placing orders or adjusting risk management.
Target Audience:
- Intraday and swing traders.
- Anyone looking for a comprehensive and customizable indicator to effectively analyze volatile markets.
---
Notes:
The indicator is fully customizable to suit your needs and strategies. Feel free to experiment with the parameters to maximize its effectiveness according to your trading style.
Keywords: SuperTrend, Support and Resistance, Consolidation, Pivot Points, Trends, ATR, Advanced Trading.
---
This description highlights the indicator’s strengths and is designed to appeal to the TradingView community.
ICT Power Of Three | Flux Charts💎 GENERAL OVERVIEW
Introducing our new ICT Power Of Three Indicator! This indicator is built around the ICT's "Power Of Three" strategy. This strategy makes use of these 3 key smart money concepts : Accumulation, Manipulation and Distribution. Each step is explained in detail within this write-up. For more information about the process, check the "HOW DOES IT WORK" section.
Features of the new ICT Power Of Three Indicator :
Implementation of ICT's Power Of Three Strategy
Different Algorithm Modes
Customizable Execution Settings
Customizable Backtesting Dashboard
Alerts for Buy, Sell, TP & SL Signals
📌 HOW DOES IT WORK ?
The "Power Of Three" comes from these three keywords "Accumulation, Manipulation and Distribution". Here is a brief explanation of each keyword :
Accumulation -> Accumulation phase is when the smart money accumulate their positions in a fixed range. This phase indicates price stability, generally meaning that the price constantly switches between up & down trend between a low and a high pivot point. When the indicator detects an accumulation zone, the Power Of Three strategy begins.
Manipulation -> When the smart money needs to increase their position sizes, they need retail traders' positions for liquidity. So, they manipulate the market into the opposite direction of their intended direction. This will result in retail traders opening positions the way that the smart money intended them to do, creating liquidity. After this step, the real move that the smart money intended begins.
Distribution -> This is when the real intention of the smart money comes into action. With the new liquidity thanks to the manipulation phase, the smart money add their positions towards the opposite direction of the retail mindset. The purpose of this indicator is to detect the accumulation and manipulation phases, and help the trader move towards the same direction as the smart money for their trades.
Detection Methods Of The Indicator :
Accumulation -> The indicator detects accumulation zones as explained step-by-step :
1. Draw two lines from the lowest point and the highest point of the latest X bars.
2. If the (high line - low line) is lower than Average True Range (ATR) * accumulationConstant
3. After the condition is validated, an accumulation zone is detected. The accumulation zone will be invalidated and manipulation phase will begin when the range is broken.
Manipulation -> If the accumulation range is broken, check if the current bar closes / wicks above the (high line + ATR * manipulationConstant) or below the (low line - ATR * manipulationConstant). If the condition is met, the indicator detects a manipulation zone.
Distribution -> The purpose of this indicator is to try to foresee the distribution zone, so instead of a detection, after the manipulation zone is detected the indicator automatically create a "shadow" distribution zone towards the opposite direction of the freshly detected manipulation zone. This shadow distribution zone comes with a take-profit and stop-loss layout, customizable by the trader in the settings.
The X bars, accumulationConstant and manipulationConstant are subject to change with the "Algorithm Mode" setting. Read the "Settings" section for more information.
This indicator follows these steps and inform you step by step by plotting them in your chart.
🚩UNIQUENESS
This indicator is an all-in-one suite for the ICT's Power Of Three concept. It's capable of plotting the strategy, giving signals, a backtesting dashboard and alerts feature. Different and customizable algorithm modes will help the trader fine-tune the indicator for the asset they are currently trading. The backtesting dashboard allows you to see how your settings perform in the current ticker. You can also set up alerts to get informed when the strategy is executable for different tickers.
⚙️SETTINGS
1. General Configuration
Algorithm Mode -> The indicator offers 3 different detection algorithm modes according to your needs. Here is the explanation of each mode.
a) Small Manipulation
This mode has the default bar length for the accumulation detection, but a lower manipulation constant, meaning that slighter imbalances in the price action can be detected as manipulation. This setting can be useful on tickers that have lower liquidity, thus can be manipulated easier.
b) Big Manipulation
This mode has the default bar length for the accumulation detection, but a higher manipulation constant, meaning that heavier imbalances on the price action are required in order to detect manipulation zones. This setting can be useful on tickers that have higher liquidity, thus can be manipulated harder.
c) Short Accumulation
This mode has a ~70% lower bar length requirement for accumulation zone detection, and the default manipulation constant. This setting can be useful on tickers that are highly volatile and do not enter accumulation phases too often.
Breakout Method -> If "Close" is selected, bar close price will be taken into calculation when Accumulation & Manipulation zone invalidation. If "Wick" is selected, a wick will be enough to validate the corresponding zone.
2. TP / SL
TP / SL Method -> If "Fixed" is selected, you can adjust the TP / SL ratios from the settings below. If "Dynamic" is selected, the TP / SL zones will be auto-determined by the algorithm.
Risk -> The risk you're willing to take if "Dynamic" TP / SL Method is selected. Higher risk usually means a better winrate at the cost of losing more if the strategy fails. This setting is has a crucial effect on the performance of the indicator, as different tickers may have different volatility so the indicator may have increased performance when this setting is correctly adjusted.
3. Visuals
Show Zones -> Enables / Disables rendering of Accumulation (yellow) and Manipulation (red) zones.
Edufx's Power of ThreeIndicator Overview
Name: Edufx's Power of Three
Purpose:
To highlight the high and low price ranges of specific hourly candles on a chart.
To visualize these ranges using rectangles.
Features
Visibility Toggle:
Users can enable or disable the visibility of the rectangles highlighting the high and low price ranges of the specified candles.
Customizable Rectangle Length:
Users can adjust the length of the rectangles that extend from the specified candle's high and low prices.
Price Range Tracking:
The high and low prices of the specified candles are tracked and stored.
Rectangle Drawing:
Rectangles are drawn from 5 bars before the end of the specified hour, highlighting the high and low price ranges.
How It Works
Price Range Tracking:
During each specified hour, the high and low prices are updated with the highest and lowest prices observed.
Rectangle Drawing:
At the end of each specified hour, the high and low prices are used to draw rectangles extending 5 bars backward from the end of the hour.
Rectangles are color-coded (red, green, and blue) for easy identification.
Usage
This indicator is useful for traders who want to monitor and react to key price levels at specific times of the day.
The visual rectangles help in identifying potential trading opportunities based on price action relative to these key levels.
Example
If the price moves above the high of the specified candle but fails to close above it, a visual rectangle will highlight this price range.
Similarly, if the price moves below the low of the specified candle but fails to close below it, the rectangle will indicate this range.
This indicator provides visual aids to assist traders in making informed decisions based on the behavior of price at specific key levels.
Liquidity Spike PoolThe “Liquidity Pools” indicator is a tool for market analysts that stands out for its ability to clearly project the intricate zones of manipulation present in financial markets. These crucial territories emerge when supply or demand takes over, resulting in long shadows (wicks) on the chart candles. Imagine these regions as "magnets" for prices, as they represent authentic "liquidity pools" where the flow of money into the market is significantly concentrated. But the value of the indicator goes beyond this simple visualization: these zones, when identified and interpreted correctly, can play a crucial role for traders looking for profitable entry points. They can mutate into important bastions of support or resistance, providing traders with key anchor points to make informed decisions within their trading strategies.
A key aspect to consider is the importance of different time frames in analyzing markets. Larger time frames, such as daily or 4h, tend to host larger and more relevant liquidity zones. Therefore, a successful strategy might involve identifying these areas of manipulation over longer time frames through the use of this indicator, and then applying these findings to shorter time frames. This approach allows you to turn manipulation zones into crucial reference points that merit constant surveillance while making trading decisions on shorter time frames.
The indicator uses color to convey information clearly and effectively:
- Dark blue lines highlight candles with significant upper wick, signaling the possible presence of an important manipulation area in the considered area.
- Dark red lines are reserved for sizable candlesticks with significant upper wick, emphasizing situations that are particularly relevant to traders.
- Dark gray lines highlight candles with significant lower wick, providing a valuable indication of manipulation zones where the bid may have prevailed.
- White lines highlight sizable candlesticks with significant lower wick, clearly indicating situations where demand has been predominant and may have helped form a liquidity pool.
This indicator constitutes an important resource for identifying and clearly displaying candles with significant wicks, allowing traders to distinguish between ordinary market conditions and circumstances particularly relevant to their trading strategies. Thanks to the distinctive colors of the lines, the indicator offers intuitive visual guidance, allowing traders to make more informed decisions while carrying out their analyses.
90 Minute Cycles + MTFCredit goes to LuxAlgo for the inspiration from 'Sessions' which allowed users to analyse specific price movements within a user defined period with tools such as trendline, mean and vwap.
Settings
Sessions
Enable Session: Allows to enable or disable all associated elements with a specific user set session.
Session Time: Opening and closing times of the user set session in the hh:mm format.
Range: Highlights the associated session range on the chart.
Ranges Settings
Range Area colour: Set each range to a specific colour.
Range Label: Shows the session label at the mid-point of the session interval.
Usage
By breaking 24hrs in quarters, starting with an Asian range of 18:00 NY time you can visualise the principles of Accumulation, Manipulation, Distribution and Rebalance. Know as AMD or PO3 (Power of Three), the principle is that the Manipulation phase will break above or below the Accumulation, before moving in an apposing direction and then rebalancing. This only works when there is a higher timeframe PD array or liquidity to support an apposing move.
Further to the daily quarters, each one can then be broken down again into 90min cycles. Again, each represents AMD, allowing the user an opportunity to watch for reversals during the 90min manipulation phase.
Note: Ensure the Asian Cycle always begins at 18:00 NY time.
The example shows that the 90min cycle occurs, followed by an apposing move away in price action
Here is the Daily cycle, highlighting the Manipulation phase.
Enjoy!
ICT Macros [LuxAlgo]The ICT Macros indicator aims to highlight & classify ICT Macros, which are time intervals where algorithmic trading takes place to interact with existing liquidity or to create new liquidity.
🔶 SETTINGS
🔹 Macros
Macro Time options (such as '09:50 AM 10:10'): Enable specific macro display.
Top Line , Mid Line , Bottom Line and Extending Lines options: Controls the lines for the specific macro.
🔹 Macro Classification
Length : A length to detect Market Structure Brakes and classify macro type based on detection.
Swing Area : Swing or Liquidity Area selection, highest/lowest of the wick or the candle bodies.
Accumulation , Manipulation and Expansion color options for the classified macros.
🔹 Others
Macro Texts : Controls both the size and the visibility of the macro text.
Alert Macro Times in Advance (Minutes) : This option will plot a vertical line presenting the start of the next macro time. The line will not appear all the time, but it will be there based on remaining minutes specified in the option.
Daylight Saving Time (DST) : Adjust time appropriate to Daylight Saving Time of the specific region.
🔶 USAGE
A macro is a way to automate a task or procedure which you perform on a regular basis.
In the context of ICT's teachings, a macro is a small program or set of instructions that unfolds within an algorithm, which influences price movements in the market. These macros operate at specific times and can be related to price runs from one level to another or certain market behaviors during specific time intervals. They help traders anticipate market movements and potential setups during specific time intervals.
To trade these effectively, it is important to understand the time of day when certain macros come into play, and it is strongly advised to introduce the concept of liquidity in your analysis.
Macros can be classified into three categories where the Macro classification is calculated based on the Market Structure prior to macro and the Market Structure during the macro duration:
Manipulation Macro
Manipulation macros are characterized by liquidity being swept both on the buyside and sellside.
Expansion Macro
Expansion macros are characterized by liquidity being swept only on the buyside or sellside. Prices within these macros are highly correlated with the overall trend.
Accumulation Macro
Accumulation macros are characterized by an accumulation of liquidity. Prices within these macros tend to range.
The script returns the maximum/minimum price values reached during the macro interval alongside the average between the maximum/minimum and extends them until a new macro starts. These levels can act as supports and resistances.
🔶 DETAILS
All required data for the macro detection and classification is retrieved using 1 minute data sets, this includes candles as well as pivot/swing highs and lows. This approach guarantees the visually presented objects are same (same highs/lows) on higher timeframes as well as the macro classification remain same as it is in 1 min charts.
8 Macros can be displayed by the script (4 are enabled by default):
02:33 AM 03:00 London Macro
04:03 AM 04:30 London Macro
08:50 AM 09:10 New York Macro
09:50 AM 10:10 New York Macro
10:50 AM 11:10 New York Macro
11:50 AM 12:10 New York Launch Macro
13:10 PM 13:40 New York Macro
15:15 PM 15:45 New York Macro
🔶 ALERTS
When an alert is configured, the user will have the ability to be notified in advance of the next Macro time, where the value specified in 'Alert Macro Times in Advance (Minutes)' option indicates how early to be notified.
🔶 LIMITATIONS
The script is supported on 1 min, 3 mins and 5 mins charts.
🔶 RELATED SCRIPTS
ICT Market Protraction (0:00, 7:00, 20:00 NY time highlight)Market protraction, as defined by ICT, is a time-specific reoccurring impulse move in forex markets. It is designed for market manipulation and will go in the opposite direction of the following trend.
My indicator will add a shape above/below the candle if it fits the time criteria.
I recommend to watch: ICT Mentorship Core Content - Month 1 - Impulse Price Swings & Market Protraction on Youtube
Volume Pressure AnalysisVolume Pressure Analysis is a new concept I have been working on designed to show the effort required to move price. An ideal tool for confirming trends or locating reversals early. This indicator can highlight whale action and market manipulation. It calculates volume vs volatility and displays the results as a meter:
Above 0 shows how easy price action is traveling, the bigger these bars the less volume and effort is required to push price. These are indicated with a teal or red arrows and can confirm the beginning or continuation of a trend. This is the natural direction the chart wants to travel at that time.
Below 0 shows how hard price is to move. The bigger these bars the more volume and effort is required to push price. When whales and market makers push price against its will these bars will get bigger.
Yellow arrows signal pressure in that direction and excessive amounts of volume is required to move price. These signals can lead to reversal/ pivot points as price action struggles to continue its trend. These signals can be turned on in settings or use the overlay version of this script to display signals on chart. This is a very powerful tool when used with relative volume.
Benford's Law DeviationThis Study uses Benford's Law , which states that unmanipulated numerical real-life data sets should contain a certain distribution of leading digits. This Mathematical Law may be useful to identify whether there is market-manipulation going on and to which degree. The higher the value the script outputs, the higher the deviation from the expected leading-digit distribution - indicating a possibly higher probability of market manipulation going on. The script fetches the leading digits of the volume and percentage price change and calculates their distribution to compute the deviation from the expected distribution according to Benford's Law.
String Manipulation Framework [PineCoders FAQ]█ OVERVIEW
This script provides string manipulation functions to help Pine coders.
█ FUNCTIONS PROVIDED
f_strLeft(_str, _n)
Function returning the leftmost `_n` characters in `_str`.
f_strRight(_str, _n)
Function returning the rightmost `_n` characters in `_str`.
f_strMid(_str, _from, _to)
Function returning the substring of `_str` from character position `_from` to `_to` inclusively.
f_strLeftOf(_str, _of)
Function returning the sub-string of `_str` to the left of the `_of` separating character.
f_strRightOf(_str, _of)
Function returning the sub-string of `_str` to the right of the `_of` separating character.
f_strCharPos(_str, _chr)
Function returning the position of the first occurrence of `_chr` in `_str`, where the first character position is 0. Returns -1 if the character is not found.
f_strReplace(_src, _pos, _str)
Function that replaces a character at position `_pos` in the `_src` string with the `_str` character or string.
f_tickFormat()
Function returning a format string usable with `tostring()` to round a value to the symbol's tick precision.
f_tostringPad(_val, _fmt)
Function returning a string representation of a numeric `_val` using a special `_fmt` string allowing all strings to be of the same width, to help align columns of values.
`f_tostringPad()`
Using the functions should be straightforward, but `f_tostringPad()` requires more explanations. Its purpose is to help coders produce columns of fixed-width string representations of numbers which can be used to produce columns of numbers that vertically align neatly in labels, something that comes in handy when, for example, you need to center columns, yet still produce numbers of various lengths that nonetheless align.
While the formatting string used with this function resembles the one used in tostring() , it has a few additional characteristics:
• The question mark (" ? ") is used to indicate that padding is needed.
• If negative numbers must be handled by the function, the first character of the formatting string must be a minus sign ("-"),
otherwise the unary minus sign of negative numbers will be stripped out.
• You will produce more predictable results by using "0" rather than "#" in the formatting string.
You can experiment with `f_tostringPad()` formatting strings by changing the one used in the script's inputs and see the results on the chart.
These are some valid examples of formatting strings that can be used with `f_tostringPad()`:
"???0": forces strings to be four units wide, in all-positive "int" format.
"-???0": forces strings to be four units wide, plus room for a unary minus sign in the first position, in "int" format.
"???0.0": forces strings to be four units wide to the left of the point, all-positive, with a decimal point and then a mantissa rounded to a single digit.
"-???0.0?": same as above, but adds a unary minus sign for negative values, and adds a space after the single-digit mantissa.
"?????????0.0": forces the left part of the float to occupy the space of 10 digits, with a decimal point and then a mantissa rounded to a single digit.
█ CHART
The information displayed by this indicator uses the values in the script's Inputs, so you can use them to play around.
The chart shows the following information:
• Column 0 : The numeric input values in a centered column, converted to strings using tostring() without a formatting argument.
• Column 1 : Shows the values formatted using `f_tostringPad()` with the formatting string from the inputs.
• Column 2 : Shows the values formatted using `f_tostringPad()` but with only the part of the formatting string left of the decimal point, if it contains one.
• Column 3 : Shows the values formatted using `f_tostringPad()` but with the part of the formatting string left of the decimal point,
to which is added the right part of the `f_tostringPad()` formatting string, to obtain the precision in ticks of the symbol the chart is on.
• Column 4 : Shows the result of using the other string manipulation functions in the script on the source string supplied in the inputs.
It also demonstrates how to split up a label in two distinct parts so that you can vertically align columns when the leftmost part contains strings with varying lengths.
You will see in our code how we construct this column in two steps.
█ LIMITATIONS
The Pine runtime is optimized for number crunching. Too many string manipulations will take a toll on the performance of your scripts, as can readily be seen with the running time of this script. To minimize the impact of using string manipulation functions in your scripts, consider limiting their calculation to the first or last bar of the dataset when possible. This can be achieved by using the var keyword when declaring variables containing the result of your string manipulations, or by enclosing blocks of code in if blocks using barstate.isfirst or barstate.islast .
█ NOTES
To understand the challenges we face when trying to align strings vertically, it is useful to know that:
• As is the case in many other places in the TadingView UI and other docs, the Pine runtime uses the MS Trebuchet font to display label text.
• Trebuchet uses proportionally-spaced letters (a "W" takes more horizontal space than an "I"), but fixed-space digits (a "1" takes the same horizontal space as a "3").
Digits all use a figure space width, and it is this property that allows us to align numbers vertically.
The fact that letters are proportionally spaced is the reason why we can't vertically align columns using a "legend" + ":" `+ value structure when the "legend" part varies in width.
• The unary minus sign is the width of a punctuation space . We use this property to pad the beginning of numbers
when you use a "-" as the first character of the `f_tostringPad()` formatting string.
Our script was written using the PineCoders Coding Conventions for Pine .
The description was formatted using the techniques explained in the How We Write and Format Script Descriptions PineCoders publication.
█ THANKS
Thanks to LonesomeTheBlue for the `f_strReplace()` function.
Look first. Then leap.
Detect Sequential Trading - Bot DetectorDetect Sequential Trading - Bot Detector.
This tool requires access to volume data .
There are many trading bots out there, that trade 24/7 .
The detector can be used to understand how the bots are configured - to push the market up or down .
Alerts can be set to fire whenever a bot pattern is detected .
They must be configured to run Once per Bar .
It works well with range charts (1R) .
It would work best on 1 second charts or tick charts (currently, TradingView's alert system doesn't work with second charts).
The alternative would be 1 minute charts .
It can be used on higher timeframes but may be less effective.
Cash in/Cash out Report (CICO) - Quiets market noiseThe cash in/cash out report (CICO for short) was built with the intent to quiet the market noise. The blunt way to say it, this indicator quiets the market manipulators voice and helps the retail investor make more money. I believe money is better of in the 99% hands versus the greedy hoarding that is currently going on. There are dozens of companies in the SP500 that have the same tax rate as unborn babies, nada. These hoarders also have machine learning high frequency trading bots that purposely create fear and anxiety in the markets. When all of the major markets move at the exact same time of day on frequent occasions, I see red flags. I recommend looking into Authorized participants in the ETF market to understand how the markets can be manipulated, specifically Creation and Redemption.
Enough of my rant. This indicator is open source. Directions on how to use the indicator can be found within the code. The basic summary is, clear your charts to bare minimums. Make the colors gray on all candles. Then apply this indicator. The indicator will color the "buy" and "sell" signals on the chart. Keep in mind, markets are manipulated to create fear in the retail investors little heart and can change drastically at any second. This indicator will show real time changes in running sum into and out of the market, it is estimated by average prices and not exact.
Once the chart is all greyed out and the indicator is applied you will see an area colored red and green. What this indicator does is takes a running sum of the new money into and out of the market. It takes the average of the high and low price times the volume. If the price is going up the value is positive, going down will be negative. Then the running sum is displayed. The area section is the running sum and the column bars are each value. When a market is steadily increasing in value you will see the large green area grow. When markets shift, values and display will change in color and vector. Full descriptions are available within the script in the comment sections.
I hope this help you make more money. If this helps you grow profits, give it a like!
Happy investing 99%er!