CRT Trades (turtle soup, A-M-D ranges with inside bars)CRT means Candle Range Theory. Every single candle is a range, on every single timeframe. Ranges may be either manipulated - turtle souped or broken - engulfed - closed above/below and retested.
CRT is usually presented as a 3 candle model. However it may consist of more than 3 candles due to inside bars. Inside bar is the candle where high is not higher then previous candle high and low is not lower then previous candle low.
First candle represents accumulation (may consist of more candles - inside bars), second candle represents manipulation (turtle soup) and third candle represents distribution. The abbreviation for that is A-M-D.
In accumulation the range with specific high and low is created. In manipulation (turtle soup) the high or low of the range is manipulated - liquidity taken and price should usually reverse back to the range. In distribution price is reversing back to the opposite side of the range. On higher timeframe it looks like manipulation candle wick is higher/lower than previous range high/low (may consist of 1 or more inside bar candles) but the body must not close above/below previous range high/low. Otherwise it is not manipulation (turtle soup) most likely and price should continue in direction of the candle close. Distribution candle should touch opposite side of range and it is mostly heavy and fast candle.
CRT model can be found on higher timeframe (e.g. 4h) and entries can be found on lower timeframe (e.g. 15m). You always use only lower timeframe on your chart because CRT model on the higher timeframe is shown on the lower one and also you can plan entries on the lower timeframe. You are able to change CRT model higher timeframe in the indicator settings.
There are two types of entries:
simple - wait for manipulation candle to close on higher timeframe (HTF) and then enter on lower timeframe (LTF) above open of the distribution candle on HTF if it is short or on LTF below open of the distribution candle on HTF if it is long. These entries can be done by market order.
advanced - wait for the break of previous range high/low and enter by limit order when price reverses back to the range and retraces to the order block or fair value gap created by the breaker candle.
Stop loss can be placed above/below of the top/bottom created by manipulation candle. First take profit should be placed in 1/2 of the accumulation range and second take profit should be placed at the opposite range of accumulation range.
It is possible to filter only particular accumulation (range) and manipulation (turtle soup) candles depending also on timezone set in the settings. For example on 4h CRT model if you fill input "indices" for section "range" like 1,2 and input "indices" for section "turtle soup" like 3,4 then you are awaiting the range to form during asia session and manipulation during london session if the timezone is somewhere around "UTC+2".
Dotted lines represent turtle soup of previous range and solid lines represent engulfing candle of the breaker candle on lower timeframe. When the engulfing is closed you can look for entries either by market order after closing or by limit order when the price retraces to order block (created by breaker candle) or fair value gap (created by engulfing).
Recommendations for combining lower (entries) and higher (crt model) timeframes:
1D CRT model => 1h entries,
4h CRT model => 15m entries,
1h CRT model => 5m entries,
15m CRT model => 1m entries.
Manipulation
CRT IndicatorCandle Range Trading (CRT) Indicator
The CRT Indicator identifies potential trading opportunities by analyzing specific candlestick patterns. This script is designed to detect both bullish and bearish CRT patterns and provides visual cues directly on your chart.
Features:
Pattern Detection:
Analyzes two consecutive candles to identify the CRT pattern.
Detects both bullish and bearish setups based on the relative positions of the candles.
How It Works:
Bearish CRT Pattern:
The script identifies a bearish CRT when:
The first candle is bullish (closing price is higher than the opening price).
The second candle is bearish (closing price is lower than the opening price).
The second candle’s high exceeds the high of the first candle.
The closing price of the second candle falls within the range of the first candle.
Bullish CRT Pattern:
The script identifies a bullish CRT when:
The first candle is bearish (closing price is lower than the opening price).
The second candle is bullish (closing price is higher than the opening price).
The second candle’s low is below the low of the first candle.
The closing price of the second candle falls within the range of the first candle.
Visual Signals:
A red triangle is plotted above the candles for a bearish CRT pattern.
A green triangle is plotted below the candles for a bullish CRT pattern.
How to Use:
Monitor the chart for the appearance of red and green triangles.
Green triangles suggest potential bullish movements.
Red triangles suggest potential bearish movements.
Use these signals as part of a comprehensive trading strategy and combine with other technical indicators for best results.
Settings:
This indicator operates with default settings for detecting CRT patterns and does not include customizable parameters.
Limitations:
The CRT Indicator is based on two consecutive candles and does not account for broader market trends or other indicators.
Be aware that false signals may occur in volatile or choppy market conditions.
The indicator does not provide entry points, profit targets, or stop loss levels, which should be managed based on individual risk tolerance and strategy.
Note: The CRT Indicator is for informational purposes only and should be used in conjunction with other forms of analysis and proper risk management. Always test any strategy thoroughly before applying it to live trading.
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.
[TTM] HTF Candle Overlay (Power of 3)🌟 Overview 🌟
Introducing the all-new Higher Timeframe Candle Overlay indicator, crafted from the foundational principles of AMD (Accumulation, Manipulation, and Distribution) and PO3 (Power of 3). Elevate your trading strategy with this innovative tool, designed to provide deeper insights into market dynamics.
Explore ICT's resources for detailed insights on leveraging this in your trading strategy.
🌟 Features 🌟
Display up to 20 historical candles from any timeframe higher than the current chart's timeframe.
Auto Timeframe feature dynamically sets the higher timeframe based on the current chart's timeframe. For instance, on a 15-minute chart, you can display 1-hour candles, and on a 1-hour chart, you can display 4-hour candles, eliminating the need to update the timeframe settings manually.
Load multiple instances of the indicator with different timeframes (e.g., 4H and Daily, as shown in the preview image).
Option to Show/Hide Candle open line.
Option to Show/Hide Candle Timeframe.
Option to Show/Hide each candle's time/day.
🌟 Coming Soon 🌟
Fair value gaps highlighted on HTF overlay candles.
Happy Trading!
TheTickMagnet
Crypto Manipulation [ProjeAdam]OVERVIEW
Indicator that detects manipulation candles on the Binance exchange according to open interest, volume, candlestick analyzes and percent changes.
IMPORTANT NOTE: This indicator works in Crypto Binance Exchange and only in Future Parities.
Example ->> BTCUSDT.P -- ETHUSDT.P -- ADAUSDT.P
> Topics in the writing of the crypto manipulation indicator <
Market makers manipulate the crypto market because most people who trade on the stock exchange act with their emotions and are forced to close the transaction at a loss. In these manipulations, many people are liquidated and the money they earn is used as fuel in the market.
We can reduce the psychological impact that the market is trying to have on us with this indicator.
IF we detect manipulation candles in the market, we can control our fragile psychology and close our transactions in profit by trading with market-making formations in these areas.
ALGORITHM
In this indicator, I use 4 different datasets to detect manipulation candles in crypto market.
1- Extremely variable volume data in Spot and Future markets
2- Wicks formed by candles
3-Percentage change of price movement
4-Distance from the average value of people who open and close transactions in Future parity
When there is excessive volatility in price movement, the algorithm in this indicator notices this price volatility and calculates a manipulation value by dividing it by the volatility value in past price movements.
In my Python backtests, I noticed that when manipulation is done in the crypto market, there is extreme volatility in certain values. This is because there are more robots in the crypto exchange than in the Bist exchange and the total transaction volume is less than in other exchanges. We observe these data that change in a short time, the amount of volume created by people being liquidated, and the open positions that are forcibly closed due to this situation, only in Cryptocurrency exchanges.
How does the indicator work?
The manipulation candle does not give us information about the direction of price movement, it is only used as an auxiliary indicator. With the help of this indicator, we can prevent large losses by better determining our risk situation during and after manipulation.
We show our manipulation values as columns. We draw a channel over the values we show and we understand that there is manipulation in the candle of our values above this channel.
The indicator shows the manipulation value in the form of columns. Our manipulation value that goes outside the channel we have determined is colored red, within the channel it is colored yellow, and below the channel it is colored green. Red columns indicate candles that are manipulations.
As we observed in the example above, we observe excessive volume increase, momentum in open interest and wick candles during manipulation times. As these values increase, our manipulation value also increases.
What are the BIST and Crypto Exchanges and What are the differences between them?
The differences between the general structure of BIST Exchange and the general structure of the cryptocurrency exchange are as follows;
1- While trading takes place under goverment control in BIST Exchange, there are no regulations in the Cryptocurrency market yet.
2- Since BIST Exchange is a much larger market than the cryptocurrency exchange, manipulations can be made by very large money owners and large companies, but there is a monopolized situation in crypto.
3- We see instantaneous large changes in volume in the cryptocurrency market during manipulation times. While this situation is not seen effectively in the BIST exchange, volume changes have a great impact on the crypto exchange.
4- Since there are many open source codes in the cryptocurrency exchange and much easier and faster trading is allowed thanks to the robots produced by software, manipulations in the cryptocurrency exchange occur very quickly and in a short time.
5- We can know who opened and closed transactions in which candle in the cryptocurrency market, but we cannot access this data in Borsa Istanbul.
The majority of Borsa Istanbul users do not trade in crypto, and many users who trade in crypto do not know Borsa Istanbul because only TURKISH citizens can open transactions here.
Using two completely different algorithms and publishing two different indicators will be convenient for many users at this stage. The indicators to be used for these two exchanges, which have many different features that I have explained above, should also be different.
So What are the differences between the two algorithms?
1-Crypto manipulation indicator uses liquidation data, we cannot access this data on the Bist exchange.
2-While manipulations in the crypto exchange occur in very short periods of time, BIST generally moves slower than crypto.
3-By using the crypto manipulation indicator open interest data, we can access in detail on which candle the transaction was opened and closed, but we cannot access it on the Bist exchange.
In our example above, when manipulation candles are formed, you see the volumetric change and the change in open interest. The excessive increase in volume and the momentum of open interest data affects our crypto manipulation value.
The greater the volume increase, the greater the manipulation.
Regardless of the open interest direction, the greater the momentum change in value, the more manipulation has been done.
Our BIST manipulation indicator only focuses on the change of candles in the market structure. In other words, it cares about percentage changes and the change within the average. I tried to show in the example above that volume data is not a consistent variable in the BIST stock market when calculating manipulation.
The user types of the two different indicators vary greatly, and both indicators benefit the community by making calculations according to the metrics of their own exchanges. For the reasons I explained above, I thought it would be better to write two indicators for tradingview users that work with different algorithms on two different exchanges.
Example
In our example above, we see a manipulation candle clearing the stops formed, the market maker clearing the orders at the people's stop levels at the bottom to move the price up.
We can quickly control manipulation candles in 5 different parities at the same time by entering our parities in the settings panel.
In our example above, we observe a beautiful manipulation candle. As you can see, if there is an extreme increase in volume, a momentum movement in the open line and a candle with a wick, we should look for manipulation here.
SETTINGS PANEL
We have only two setting in this indicator.
Our multiplier value determines the width of the band value formed above our manipulation value. In the chart above, our multiplier value is 3.2. If we reduce our multiplier value, our manipulation sensitivity will decrease as there will be much more candles on the band.
If you have any ideas what to add to my work to add more sources or make calculations cooler, suggest in DM .
Bist Manipulation [Projeadam]
OVERVIEW | GENEL BAKIŞ
ENG: Indicator that detects manipulation candles according to changing market conditions.
TR: Değişen piyasa koşullarına göre manipülasyon mumlarını tespit eden gösterge.
ENG: IMPORTANT NOTE: This indicator works in BIST Market and only in Future Parities.
Example ->> PETKM1! --SASA1!
TR: ÖNEMLİ NOT: Bu indikatör BİST Piyasasında ve sadece Future Paritelerde Çalışır.
Örnek- >> PETKM1! -- SASA1!
ENG: Market makers manipulate the market because most people who trade on the stock exchange act with their emotions and are forced to close the transaction at a loss.
TR: Piyasada market yapıcı oluşumlar manipülasyon yaparlar çünkü borsada işlem alan insanların birçoğu duygularıyla hareket eder ve zararla işlem kapatılmaya zorlanır.
ENG: If we detect manipulation candles in the market, we can control our fragile psychology and close our transactions in profit by trading with market-making formations in these areas.
TR: Marketde manipülasyon mumlarını tespit edersek kırılgan psikolojimizi kontrol edebilir ve bu alanlardan market yapıcı oluşumlarla beraber işlem alarak işlemlerimizi karda kapatabiliriz.
ALGORITHM | ALGORİTMA
ENG: With the help of this indicator, you can detect manipulation candles in the BIST exchange with the help of the algorithm I created by using volumetric data and wicks created by the price.
When there is excessive volatility in price movement, the algorithm in this indicator notices this price volatility and calculates a manipulation value by dividing it by the volatility value in past price movements.
TR: Bu indikatör yardımıyla hacimsel veriler ve fiyatın oluşturduğu fitillerden yararlanarak oluşturduğum algoritma yardımıyla siz de BİST borsasında manipülasyon mumlarını tespit edebilirsiniz.
Fiyat hareketinde aşırı derece oynaklık olduğunda bu indikatördeki algoritma bu fiyat oynaklığını fark eder ve geçmiş fiyat hareketlerindeki oylanklık degerine bölerek bize bir manipülasyon degeri hesaplar.
How does the indicator work? | Gösterge nasıl çalışır?
ENG: The manipulation candle does not give us information about the direction of price movement, it is only used as an auxiliary indicator.
TR: Manipülasyon mumu bize fiyat hareketinin yönü hakkında bilgi vermez sadece yardımcı bir gösterge olarak kullanılır.
ENG: We show our manipulation values as columns. We draw a channel over the values we show and we understand that there is manipulation in the candle of our values above this channel.
TR: Manipülasyon degerlerimiz kolonlar şeklinde gösteriyoruz. Gösterdiğimiz değerlerimizin üzerine bir kanal çizdiriyoruz ve bu kanalın üzerinde kalan değerlerimizdeki mumda manipülasyon yapıldığını anlıyoruz.
ENG: The indicator shows the manipulation value in the form of columns. Our manipulation value that goes outside the channel we have determined is colored red, within the channel it is colored yellow, and below the channel it is colored green. Red columns indicate candles that are manipulations.
TR: İndikatör manipülasyon degerini kolonlar şeklinde gösteriyor. Bizim belirlediğimiz kanal dışına çıkan manipülasyon degerimiz kırmızı, kanal içerisinde sarı, kanal altında yeşil olarak renklendiriliyor. Kırmızı kolonlar manipülasyon olan mumları göstermektedir.
Example | Örnek
ENG: In our example above, we see a manipulation candle that clears the price gaps, while the market maker clears the orders in the price gaps at the bottom to move the price up.
TR: Yukarıdaki örneğimizde oluşan fiyat boşluklarını temizleyen bir manipülasyon mumu görmekteyiz, alt kısımdaki fiyat boşluklarındaki emirleri temizleyen market maker fiyatı yukarı taşımak için buradaki emirleri temizliyor.
SETTINGS PANEL | AYARLAR PANELİ
ENG: We have only one setting in this indicator.
TR: Bu indikatörde tek ayarımız vardır.
ENG: Our multiplier value determines the width of the band value formed above our manipulation value. In the chart above, our multiplier value is 3.3. If we reduce our multiplier value, our manipulation sensitivity will decrease as there will be much more candles on the band.
TR: Çarpan değerimiz manipülasyon değerimizin üstünde oluşşan band değerinin genişliğini belirlemektedir.Yukarıdaki grafikte çarpan değerimiz 3.3, Eğer çarpan değerimizi azaltırsak band üstünde çok daha fazla mum olacağı için manipülasyon hassasiyetimiz azalacaktır.
ENG: When we set our multiplier value to 2.3, we have a more sensitive manipulation skin and it gives signals in more candles.
TR: Çarpan değerimizi 2.3 yapınca daha hassas manipülasyon derimiz oluyor ve daha fazla mumda sinyal veriyor.
If you have any ideas what to add to my work to add more sources or make calculations cooler, suggest in DM .
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.
Excalibur Trading System [Dare]✦ INTRODUCTION
The core goal in the Excalibur Trading System is attaining an optimal entry - fading the masses, selling others' buys, buying others' sells, and trading along true tops and bottoms where price manipulation commonly occurs. Executions are most successful intraday and when aligned with HTF price action while still maintaining a systematic approach in analysis and risk management. Use of this tool is not recommended for the uninitiated trader; it takes intense focus, dedicated practice, and unwavering confidence to wield this successfully. Please go through the guide I’ve provided which contains comprehensive coverage of all the elements below which, in the context of this post, are meant to depict a general idea of what the indicator is meant to accomplish.
✦ INDICATOR DETAILS
System Overview
System Components
Indicator Settings
Plotting Interpretation
Postscript
✦ SYSTEM OVERVIEW
Type of System
This is a mechanical system which requires zero discretion. While trading with an objective approach offers several advantages, it's important to note that it is not foolproof. Market conditions can change, and indicators can provide false signals. The accuracy is not 100% and even following it perfectly, as with any strategy, one will incur losses.
Objective Decision-making - No emotional bias, no fear.
Consistent - A repeatable approach that eliminates impulsivity.
Easily tested - Strategy performance can be measured universally no matter who is using it, in both forward and backtesting.
No Guesswork - Provides specific entry and exit signals with a systematic procedure.
Predefined Rules - Controls risk and enforces discipline.
Simple and Clear - Reduces complexity and confusion.
Performance in Various Market Conditions
Excalibur is meant to catch reversals and second-stage continuations, but trending days should be avoided. It has been tested and used in live market conditions in Index Futures, during the regular NY Session, on the 1m Timeframe, targeting ≥2.5RR Ratio. Outcomes will vary by trader due to factors such as risk tolerance, entry opportunities taken, human error and psychological barriers. Historical performance is not a guarantee of future results.
✦ SYSTEM COMPONENTS
Setup Schematic
The premise for all setups is the same. We are identifying manipulation above a previous high (bearish) or below a previous low (bullish) in anticipation of a reversal. This indicator is meant to be used as a measuring tool to quantify that manipulation taking place using Hi's and Lo's as identified by the Bar , which is based on a standard deviation calculation. The Fu tag is meant to be used to find Divergence at custom pivots, not predetermined lookback periods - this is similar to SMT - Smart Money Technique, but this Divergence references bodies vs. wicks and the execution of the trade is at the extreme pivot vs. the weak pivot.
Using the Bar as a guide, the trader will set the Hi/Lo tags and the indicator will automatically calculate the Threshold, the point beyond which one’s Entry resides when Divergence is also present. A valid entry plots as a Polaris star below (bullish) and above (bearish) the current bar in their respective scenarios.
Bullish Setup
(1) Place the Lo tag at the current threshold as signified by the Bar.
(2) Search for Divergence with price action below that threshold by using the Fu tag at extreme bodies of recent swing lows.
(3) Wait for a bullish Entry to plot, confirmed at candle close.
Bearish Setup
(1) Place the Hi tag at the current threshold as signified by the Bar.
(2) Search for Divergence with price action above that threshold by using the Fu tag at extreme bodies of recent swing highs.
(3) Wait for a bearish Entry to plot, confirmed at candle close.
The indicator collects the OHLC values of the target asset candles based on the trader’s Hi/Lo placement, compares them to up to two assets, and plots an entry depending on the context of the setup. The entry method, like the setup composition, is based on minute Divergences in price between the assets and other criteria related to how the candles close relative to each other.
✦ INDICATOR SETTINGS
Options
This line controls the colors of the Polaris (✦) and the squares in the Manipulation Bar. Manipulation can be measured using either mathematical calculation (ᴀʟᴘʜᴀ) or OHLC data-points (ʙᴇᴛᴀ). The Polaris denotes a time and price of possible reversal at an extreme low or high - deselect this line to hide it.
⋆ This line controls colors of the Tags and Candles - Bullish, Bearish, and All. To customize, switch to ᴄᴜsᴛᴏᴍ. If the Divergence Candles are not consistently visible, change the Visual Order to Front on the chart by selecting the indicator Title then More. To hide, deselect this line.'
The third and fourth lines controls the visibility of the Manipulation Bar, Matrix Tags, Advisor Arrows and Invalidation Labels.
Time
By default, the times for Hi, Lo and Fu are set to 09:00, 09:30 and 09:15 respectively. The date will need to be manually adjusted at the beginning of each trading day.
Price
By default, the charted Asset is assumed to be ES1! (E-Mini S&P 500 Continuous Contract) . If the trader would like to chart a different Asset, be sure to adjust Assets I and II to valid comparisons so that the indicator can accurately detect price divergences.
Risk
Input the account size and percentage one intends to risk. To pyramid, indicate the quantity the position to be divided into. In MT4 or 5, right-click a symbol then Specification. The Contract Size field contains the Units per Lot. Use the various options to customize the table format and visibility.
The tooltips (i) will be available in the UI in case the trader will ever need to refer to them for the information above.
✦ PLOTTING INTERPRETATION
Matrix Tags
Guided by the manipulation bar, the trader will use Hi and Lo tags to measure the manipulation threshold. The Fu tag measures either bullish or bearish divergences depending on the placement of the Hi/Lo tags.
Manipulation Bar
The squares plotted together form a bar and indicate whether a candle is or isn’t plotting a new manipulation threshold (creating a new Hi or Lo ). The trader should always use the current Hi or Lo .
Advisor Arrows
The arrows are meant to signify a possible valid entry in the temporary period of time between the candle open and close. They give advance notice that the trader should be looking for divergences using the Fu tag to attain a confirmed entry (Polaris) on that particular candle as it is forming.
Entry Signal
The Polaris denotes a time and price of trade execution. As long as the Matrix tags are placed correctly, this is a valid signal to place a position in the direction indicated. Entry price is at the candle close, regardless of the next candle’s open price.
Risk Labels and Table
This is an automatic calculation for Stop placement based on average true range (valid only for indices with a 0.25pt tick value. A future version may allow for customization of this feature for assets not based on ticks, like forex pairs). The table (by default at the bottom right) will display the trader's position size based on the inputs.
Divergence Candles
Using the Fu tag, the trader can select swing highs and lows to determine if divergence is occurring above and below them, respectively. Divergence is maintained as long as the colored candles are printed consecutively. Referring to the charts of Assets I and II in a separate layout window is recommended but not required.
✦ POSTSCRIPT
I forged this sword, Excalibur, in pursuit of my highest aspiration - to create a legacy and provide a gift to my friends, family, and all those burdened by obligations that limit them from living what they would consider to be a fulfilling life. Those free to pursue the ambitions they truly value are the ones who change their communities and even the world for the better.
~Dare.
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
SFC MTF CandlesMost technical traders in the foreign exchange market, whether they are novices or seasoned pros, have come across the concept of multiple time frame analysis in their market educations.
Multiple time-frame analysis involves monitoring the same currency pair across different frequencies (or time compressions). While there is no real limit as to how many frequencies can be monitored or which specific ones to choose, there are general guidelines that most practitioners will follow.
Typically, using three different periods gives a broad enough reading on the market, while using fewer than this can result in a considerable loss of data, and using more typically provides redundant analysis.
This indicator helps traders to visualise the last few candles on many time frames.
For manipulation traders I have added the ability to see the current manipulation on different time frames. When such a candle is created, its colour changes to purple.
The Heikin-Ashi technique averages price data to create a Japanese candlestick chart that filters out market noise.
Heikin-Ashi charts, developed by Munehisa Homma in the 1700s, share some characteristics with standard candlestick charts but differ based on the values used to create each candle. Instead of using the open, high, low, and close like standard candlestick charts, the Heikin-Ashi technique uses a modified formula based on two-period averages. This gives the chart a smoother appearance, making it easier to spots trends and reversals, but also obscures gaps and some price data.
Linear regression attempts to model the relationship between two variables, with a given collection of data values.
Linear regression is a very common and useful technique for following the trend. This technique is applied to candles in order to filter out false movements.
Heikin Ashi and Linear Regression candles are helpful for more conservative traders. If they are not sure about the direction, they can wait for these candles to change colour (direction) as an extra confirmation.
Features:
- Up to 6 time frames
- Up to 4 MTF bars
- Heikin Ashi candles (current time frame) - x4
- Linear Regression candles (current time frame) - x4
Settings
- Time frames on/off
- Selection how many bars to display from each time frame (max 4)
- Adjustment of distance between candles
- Adjusting the position of the candles
- Heikin Ashi candles on/off
- TLinear regression candles on/off
- Linear regression candle length adjustment
How to use the indicator:
Traders can visualise different candles in order to observe the chart better and faster.
All they have to do is activate the group of candles they want and set it up according to their preferences.
Due to the complexity of the code, there is a 1s delay when all features are enabled. To eliminate the lag, deactivate some of the features
It is recommended to have a maximum of 3 time frames activated during the high impact news, as the price changes very quickly.
HTF Power of Three°Power of Three ( PO3 ) is one of the many concepts introduced by the Inner Circle Trader and inspired by Larry Williams.
The PO3 represents a three staged Smart Money campaign: Accumulation , Manipulation , and Distribution .
ICT traders assume that this pattern represents how any candle is built.
“This is applicable to every time measurement, as long as you have a beginning time, the highest value, the lowest value, and an ending in terms of measuring time.”
Consider the development of a Bullish Candle over Time:
– Candle Open (initial value price, prior to dynamic imbalance)
– Accumulation of longs around the opening price
– Manipulation where short liquidity is engineered and long liquidity is neutralized
– Range Expansion (dynamic price imbalance)
– Distribution pairing long exits with pending buy interest
– Candle Close (ending value price, post dynamic imbalance)
The same goes for the development of Bearish Candles, in reverse.
The HTF Power of Three° Indicator allows to monitor the selected Higher Timeframe Candle in real time:
– See where its Open, High, and Low are in the current lower resolution with high precision
– Know when it's supposed to Close by monitoring its own countdown (if below 1D)
– Note its Low to High range to gain a deeper understanding of LTF market profiles
– Study and backtest PO3 in Replay Mode with ease
– Trade PO3 with confidence without needing multiple layouts
This becomes very useful when studying, and especially using, PO3. One can use this as a tool to build narrative, as well as spotting important institutional levels.
You can also monitor more than one HTF PO3 at the time by stacking multiple instances of the indicator:
This works on any timeframe, even the seconds charts!
Note: if you select too high of a PO3 timeframe while on LTF you might receive an error due to TrandingView's data availability on that chart – this can also depend on your TradingView Plan.
Pa Deviation[M]Hello everyone,
First of all, what is deviation?
It can be said that the price goes down (or goes out) under the past pivot zone and enters the range again after lingering for a while. (I think so)
I think there is a sign of trend reversal as it hunts the stops below (or above) the pivot zone as well. (RektProof also has a strategy for this.)
In this indicator, I determined the deviation limits with the atr of the pivot regions. For example, the deviation area (pivot zone - atr) must be greater than. It should also make a grand entrance into the range.
Let me tell you a little about the settings:
Pivot Length: It is the value entered for determining the pivot regions. For example, if the pivot length is 5, the low must be less than the past 5 lows and the next 5 lows.
Minimum Bar: The value that determines the minimum bar of the deviation area. For example, if the minimum bar is 4, the indicator will show deviation areas consisting of minimum 4 bars.
Example Deviation:
1.Pivots and Pivot Lines
As you can see in the image, there are many pivot points. Let's take the lowest pivot point and draw an imaginary line. This is our pivot line
2.Deviation
As you can see, an accumulation has occurred under our pivot line. If the price goes above our pivot line again, it will be a deviation.
3.Return to Range
Voila! Price accumulated below the pivot line and splendidly rose above the pivot line. This is the deviation area for us now.
Other Examples:
SFC Smart Money Manipulation - Liquidity, StructureThis indicator shows very important information about the market.
Features:
- Market structure
- Important Ranges
- Liquidity
- Trading session
- Daily Checklist
Market structure
Market structure is the behaviour, condition, and current flow of the market. It highlights support and resistance levels, swing highs, and swing lows. A trend is simply a consistent direction of price movement over time. Market structure can tell you if the market is trending or not.
Market structure is a lagging indicator, because Highs and Lows must to be created in order to define the structure properly. The structure provide the most important information about the market.
Market structure can provide early signals about the trend.
- If the structure continues to break in the same direction, it means that the trend is healthy and will continue (BoS).
- If the structure break in the opposite direction, means that the trend may reverse or pause for a while (CHoCH).
Important ranges
- Asia Range - it is important intraday range and can provide early information if the day will be bullish or bearish.
- Most recent High/Low - determine the last swing
- Premium/ Discount zone with Fibonacci levels - the institutions always want to buy in discount and sell in premium.
Liquidity
Areas where a lot of traders get into the market and theirs stop losses are obvious. So the banks will manipulate the price to clear these stop losses, before price go in real direction. The banks will always hunt the liquidity.
The major liquidity is:
- Doji candle - displayed
- Double/Triple Highs or Lows - displayed
- Fair value gaps - displayed
- Imbalances - displayed
- Trend lines
- Big wicks
Trading Sessions
Price and Time theory is very significant in Smart Money Concept. The banks do not just place orders chaotically. They place it in specific time.
The indicator shows the Asia, London and New York intraday sessions and the kill zones.
Kill Zone - most manipulated time in the day, where institutions try to wipe out the retail traders and establish the true move.
Daily Checklist
Simple, but very useful checklist. It shows the most important daily steps in order qualitative analysis to be created.
How to use
1) Use the swing highs and lows and check the current structure.
2) Look where is the major liquidity. By default orange colour. When liquidity is retested from the price ,it change the colour from orange to gray. Retested liquidity is no more significant for the banks.
3) Use the important ranges to define the pullbacks or reversals or trading ranges.
4) Use the trading sessions and kill zones to place orders in the right time.
5) Use the "daily checklist" every day - step by step. It helps trader to analyse the current market.
Settings
-Show pivots, Pivot confirmation candles, Equal Highs/Lows sensitivity
-Show structures breaks
-Show most recent high/low
-Show Asia range
-Show premium/discount zone with Fibonacci levels
-Show liquidity, Colour of liquidity, Color of retested liquidity, Doji settings
-Show Trading sessions
-Show daily checklist
SFC Smart Money Manipulation - MTF ZonesThis indicator shows the most important manipulated zones - true support and resistance.
The indicator can show the zones from different time frames - 1H, 4H, D and the current TF.
Order Block definition - small candle or few consecutive candles, where banks place buy and sell orders in order to manipulate the price. After price is manipulated and moved in one direction, the banks are in draw down, that is why they manipulate the price one more time before the true move, retesting these candles (closing losing positions).
FU candles
FU candles are most manipulated candles and create very strong reaction zones. These are the true zones, where the banks place their orders.
Why they are so strong? The answer is very simple - these candles clear the liquidity from the previous ones. After the liquidity is cleared ( all stop losses/pending orders are triggered), price reveal the true direction and move very fast.
FU candles are type of Order Blocks - the most powerful one.
Because the most volume is in the body of the order block. The indicator shows not only the FU candle, but the body of the order block.
There are two types of FU candles :
(only full FU candles are displayed as zones, because they are much significant)
1) Full fu, where the current candle completely engulf the previous one, after taking the liquidity. (displayed as F)
2) Current candle only take liquidity from the previous one, but failed to engulf it. (displayed as A)
9 day simple moving average is also displayed. When the price form Fu candle above/under the MA, there is a better chance for reversal.
When FU candles are retested the transparency will change, showing that the zones may have less impact.
Order Blocks
Only the current order blocks are displayed. Price react very often from the 50% level, that is why this level is also displayed.
Rejections
Rejections are doji candles or candles with big wicks. These rejections very often lead to reversals or deep pullbacks. But before the true move, price test the rejection levels. The retest is not always, but very often of the 50% of the wick.
The rejections are very important price zone.
The indicator can show the zones from different time frames - 1H, 4H, D and the current TF. When wicks are retested the transparency and colour will change, showing that the wicks may have less impact or no more impact.
Settings
-The colour and transparency of the zones can be changed.
- Multi time frames zones could be disabled.
- Doji settings
- Length of the moving average
How to use
If price reach one of the displayed zones. The trader should be prepared for price reaction. This reaction could lead to reversal, pull back or trading range.
The trader should have bias from the higher time frames and watch for signs of manipulations on smaller time frames.
Accumulation Manipulation PO3 and MMXMMuch is said about the market maker or manipulation of price, but there aren't many indicators that try to show this, until now.
Using an easily customisable, but intelligent algorithm, this indicator tries to find and highlight when price is 'ranging', or 'accumulating'. It does this by looking at changes in price and quantifying the strength of the change, based on current and historical changes, and can therfore decide if price is staying in range or breaking out. By showing this on the chart several approaches can be taken.
Simply, you can trade within the range, and also trade breakouts of the range, knowing that price will react at these range 'levels'.
Alternatively, you can use the accumulation boxes to try and identify MMXM models, that is Market Maker Buy and Market Maker Sell Models, where price moves in phases of consolidation, smart money reversal and re-accumulation.
Finally, using the manipulation detection option, you can try to identify when a sudden change in price is actually manipulation by institutions, and plan to trade the distribution phase accordingly. This accumulation, manipulation, distribution is also known as Power of 3, PO3.
This indicator does not try to teach any of these ideas, only help to visualise them on the chart, and as such should not be considered financial advice.
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
KVKZKVKZ = KV'S KILLZONES
This Indicator, break the charts into session: ASIAN, LONDON, NEW YORK.
-The 1st two vertical lines (red) indicates the ASIAN RANGE
-The 2nd two vertical lines (red & green) indicates the LONDON session
-The 3rd two vertical lines (green & blue) indicates the NEW YORK session
-The will be no trading in between the two red vertical lines
-A fake move is expected to happen in between the 2nd red vertical line and green line, this fake move is known as the JUDAS SWING by ICT, you can YouTube Judas Swing and check out his concepts
-There are two automatically moving horizontal lines (orange), that plots the ASIAN high and lows, these levels are expected to be manipulated in the London session, and this is called the Judas Swing
-the purple lines are known as Institution Zones, basically just levels 30pips above and below the ASIAN range
-this indicator works well with GBPUSD, EURUSD, USDCHF
-this indicator doesn’t work well with USDJPY, AUDUSD, NZDUSD
INPUTS:
HOUR 1: 17
MIN 1 : 0
HOUR 2: 0
MIN 2 : 0
HOUR 3: 6
MIN 3 : 0
HOUR 4: 12
MIN 1 : 0
THIS INDICATOR IS NOT A HOLY GRAIL, BUT IF YOU CAN READ PRICE ACTION WELL, THESE SESSIONS BREAK DOWN COULD BE VERY USEFULL.
Extras:
dot = dotted lines
dsh = dashed lines
sol = solid lines
NOTE: time has to be set to NY time.
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.