bar_index inspectorThis is a tool for developers who are working with index based plots and find themselves adding the bar_index to their indicators on a regular basis during development and debugging.
What it does:
shows the bar_index in the status line and data window.
plots optional labels (bar index + time) into the chart every 10 bars
Tools
[KF] Sector & Industry RemappingThis script remaps TradingView's sector and industry categories to standard classifications and displays them in the top-right corner of the chart making it easy to quickly identify a security's sector and industry. This tool is useful for traders and analysts who prefer standard industry classifications while using TradingView's charts.
Trade Tool VDWMA + OI RSI BasedThis indicator works only for symbols where open interest data is available.
The idea was to create a combination of Volume Delta, Open Interest, RSI, Moving Average and Support / Resistance as a unified tool.
I created a Weighted Moving Average based on the Volume Delta (VDWMA). The idea behind this was to reflect the moving average on the difference between buy and sell volume.
There are two VDWMA to determine a trend. Fast and Slow. The principle is the same as with conventional moving averages. For visualization, the candles are colored based on the following logic:
up trend = Fast VDWMA is above the Slow VDWMA and the price is above the Fast VWDWMA.
down Trend = Fast VDWMA is below the Slow VDWMA and the Short is below the Fast VDWMA
Further, support and resistance zones were defined based on the close and high prices as well as close and low prices.
A simple logic looks for divergences between RSI and price to generate first signals for possible price reversals.
Another RSI was created based on the open interest.
In combination with the conventional RSI, oversold and overbought zones were defined based on the following logic, which are marked by vertical zones on the chart.
Oversold zone = RSI is below 30 and OI RSI is above 70 or below 30 and OI opening is not greater than OI closing price
Overbought zone = RSI is above 70 and OI RSI is above 70 or below 30 and OI opening is not smaller than OI closing price
Based on this, buy and sell signals were defined.
First, the support or resistance zone must remain the same for two candles, which signals that the zone has not been breached. In addition, a divergence must occur in the RSI and the price must bounce.
newsell = resistance == resistance and high >= resistance and close < resistance and bearishDiv
newbull = support == support and low <= support and close > support and bullishDiv
The OI signaling was deliberately not included as well as the trend function. The tool should be suitable for scalping as well as for swinging. Thus, depending on the tradestyle itself to decide which points you want to trade.
Have fun with it
TTF SMC ToolkitGreetings and welcome to another community indicator from TTF! This indicator is our attempt to build a suite of tools for use in Smart Money Concepts (SMC) and Price Action style trading strategies. If you aren't familiar with these models, we'd encourage you to do some independent research on them to find out how to properly use these models and the tools included in this indicator.
Important! To utilize all features of this indicator fully, please select "Bring to front" under the visual order menu.
All of the fundamental concepts of this toolkit revolve around smart money concepts and price action trading, here are some key concepts of this indicator's different features:
DR (defining range): This is a technique that uses the candle wicks (high and low of price) during a specific hour of a trading session to create a trading framework to help visualize order flow. When price breaks the high of the range, there is a very high statistical probability based on price action history, that the bottom of the range won't be traded past for the rest of that trading session. Vice versa for price breaking the low of the range.
IDR (implied defining range): Similar to DR above, this method uses the candle body (open and close of price) of price during a specific hour of a trading session to help create a trading framework to help visualize order flow.
Equilibrium: Any range can be objectively divided into a top and bottom half. The equilibrium represents the 50% mark between a range high and a range low. It is most often plotted with a fibonacci tool.
Fair Pricing Model: This is a hypothesis postulating that "big money" (a.k.a. "market movers", "institutional investors", etc.) seeks to buy in the discount area of any given price range, and sell in the premium area of that same range. See DR and IDR for examples of possible techniques to help identify and define the price range to apply to this model.
Non-discretionary Levels: This is essentially a fancy way of saying that the levels drawn by this indicator are strictly rules-based, and will always behave in the following manner:
1. For a given trading session, once the levels are drawn, they will remain constant throughout the rest of the trading session, no matter what price does afterwards.
2. The levels drawn will be drawn using the same rules every single day, without human bias or discretion.
Williams Fractals: This fractal pattern is based upon a specific candlestick pattern sequence. For a bullish Williams fractal, you will see X number of falling candles, followed by X number of rising candles. The candle at the fulcrum (bottom or top of the fractal structure) is where the fractal will print. a bearish fractal will be the inverse of this pattern. Note that this is a lagging indicator as it takes X candles after the fulcrum candle for the fractal pattern to complete. In most common cases, the value of X is 2 (2 falling candles, the fulcrum candle, and 2 rising candles) for a total of 5 candles to complete the fractal pattern. You can find more information in this article, which describes this type of fractal: www.investopedia.com
Fractal Wyckoff Accumulation/Distribution: The Wyckoff Method is used by investors and traders to determine market trends, select investments, and time the placement of trades. It can help them identify the times at which big players are accumulating (or distributing) positions in a security. Fractal Wyckoff accumulation/distribution refers to watching the process occur on a lower timeframe, from a higher timeframe. For more information on the Wycoff Theory, you can see this article: www.investopedia.com
Now that we've covered some terms and definitions, let's cover the 4 major components included in this indicator.
ICT NY Midnight/NY Open (08:30 NY time):
The first piece of the indicator being displayed here is the ICT midnight and 8:30am NY price lines. These lines can be used as non-discretionary levels, or as intra-day premium/discount as part of a fair-pricing model.
DR/IDR:
Initially developed by TheMas7er, DR stands for defining range, and it highlights a range during high volume periods of the day that can act as non-discretionary levels, with very high historical accuracy.
Williams Fractals
Williams Fractals denote fractal market structure, and can be used to mechanically create ranges and view potential liquidity pools in a similar manner to using pivot points.
Triple M:
This tool highlights wicks that represent fractal Wyckoff accumulation and distribution. This pattern can be used an a potential entry trigger when paired with other confluences.
And now that we've covered the core concepts/definitions and an overview of each major component of this indicator, it's time to bring everything together by giving an example of how these tools can be used to define a strategy.
Before NYSE open, turn on the price lines to get a sense of whether price is in the premium or discount of the daily fair-pricing model.
Once NYSE market opens, wait for DR/IDR to establish and break its range.
If the bias from DR/IDR aligns with the fair pricing model from the ICT price lines, you could look for a fractal Wyckoff entry during a retracement.
Disclaimer: This strategy is provided purely as an example and has not been tested by us. Please do your own due diligence by thoroughly backtesting and forward-testing on a demo account befor using any proposed strategy live market with real money!
Important! To utilize all features of this indicator fully, please select "Bring to front" under the visual order menu.
Autocorrelation - The Quant ScienceAutocorrelation - The Quant Science it is an indicator developed to quickly calculate the autocorrelation of a historical series. The objective of this indicator is to plot the autocorrelation values and highlight market moments where the value is positive and exceeds the attention threshold.
This indicator can be used for manual analysis when a trader needs to search for new price patterns within the historical series or to create complex formulas in estimating future prices.
What is autocorrelation?
Autocorrelation in trading is a statistical measure used to determine the presence of a relationship or pattern of dependence between values in a financial time series over time. It represents the correlation of past values in a series with its future values. In other words, autocorrelation in trading aims to identify if there are systematic relationships between the past prices or returns of a security or market and its future prices or returns. This analysis can be helpful in identifying patterns or trends that can be leveraged for informed trading decisions. The presence of autocorrelation may suggest that market prices or returns follow a certain pattern or trend over time.
Limitations of the model
It is important to note that autocorrelation does not necessarily imply a causal relationship between past and future values. Other variables or market factors may influence the dynamics of prices or returns, and therefore autocorrelation could be merely a random coincidence. Therefore, it is essential to carefully evaluate the results of autocorrelation analysis along with other information and trading strategies to make informed decisions.
How to use
The usage is very simple, you just need to add it to the current chart to activate the indicator.
From the user interface, you can manage two important features:
1. Lenght: the delay period applied to the historical series during the autocorrelation calculation can be managed from the user interface. By default, it is set to 20, which means that the autocorrelation ratio within the historical series is calculated with a delay of 20 bars.
2. Threshold: the threshold value that the autocorrelation level must meet can be managed from the user interface. By default, it is set to 0.50, which means that the autocorrelation value must be higher than this threshold to be considered valid and displayed on the chart.
3. Bar color: the color used to display the autocorrelation data and highlight the bars when autocorrelation is valid can be managed from the user interface.
To set up the chart
We recommend disabling the 'wick' and 'border' of the candlesticks from the chart settings for a high-quality user experience.
No Code SignalsNo Code Signals is an intuitive user interface for users to generate their own signals based on indicators they already have applied to their chart.
This indicator makes use of the new input.source() limits for importing data from external sources (indicators) into 1 indicator.
You are now able to import ANY number of sources from up to 10 different indicators.
Features:
- Import up to 10 unique values from up to 10 different indicators already on your chart!
- Compare those values against other imported indicator values, or chart ohlc values.
- Option to use a defined level instead of an active source.
- 5 Signal Options (Currently)
- Alerts, Each signal has its own alert condition.
- Labeled Signals, to tell which signal is which.
Potential Future Plans:
- More Signals & Analysis Options
- Possibly more imports
- Combining 2 (or more) signals into 1
Here is a Screenshot of a chart with signals, and the Interface creating the signals.
Enjoy!
Grid Indicator - The Quant ScienceQuickly draw a 10-level grid on your chart with our open-source tool.
Our grid tool offers a unique solution to traders looking to maximize their profits in volatile market conditions. With its advanced features, you can create customized grids based on your preferred start price and line distance, allowing you to easily execute trades and capitalize on price movements. The tool works automatically, freeing up your time to focus on other important aspects of your trading strategy.
The benefits of using this tool are numerous. Firstly, it eliminates the need for manual calculation, making the analysis process much more efficient. Secondly, the automatic nature of the tool ensures that each grids are draw at precisely prices, giving you the best possible chance of maximizing your analysis. Finally, the ability to easily customize grids means that you can adapt your strategy quickly and effectively, even in rapidly changing market conditions.
So why wait? Take control of your trading and start using our innovative grid tool today! With its advanced features and ease of use, it's the perfect solution for traders of all levels looking to take their trading to the next level.
HOW TO USE
Using it is easy. Add the script to your chart and set the price and distance between the grids.
Candle LevelsCandle Levels
Allows chart levels to be plotted automatically, simply add tool to chart and the interactive mode will prompt for candle selection, timeframe anchor and some label choices such as displaying time, price or disabling labels altogether.
Also a note can be supplied that will be shown in the labels if they're displayed, if not it'll be up in the indicator values if those are enabled. Colors and individual labels can be customized, encourage saving over defaults for repeated usage.
Levels calculated:
Standard OHLC
Close to open mid point
High to low mid point
High wick mid point (either between close or open, whichever is higher)
Low wick mid point (either between close or open, whichever is lower)
I have plans to better detected levels and labels overlap to perhaps do something with that, for now manually toggling display of label should suffice.
I've tested with various markets such as futures, standard stock markets and also various higher and lower timeframes, if something is found to not be working please let me know.
Enjoy!
Quarterly Returns in Strategies vs Buy & HoldThis is a Quarterly Returns version of Monthly Returns in PineScript Strategies by QuantNomad
This script shows a table of Quarterly/Yearly performance of your strategy.
It also provides an option to compare with Buy & Hold.
The script can easily integrated to your strategy. All you need to do is copy the table part and paste it at the end of your script
Disclaimer
Please remember that past performance may not be indicative of future results.
This post and the script don’t provide any financial advice.
Auto Risk Reward CalculatorAuto RR Calculator
Gives you the price of certain risk to rewards based on your entry and stop loss inputs.
The information given by this tool does not constitute as financial advice.
ATR Report & Tool█ OVERVIEW
This indicator reports the historical probabilities of the price trading past its Average True Range (ATR).
█ CONCEPTS
It is common knowledge that the market is not likely to trade past 1x ATR. Is this true? How much unlikely exactly? The indicator reports the data in a table and tells you precisely how often the price made it past x times ATR.
You have identified two plausible entries at different price structures or two targets at significant projections; which one should you choose? While is it possible to reach them, is this indeed probable? The indicator complements your analysis for making sounds trading decisions.
█ FEATURES
Price Selection Tool
The indicator has a price selection tool embedded. You can select a price on the chart and it will show the distance relative to the ATR so you can easily refer to the historical probability table.
Multi-Timeframe
By default, the indicator uses the daily timeframe for analyzing how much price moves compared to its average volatility during a day. To the same extent, you can set it to any other timeframe.
Configurable ATR
• Pick your preferred smoothing between the Simple Moving Average (SMA) or the Relative Moving Average (RMA).
• Set the length for getting the average price movement. For example, you can set it to 20 for the daily ATR (20 trading days in a month), 12 for the weekly ATR (3 months), or 6 for the monthly ATR.
• Select the reference between “previous” or “current” ATR value (default set on previous).
Data Window
The indicator provides additional volatility-related values and reporting data.
Others
Automatically hides the indicator when the chart’s timeframe is higher than the indicator’s one.
█ NOTES
Calculation
The volatility is calculated from the selected period's low to high. It may use the previous close when the market gaps up/down.
AbdulLibraryLibrary "AbdulLibrary"
The library consists of three sections:
Technical Analysis Functions - A collection of tools commonly used by day traders
Trading Setup Filters Functions - A number of filters that help day traders to screen trading signals
Candlestick Pattern Detection Functions - To detect different candlestick patterns that are used in day trading setups
Note that this would have been possible without the help of @ZenAndTheArtOfTrading as I build-up this library after completing his pine script mastery course so big thanks to him
The content of the library are:-
fibLevels(preDayClose, preDayHigh, preDayLow) Calculates Daily Pivot Point and Fibonacci Key Levels
Parameters:
preDayClose : The previous day candle close
preDayHigh : The previous day candle high
preDayLow : The previous day candle low
Returns: Returns Daily Pivot Point and Fibonacci Key Levels as a tuple
bullishFib(canHigh, canLow, fibLevel) Calculates Fibonacci Levels in Bullish move
Parameters:
canHigh : The high of the move
canLow : The low of the move
fibLevel : The Fib level as % you want to calculate
Returns: Returns The Fib level for the Bullish move
bearishFib(canHigh, canLow, fibLevel) Calculates Fibonacci Levels in Bearish move
Parameters:
canHigh : The high of the move
canLow : The low of the move
fibLevel : The Fib level as % you want to calculate
Returns: Returns The Fib level for the Bearish move
getCandleSize() Calculates the size of candle (high - low) in points
Returns: Returns candle size in points
getCandleBodySize() Calculates the size of candle (close - open) in points
Returns: Returns candle body size in points
getHighWickSize() Calculates the high wick size of candle in points
Returns: Returns The high wick size of candle in points
getLowWickSize() Calculates the low wick size of candle in points
Returns: Returns The low wick size of candle in points
getBodyPercentage() Calculates the candle body size as % of overall candle size
Returns: Returns The candle body size as % of overall candle size
isSwingHigh(period) Checks if the price has created new swing high over a period of time
Parameters:
period : The lookback time we want to check for swing high
Returns: Returns True if the current candle or the previous candle is a swing high
isSwingLow(period) Checks if the price has created new swing low over a period of time
Parameters:
period : The lookback time we want to check for swing low
Returns: Returns True if the current candle or the previous candle is a swing low
isDojiSwingHigh(period) Checks if a doji is a swing high over a period of time
Parameters:
period : The lookback time we want to check for swing high
Returns: Returns True if the doji is a swing high
isDojiSwingLow(period) Checks if a doji is a swing low over a period of time
Parameters:
period : The lookback time we want to check for swing low
Returns: Returns True if the doji is a swing low
isBigBody(atrFilter, atr, candleBodySize, multiplier) Checks if a candle has big body compared to ATR
Parameters:
atrFilter : Check if user wants to use ATR to filter candle-setup signals
atr : The ATR value to be used to compare candle body size
candleBodySize : The candle body size
multiplier : The multiplier to be used to compare candle body size
Returns: Returns Boolean true if the candle setup is big
isSmallBody(atrFilter, atr, candleBodySize, multiplier) Checks if a candle has small body compared to ATR
Parameters:
atrFilter : Check if user wants to use ATR to filter candle-setup signals
atr : The ATR value to be used to compare candle body size
candleBodySize : The candle body size
multiplier : The multiplier to be used to compare candle body size
Returns: Returns Boolean true if the candle setup is small
isHammer(fibLevel, colorMatch) Checks if a candle is a hammer based on user input parameters and candle conditions
Parameters:
fibLevel : Fib level to base candle body on
colorMatch : Checks if user needs for the candel to be green
Returns: Returns Boolean - True if the candle setup is hammer
isShootingStar(fibLevel, colorMatch) Checks if a candle is a shooting star based on user input parameters and candle conditions
Parameters:
fibLevel : Fib level to base candle body on
colorMatch : Checks if user needs for the candel to be red
Returns: Returns Boolean - True if the candle setup is star
isBullEngCan(allowance, period) Check if a candle is a bullish engulfing candle
Parameters:
allowance : How many points the candle open is allowed to be off (To allow for gaps)
period : The lookback period for swing low check
Returns: Boolean - True only if the candle is a bullish engulfing candle
isBearEngCan(allowance, period) Check if a candle is a bearish engulfing candle
Parameters:
allowance : How many points the candle open is allowed to be off (To allow for gaps)
period : The lookback period for swing high check
Returns: Boolean - True only if the candle is a bearish engulfing candle
isBullDoji(maxSize, wickLimit, colorFilter) Check if a candle is a bullish doji candle
Parameters:
maxSize : Maximum candle body size as % of total candle size to be considered as doji
wickLimit : Maximum wick size of one wick compared to the other wick
colorFilter : Checks if the doji is green
Returns: Boolean - True if the candle is a bullish doji
isBearDoji(maxSize, wickLimit, colorFilter) Check if a candle is a bearish doji candle
Parameters:
maxSize : Maximum candle body size as % of total candle size to be considered as doji
wickLimit : Maximum wick size of one wick compared to the other wick
colorFilter : Checks if the doji is red
Returns: Boolean - True if the candle is a bearish doji
isBullOutBar() Check if a candle is a bullish outside bar
Returns: Boolean - True if the candle is a bullish outside bar
isInsideBar() Check if a candle is an inside bar
Returns: Returns Boolean - True if a candle is an inside bar
[e2] Drawing Library :: Horizontal Ray█ OVERVIEW
Library "e2hray"
A drawing library that contains the hray() function, which draws a horizontal ray/s with an initial point determined by a specified condition. It plots a ray until it reached the price. The function let you control the visibility of historical levels and setup the alerts.
█ HORIZONTAL RAY FUNCTION
hray(condition, level, color, extend, hist_lines, alert_message, alert_delay, style, hist_style, width, hist_width)
Parameters:
condition : Boolean condition that defines the initial point of a ray
level : Ray price level.
color : Ray color.
extend : (optional) Default value true, current ray levels extend to the right, if false - up to the current bar.
hist_lines : (optional) Default value true, shows historical ray levels that were revisited, default is dashed lines. To avoid alert problems set to 'false' before creating alerts.
alert_message : (optional) Default value string(na), if declared, enables alerts that fire when price revisits a line, using the text specified
alert_delay : (optional) Default value int(0), number of bars to validate the level. Alerts won't trigger if the ray is broken during the 'delay'.
style : (optional) Default value 'line.style_solid'. Ray line style.
hist_style : (optional) Default value 'line.style_dashed'. Historical ray line style.
width : (optional) Default value int(1), ray width in pixels.
hist_width : (optional) Default value int(1), historical ray width in pixels.
Returns: void
█ EXAMPLES
• Example 1. Single horizontal ray from the dynamic input.
//@version=5
indicator("hray() example :: Dynamic input ray", overlay = true)
import e2e4mfck/e2hray/1 as e2draw
inputTime = input.time(timestamp("20 Jul 2021 00:00 +0300"), "Date", confirm = true)
inputPrice = input.price(54, 'Price Level', confirm = true)
e2draw.hray(time == inputTime, inputPrice, color.blue, alert_message = 'Ray level re-test!')
var label mark = label.new(inputTime, inputPrice, 'Selected point to start the ray', xloc.bar_time)
• Example 2. Multiple horizontal rays on the moving averages cross.
//@version=5
indicator("hray() example :: MA Cross", overlay = true)
import e2e4mfck/e2hray/1 as e2draw
float sma1 = ta.sma(close, 20)
float sma2 = ta.sma(close, 50)
bullishCross = ta.crossover( sma1, sma2)
bearishCross = ta.crossunder(sma1, sma2)
plot(sma1, 'sma1', color.purple)
plot(sma2, 'sma2', color.blue)
// 1a. We can use 2 function calls to distinguish long and short sides.
e2draw.hray(bullishCross, sma1, color.green, alert_message = 'Bullish Cross Level Broken!', alert_delay = 10)
e2draw.hray(bearishCross, sma2, color.red, alert_message = 'Bearish Cross Level Broken!', alert_delay = 10)
// 1b. Or a single call for both.
// e2draw.hray(bullishCross or bearishCross, sma1, bullishCross ? color.green : color.red)
• Example 3. Horizontal ray at the all time highs with an alert.
//@version=5
indicator("hray() example :: ATH", overlay = true)
import e2e4mfck/e2hray/1 as e2draw
var float ath = 0, ath := math.max(high, ath)
bool newAth = ta.change(ath)
e2draw.hray(nz(newAth ), high , color.orange, alert_message = 'All Time Highs Tested!', alert_delay = 10)
Punchline_LibLibrary "Punchline_Lib"
roundSmart(float) Truncates decimal points of a float value based on the amount of digits before the decimal point
Parameters:
float : _value any number
Returns: float
tostring_smart(float) converts a float to a string, intelligently cutting off decimal points
Parameters:
float : _value any number
Returns: string
ZenLibraryLibrary "ZenLibrary"
A collection of custom tools & utility functions commonly used with my scripts.
getDecimals() Calculates how many decimals are on the quote price of the current market
Returns: The current decimal places on the market quote price
truncate(float, float) Truncates (cuts) excess decimal places
Parameters:
float : _number The number to truncate
float : _decimalPlaces (default=2) The number of decimal places to truncate to
Returns: The given _number truncated to the given _decimalPlaces
toWhole(float) Converts pips into whole numbers
Parameters:
float : _number The pip number to convert into a whole number
Returns: The converted number
toPips(float) Converts whole numbers back into pips
Parameters:
float : _number The whole number to convert into pips
Returns: The converted number
av_getPositionSize(float, float, float, float) Calculates OANDA forex position size for AutoView based on the given parameters
Parameters:
float : _balance The account balance to use
float : _risk The risk percentage amount (as a whole number - eg. 1 = 1% risk)
float : _stopPoints The stop loss distance in POINTS (not pips)
float : _conversionRate The conversion rate of our account balance currency
Returns: The calculated position size (in units - only compatible with OANDA)
getMA(int, string) Gets a Moving Average based on type
Parameters:
int : _length The MA period
string : _maType The type of MA
Returns: A moving average with the given parameters
getEAP(float) Performs EAP stop loss size calculation (eg. ATR >= 20.0 and ATR < 30, returns 20)
Parameters:
float : _atr The given ATR to base the EAP SL calculation on
Returns: The EAP SL converted ATR size
barsAboveMA(int, float) Counts how many candles are above the MA
Parameters:
int : _lookback The lookback period to look back over
float : _ma The moving average to check
Returns: The bar count of how many recent bars are above the MA
barsBelowMA(int, float) Counts how many candles are below the MA
Parameters:
int : _lookback The lookback period to look back over
float : _ma The moving average to reference
Returns: The bar count of how many recent bars are below the EMA
barsCrossedMA(int, float) Counts how many times the EMA was crossed recently
Parameters:
int : _lookback The lookback period to look back over
float : _ma The moving average to reference
Returns: The bar count of how many times price recently crossed the EMA
getPullbackBarCount(int, int) Counts how many green & red bars have printed recently (ie. pullback count)
Parameters:
int : _lookback The lookback period to look back over
int : _direction The color of the bar to count (1 = Green, -1 = Red)
Returns: The bar count of how many candles have retraced over the given lookback & direction
getBodySize() Gets the current candle's body size (in POINTS, divide by 10 to get pips)
Returns: The current candle's body size in POINTS
getTopWickSize() Gets the current candle's top wick size (in POINTS, divide by 10 to get pips)
Returns: The current candle's top wick size in POINTS
getBottomWickSize() Gets the current candle's bottom wick size (in POINTS, divide by 10 to get pips)
Returns: The current candle's bottom wick size in POINTS
getBodyPercent() Gets the current candle's body size as a percentage of its entire size including its wicks
Returns: The current candle's body size percentage
isHammer(float, bool) Checks if the current bar is a hammer candle based on the given parameters
Parameters:
float : _fib (default=0.382) The fib to base candle body on
bool : _colorMatch (default=false) Does the candle need to be green? (true/false)
Returns: A boolean - true if the current bar matches the requirements of a hammer candle
isStar(float, bool) Checks if the current bar is a shooting star candle based on the given parameters
Parameters:
float : _fib (default=0.382) The fib to base candle body on
bool : _colorMatch (default=false) Does the candle need to be red? (true/false)
Returns: A boolean - true if the current bar matches the requirements of a shooting star candle
isDoji(float, bool) Checks if the current bar is a doji candle based on the given parameters
Parameters:
float : _wickSize (default=2) The maximum top wick size compared to the bottom (and vice versa)
bool : _bodySize (default=0.05) The maximum body size as a percentage compared to the entire candle size
Returns: A boolean - true if the current bar matches the requirements of a doji candle
isBullishEC(float, float, bool) Checks if the current bar is a bullish engulfing candle
Parameters:
float : _allowance (default=0) How many POINTS to allow the open to be off by (useful for markets with micro gaps)
float : _rejectionWickSize (default=disabled) The maximum rejection wick size compared to the body as a percentage
bool : _engulfWick (default=false) Does the engulfing candle require the wick to be engulfed as well?
Returns: A boolean - true if the current bar matches the requirements of a bullish engulfing candle
isBearishEC(float, float, bool) Checks if the current bar is a bearish engulfing candle
Parameters:
float : _allowance (default=0) How many POINTS to allow the open to be off by (useful for markets with micro gaps)
float : _rejectionWickSize (default=disabled) The maximum rejection wick size compared to the body as a percentage
bool : _engulfWick (default=false) Does the engulfing candle require the wick to be engulfed as well?
Returns: A boolean - true if the current bar matches the requirements of a bearish engulfing candle
timeFilter(string, bool) Determines if the current price bar falls inside the specified session
Parameters:
string : _sess The session to check
bool : _useFilter (default=false) Whether or not to actually use this filter
Returns: A boolean - true if the current bar falls within the given time session
dateFilter(int, int) Determines if this bar's time falls within date filter range
Parameters:
int : _startTime The UNIX date timestamp to begin searching from
int : _endTime the UNIX date timestamp to stop searching from
Returns: A boolean - true if the current bar falls within the given dates
dayFilter(bool, bool, bool, bool, bool, bool, bool) Checks if the current bar's day is in the list of given days to analyze
Parameters:
bool : _monday Should the script analyze this day? (true/false)
bool : _tuesday Should the script analyze this day? (true/false)
bool : _wednesday Should the script analyze this day? (true/false)
bool : _thursday Should the script analyze this day? (true/false)
bool : _friday Should the script analyze this day? (true/false)
bool : _saturday Should the script analyze this day? (true/false)
bool : _sunday Should the script analyze this day? (true/false)
Returns: A boolean - true if the current bar's day is one of the given days
atrFilter(float, float) Checks the current bar's size against the given ATR and max size
Parameters:
float : _atr (default=ATR 14 period) The given ATR to check
float : _maxSize The maximum ATR multiplier of the current candle
Returns: A boolean - true if the current bar's size is less than or equal to _atr x _maxSize
fillCell(table, int, int, string, string, color, color) This updates the given table's cell with the given values
Parameters:
table : _table The table ID to update
int : _column The column to update
int : _row The row to update
string : _title The title of this cell
string : _value The value of this cell
color : _bgcolor The background color of this cell
color : _txtcolor The text color of this cell
Returns: A boolean - true if the current bar falls within the given dates
Monthly Returns in PineScript StrategiesI'm not 100% satisfied with the strategy performance output I receive from TradingView. Quite often I want to see something that is not available by default. I usually export raw trades/metrics from TradingView and then do additional analysis manually.
But with tables, you can build additional metrics and tools for your strategies quite easily.
This script will just show a table with monthly/yearly performance of your script. Quite a lot of traders/investors used to look at returns like that. Also, it might help you to identify periods of time when your strategy performed good/bad than expected and try to analyze that better.
The script is very simple and I believe you can easily apply it to your own strategies.
Disclaimer
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting.
This post and the script don’t provide any financial advice.
Vertical line by bar_indexThis indicator helps in letting the trader focus on a particular date/candle across many symbols.
Tradingview currently has a bug in Bar Replay - when we switch symbols, the bar replay resets.
Hence if you are backtesting & running through a bunch of symbols, it is nearly impossible to focus on a particular historical candle across all symbols.
This indicator plots a vertical line on a given bar_index which remains as it is while you are switching symbols.
Feel free to copy, modify and use as you like!
Breadth Indicator : RVC-BNifty-Adv-Dec-LineBreadth Indicators
Summary : Script calculates Advance and Declain value based on weightage of each Bank share in BankNifty Index
Bank NIfty is not an asset and it does not have value.
It is composition based on multiple bank stocks with different weightage.
This tool display the indicator based on "Number of Stocks Moving on UP TICK" and "Number of Stocks Moving on DOWN TICK"
Currently this calculation is based on 12 stocks based on their weightage.
Axis Bank , Bank of Baroda
Federal Bank, HDFC Bank
ICICI Bank, IDFC Bank Ltd.
IndusInd Bank, Kotak Mahindra Bank
Punjab National Bank , RBL Bank
State Bank of India (SBI), Yes Bank
Data Source Crement AlertsSet DIfferent sources of the data you want
Set the levels for the alert
Sell is Crossing down on the higher and buy is crossing over the lower level
💧Klondike Watermarking Tool by Cryptorhythms💦Klondike Group Watermarking Tool by Cryptorhythms
👋Heirophant and the Cryptorhythms Team here with a script that is sorely needed....
💭I got to thinking about how so many scammers on telegram and other media reuse other peoples charts and analysis (sometimes selling them). I find the whole scheme repugnant. Consequently I wanted to help legitimate groups keep their intellectual property ownership and brand integrity.
👮This is for Chartists and Signals Groups both Public and Private. It helps to prevent copiers from stealing/reposting charts & signals. It watermarks the chart with an ascii art drawing.
There will be many groups to get one of these! Please dont ask for access as this is for their admins only.
But dont despair - there will be a public library watermarking script with a ton of funny trading memes in it for you to mess around with (estimated release in a week or so - just adding more watermarks).
💬 If your group is interested in a custom watermark, contact me and let me know! (They are free!)
🖖Happy Trading!
💦Gunbot Watermarking Tool by Cryptorhythms💦GunbotGroup Watermarking Tool by Cryptorhythms
👋Heirophant and the Cryptorhythms Team here with a script that is sorely needed....
💭I got to thinking about how so many scammers on telegram and other media reuse other peoples charts and analysis (sometimes selling them). I find the whole scheme repugnant. Consequently I wanted to help legitimate groups keep their intellectual property ownership and brand integrity.
👮This is for Chartists and Signals Groups both Public and Private. It helps to prevent copiers from stealing/reposting charts & signals. It watermarks the chart with an ascii art drawing.
There will be many groups to get one of these! Please dont ask for access as this is for their admins only.
But dont despair - there will be a public library watermarking script with a ton of funny trading memes in it for you to mess around with (estimated release in a week or so - just adding more watermarks).
💬 If your group is interested in a custom watermark, contact me and let me know! (They are free!)
🖖Happy Trading!
💧WCSE Watermarking Tool by Cryptorhythms💦WCSE Group Watermarking Tool by Cryptorhythms
👋Heirophant and the Cryptorhythms Team here with a script that is sorely needed....
💭I got to thinking about how so many scammers on telegram and other media reuse other peoples charts and analysis (sometimes selling them). I find the whole scheme repugnant. Consequently I wanted to help legitimate groups keep their intellectual property ownership and brand integrity.
👮This is for Chartists and Signals Groups both Public and Private. It helps to prevent copiers from stealing/reposting charts & signals. It watermarks the chart with an ascii art drawing.
WCSE is the first of many groups to get one of these! Please dont ask for access as this is for their admins only.
But dont despair - there will be a public library watermarking script with a ton of funny trading memes in it for you to mess around with (estimated release in a week or so - just adding more watermarks).
💬 If your group is interested in a custom watermark, contact me and let me know! (They are free!)
If you follow/subscribe to me, I apologize for any spam. Please dont unfollow, after this weekend there will be much less script publication spam.
🖖Happy Trading & Live Long and Prosper!
Rule Number 1 SignalsThis script takes the Rule #1 3 tools and plots them on the graph, to provide an additional level of indication for when to sell and when to buy.