Total Bars CalculatorThis indicator simply plots how much bars are available to the user in the respective chart.
For Example if plot shows 5000 , therefore you have total 5000 bars of OHLC available.
Tool
SizeblockPrice change indicator in the form of diagonal rows.
The calculation is based on the percentage or tick deviation of the price movement (indicated in the "Deviation" parameter), which is displayed on the chart in the form of rows.
The row consists of the base middle line, upper and lower limits:
The middle line is the basis for the upper and lower limits of the current row.
The upper and lower limits are deviations from the base middle line of the current row.
The base middle line is equal to the upper or lower limits of the previous row (if the price changes rapidly in one time interval, then the base middle line of the current row is greater than the upper limit of the previous row or less than the lower limit of the previous row by an equal number of deviations depending on the direction of price movement). At the beginning of the calculation, the base middle line is equal to the initial value of the first row.
The "Quantity" parameter determines the deviation for the upper or lower limits depending on the direction of the price movement, and the "U-turn" parameter determines the deviation for changing the direction of the price movement.
The rule for constructing a new row:
The "Source" parameter accepts, depending on the choice, the price of high, low values or the closing price from the time interval of the chart.
When the price reaches the upper or lower limits of the row and goes beyond them, a new row is formed with the same parameters for deviation of the upper and lower limits from the base middle line, depending on the direction of price movement.
By adjusting certain deviations, you can clearly see the local trend and reversal points on the chart.
A useful tool for tracking price direction.
Thanks for your attention!
[MiV] Trading SessionHello, everyone!
Today I want to present my new script, which I hope will help not only me!
I'm sure that many people, like me, went through such a stage as "building their strategy". This is when you sit and test on the history how you would enter or exit a trade.
Recently I was doing the same thing and realized that my "tests" involve night time, when in reality I would be asleep and not trading! So I decided to create an indicator that would display my "working hours" so that the backtest I conduct would be as realistic as possible.
Also this indicator is able to display sessions of major exchanges and forex working hours, so it will be useful not only for cryptocurrency lovers.
In addition, we don't always trade every day and, for example, I don't trade on Sunday. That's why we added a feature that "turns off" the day and does not highlight it in color if you're not planning to trade on that day.
And finally, I added a notification of the beginning and end of the trading session. A small thing, but it may also be a useful feature for those who like to sit at the chart!
I will be glad to receive any comments and suggestions!
-----
Всем привет!
Хочу сегодня представить свой новый скрипт, который, надеюсь, поможет не только мне!
Уверен, что многие, как и я, проходили такой этап как "постройка своей стратегии". Это когда ты сидишь и тестируешь на истории то как бы ты входил или выходил из сделки.
Вот недавно я ровно также занимался этим и осознал, что мои "тесты" затрагивают и ночное время, когда в реальности я бы спал и не торговал! Поэтому я решил создать индикатор, который будет отображать мои "рабочие часы", чтобы бектест, который я провожу, был максимально реалистичным.
Также данный индикатор умеет отображать сессии крупных бирж и время работы форекса, так что полезным он будет не только для любителей криптовалюты.
Кроме того, мы же не всегда торгуем каждый день и например я не торгую в воскресенье. Поэтому добавлен функционал, который "выключает" день и не подсвечивает его цветом, если ты в этот день не планируешь торговать.
Ну и в заключении, добавил уведомление о начале и завершении торговой сессии. Мелочь, а тоже может быть полезной фичей для тех кто любит засесть за графиком!
Буду рад любым замечаниям и предложениям!
Pip CrosshairsThis is a simple tool designed to help you visualize your stop loss and take profit levels before entering a trade. The tool plots two lines on the chart - a green dotted line for take profit and a red dotted line for stop loss (similar to the price line) - with a simulated default spread of one pip factored in. The indicator has the option to toggle between long and short positions.
Please note that the spread used in the tool is not based on your actual spread and should be adjusted accordingly. As, to the best of my knowledge Pine Script does not have the ability to automatically include spread in an indicator, so you will need to input your spread manually. (if you can please let me know cause that would be a game changer).
Overall, should help save you a bit of time by not having to manually measure stop loss and take profit levels for each trade.
Happy hunting :)
Time of Day - Volatility Report█ OVERVIEW
The indicator analyses the volatility and reports statistics by the time of day.
█ CONCEPTS
Around the world and at various times, different market participants get involved in the markets. How does this affect the market?
Knowing this gets you better prepared and improves your trading. Here are some ideas to explore:
When is the market busy and quiet?
What time is it the most volatile?
Which pairs in your watchlist are moving while you are actively trading?
Should you adjust your trading time? Should you change your trading pairs?
When does your strategy perform the best?
What entry times do your winners have in common? What about the exit times of your losers?
Is it worth keeping your trade open overnight?
Bitcoin (UTC+0)
Gold (UTC+0)
Tesla, Inc. (UTC+0)
█ FEATURES
Selectable time zones
Display the statistics in your geographical time zone (or other market participants), the exchange time zone, or UTC+0.
Configurable outputs
Output the report statistics as mean or median.
█ HOW TO USE
Plot the indicator and visit the 1H timeframe.
█ NOTES
Gaps
The indicator includes the volatility from gaps.
Calculation
The statistics are not reported from absolute prices (does not favor trending markets) nor percentage prices (does not depict the different periods of volatility that markets can go through). Instead, the script uses the prices relative to the average range of previous days (daily ATR).
Extended trading session
The script analyses extended hours when activated on the chart.
Daylight Saving Time (DST)
The exchange time or geographical time zone selected may observe Daylight Saving Time. For example, NASDAQ:TSLA always opens at 9:30 AM New York time but may see different opening times in another part of the globe (New York time corresponds to UTC-4 and UTC-5 during the year).
MFE & MAE ToolThis is a simple implementation of the MFE/MAE Tool for TradingView.
It's a quite powerful tool and pretty useful in systematic trading, but I don't see many trader using it these days.
It's created for EMA cross, but you can easily change it to use your own signals.
What is MAE/MFE Tool
MAE stands for Maximum Adverse Excursion - Worst P&L during the trade
MFE stands for Maximum Favorable Excursion - Best P&L during the trade
The idea is pretty simple. We take only signals without any position management or exits and measure the best/worst P&L for the next X bars after the signal was.
The primary use case for it is to understand how good your signals are .
If you'll add complicated money management tools, exits, and SL/PT to your strategy, it brings quite a lot of noise. After that, it's pretty tricky to understand if your signals bring much information about future price movements. In other words, bad money management can ruin good signals, and you might discard the entire strategy without knowing that. So this is why I think it's important to check the quality of your signals separately.
Another simple way to use it is to estimate where to put SL/PT
In this example, we're computing MAE/MFE in percent. We're plotting it both on the chart and computing some statistics based on it. This is why it's pretty easy to get a quick understanding of what is your SL/PT should be.
MAE/MFE tool consists of a:
Chart - it displays a point for every signal. Long/Short trades can have different colors. On hover you'll see details for this signal.
Table with stats - we're computing basic metrics for these Signals like average/min/median/max MAE/MFE, number of trades, and how many trades hit selected SL and PT. Stats are also separated by the side so you can see performance separately for longs and shorts.
The indicator is highly customizable, you can configure:
Bars you want to use to compute MAE/MFE
Side selection
SL and R:R
Styling of the chart
Position and style of the table
Parameters for the EMA
EMA cross and its parameter were selected randomly, so don't estimate to see a great performance here.
MFE/MAE tool is a pretty powerful concept. At some point, I'll create an entire article in my blog with more examples and descriptions.
Thanks to @MUQWISHI for helping code it.
Disclaimer
Please remember that past performance may not indicate 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.
Premium Linear Regression - The Quant ScienceThis script calculates the average deviation of the source data from the linear regression. When used with the indicator, it can plot the data line and display various pieces of information, including the maximum average dispersion around the linear regression.
The code includes various user configurations, allowing for the specification of the start and end dates of the period for which to calculate linear regression, the length of the period to use for the calculation, and the data source to use.
The indicator is designed for multi-timeframe use and to facilitate analysis for traders who use regression models in their analysis. It displays a green linear regression line when the price is above the line and a red line when the price is below. The indicator also highlights areas of dispersion around the regression using circles, with bullish areas shown in green and bearish areas shown in red.
Quantitative Price Forecasting - The Quant ScienceThis script is a quantitative price forecasting indicator that forecasts price changes for a given asset.
The model aims to forecast future prices by analyzing past data within a selected time period. Mathematical probability is used to calculate whether starting from time X can lead to reaching prices Y1 and Y2. In this context, X represents the current selected time period, Y1 represents the selected percentage decrease, and Y2 represents the selected percentage increase. The probabilities are estimated using the simple average.
The simple average is displayed on the chart, showing in red the periods where the price is below the average and in green the periods where the price is above the average.
This powerful tool not only provides forecasts of future prices but also calculates the distribution of variations around the average. It then takes this information and creates an estimate of the average price variation around the simple average.
Using a mean-reverting logic, buying and selling opportunities are highlighted.
We recommend turning off the display of bars on your chart for a better experience when using this indicator.
Unlock the full potential of your trading strategy with our powerful indicator. By analyzing past price data, it provides accurate forecasts and calculates the probability of reaching specific price targets. Its mean-reverting logic highlights buying and selling opportunities, while the simple moving average displayed on the chart shows periods where the price is above or below the average. Additionally, it estimates the average variation of price around the simple average, giving you valuable insights into price movements. Don't miss out on this valuable tool that can take your trading to the next level
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!
Signal ViewerThe "Signal Viewer" script is a debugging tool that can be used for the signal of a Signal Indicator script like the "Two MA Signal Indicator" or the "Template Signal Indicator". This script will visualize the signal based on the convention that was defined in the settings. Also, alerts will be produced based on this convention. It's useful to be used before you connect the signal indicator script to a template strategy like the "Template Trailing Strategy" script. You can cross-validate the correctness of the signal that the indicators emit and make sure it is aligned with the expected behavior after the decomposition of the signal using the convention described in the settings. Please make sure that the connection in the "Signal Viewer" script matches the convention used by the template strategy script.
Probabilities Module - The Quant Science This module can be integrate in your code strategy or indicator and will help you to calculate the percentage probability on specific event inside your strategy. The main goal is improve and simplify the workflow if you are trying to build a quantitative strategy or indicator based on statistics or reinforcement model.
Logic
The script made a simulation inside your code based on a single event. For single event mean a trading logic composed by three different objects: entry, take profit, stop loss.
The script scrape in the past through a look back function and return the positive percentage probability about the positive event inside the data sample. In this way you are able to understand and calculate how many time (in percentage term) the conditions inside the single event are positive, helping to create your statistical edge.
You can adjust the look back period in you user interface.
How can set up the module for your use case
At the top of the script you can find:
1. entry_condition : replace the default condition with your specific entry condition.
2. TPcondition_exit : replace the default condition with your specific take profit condition.
3. SLcondition_exit : replace the default condition with your specific stop loss condition.
Position Size ToolUpdated - Version 2
This tool is used to calculate the size of a trade.
Settings - Type in total account size and % of capital that can be risked on each trade.
The table will display:
Column 1 - Stop placement based on low, mid or high value of the current candle.
Column 2 - Percent risk on the trade.
Column 3 - Amount of shares that can be traded (calculated from account size, risk and selected stop placement).
Green color is intended for long position, stop at the low of the candle.
Red color is intended for short position, stop at the high of the candle.
Middle value can shift between either color since its measured from open to close.
[Mad] Active LineThis is a simple line tool that can give you active feedback based on the closing price.
It is intended for a live chart whose ticker is not changed by the user every 10 minutes, like a general overview of an asset in a higher time frame.
What can it provide:
Price difference from the price to the line
Price at the current collision point
How to use it:
When opened, it requests 2 input points from you.
After you set these 2 points, it will set the "Active Line" for you, like the normal TV line.
One thing to know is that you can't place into the future, so "extend" is always on by default.
and as always, have fun trading the assets up and down :-)
[Mad] Exchange liquidationThis is just a basic tool to calculate liquidation based on:
margin-maintenance
leverage
it starts drawing on your input point short and long liquidation, so you can easily place it on your trade and drag it around if you are rebuying as an example.
Also, you can use it to aim for a specific support/resistance to see if it is even possible to reach some levels, which leverage you can use...
It additionally delivers live data based on the actual close to the 2 liquidation points
have fun
[MAD] Fibonacci retracementThis is just a Fibonacci Retracement tool with some interactive information based on the actual closing price
How to use:
add the script,
input left bottom with the 1st click,
input top with the 2nd click
Informations you can see than:
Fiblevel (Price) %till_this_point = pricedifference
additional:
Bottom of the fib
Range Up in % + Price-Range
Range Down in %
you can shift the comma with the decimal functions for trading shitcoins as example
if looking into the past, level/price will follow, liveinfo using the close is than hidden
what will follow:
reverse
log/linear
autogrow when range will be wicked
maybe alerts on levels... have to think about how to capture correctly
NNFX Exposure UtilityOVERVIEW
This tool allows the user to manually keep track of how much of their account is currently exposed to each currency, and keep that information handy and organized on the chart as a table.
It is specialized for NNFX traders who are trading all the pairs among the 9 major currency crosses: AUD, CAD, CHF, EUR, GBP, JPY, NZD, SGD, USD.
HOW DO I USE THIS INDICATOR?
Before you take a trade, you should open the indicator settings for this indicator and check off which currencies you are about to go long and short on. Here are 3 trades taken as examples:
If you go long on EUR/USD with 2% risk, your exposure is 2% long on EUR and 2% short on USD.
Then if you go short on GBP/SGD with 2% risk, your exposure is 2% short on GBP and 2% long on SGD.
But if you go long on SGD/JPY with 2% risk, your exposure would now be 4% long on SGD and 2% short on JPY. This is against your rules if you are trading the NNFX way. So this tool allows you to see when you are about to accidentally overexpose yourself to any currency pair.
VolatilityVolatility - The amount of price deviation in the specified time interval.
The calculation is made from the opening point to the closing point, and the maximum and minimum deviation between them is also included. Any timeframes are supported.
Available information: the start date of the calculation (according to the time zone of the exchange), the current volatility from the initial opening point or from the last closing point, the total volatility for all periods.
An indicator of useful use in everyday work.
Thanks for your attention!
watermarkOverview
This indicator allows you generate a watermark in your charts for your live streams without using additional software.
Features
The main differences with respect to the available tools are:
_ This indicator converts a input text to ascii art in a easy way. That means you won't need to run externals scripts to generate the data required.
_ The watermark can be configured to repeat the message to cover the whole screen or only a specific part.
_ Programmers can use this code as a reference to include additional fonts using ascii art in their charts.
Settings
Below are the available inputs used to configure the watermark:
Text : it's the message shown.
Style : it selects the font style.
Color : the color used in the watermark.
Size : this is used to change the font size.
Position : where the watermark will be applied.
Repetition : number of rows and columns where the watermark is displayed.
Spacing : it defines the horizontal and vertical spacing between the watermarks.
Enable frame : it includes a frame in the watermark.
If you think this type of tools are useful, please consider leave a comment and contact me for additional features.
Ness92
[TT$] Trade Tracker - By BlueJayBirdUSE:
- For visually tracking your trades in a floating pane (label).
- Most of the features are described in the image.
MAIN FEATURES:
- Better long-position and short-position tool wannabe.
- Visual data for tracking your trade position.
- Automatic setting of some common values in trades risk management.
- Switching from long-position to short-position can be done by just dragging the target or the entry point around.
EMOJIS:
- ⏰ Entry time: : Confirmed manually when the tool is added to the chart.
- 🎲 Entry: Confirmed manually when the tool is added to the chart.
- 🎯 Target: Confirmed manually when the tool is added to the chart.
- ⛔ Stop-Loss: Set automatically by the code.
- 🪓 Break Even: Set automatically by the code.
- 👻 Else: Set manually from the settings.
- 💲 Current: Automatic.
NOTES:
- Be aware of the "time zone" feature. Change it to the time you're currently using for your trades.
- QUOTE use is really optional. I'd rather not use it.
- The 👻 is just an extra feature. Do whatever you want with it (example: for pointing out a dangerous zone).
- 💱: "Fee" feature is not working, but it will. Sorry for that.
[5F] Multi clocks📋 Description :
This script displays three customizable clocks.
You can use it on chart too.
Works only in real time, not for replay.
🛠 Options :
Activate or not each clock
Time zone
Color and size in % of text and background
The script can be placed on the chart and in this case it is possible to change the position of each clock
Thanks to all Pinecoders who share their work with the community, in particular (non exhaustive list) :
LonesomeTheBlue, RafaelZioni, dgtrd, allanster, JayRogers , ChuckBanger, cheatcountry, NeoButane, ChrisMoody, QuantTherapy, J-Streak, makit0, john_everist, JustUncleL, everget, Duyck, KivancOzbilgic, LucF, HammondB3, blackcat1402, alexgrover, Mohamed3nan, DonovanWall, RicardoSantos, LazyBear, PRO_Indicators, theheirophant, midtownsk8rguy, e2e4mfck, SeaSide420, xel_arjona, RagingRocketBull, yatrader2, racer8, xdecow, Daveatt, QuantNomad, ceyhun, BigBitsIO, tista, aamonkey, rthomson, bgeraghty, pAulseperformance, rumpypumpydumpy
Another example :
Line Chart Enhancer by makuchakuTradingview has a good line chart, but I wanted to make it even more awesome.
Some shortcomings which this line chart enhancer script fixes
Colors up move as green, down move as red (you can change them as you like)
Plots high and low - so that one can be aware about what the price is doing
To achieve the look with markers as shown above
Goto Symbol settings > Type > Select "With Markers"
Feedback welcome!
Tradingview ToolkitA new trader's biggest barrier to entry is lack of understanding where they are in terms of time and price and with tradingview free they are often limited to just 1 or 2 extra indicators as many new traders slap on RSI and MACD as 2/3 free ones. While these indicators are fine for trend analysis, its important to know where the price is in relation to time. Thus, this all-in-one script is meant to have a lot of customizable utility to save on indicator spots and act as a hotspot for many common needs.
-2 Sets of VWAP line w/ standard deviation bands with customizable timeframes.
-1 more customizable timeframe VWAP line (no std dev bands) to use as a long time frame reference
-Ability to plot previous VWAP close prices over current timeframe on all VWAP lines w/ basic color changing if price closes above/below
-2 Sets of Bollinger Bands with customizable source length and MA type
-3 customizable moving averages with custom timeframe/resolutions
-Inside candle barcolor repainter to easily notice if a candle was inside the range of the previous candle (price contraction)
Not meant to have everything on at once, but simply a place to enable and disable different things and save spots for more important things
Bitcoin 2-Year MA Multiplier by GodtrixHi guys, I found this tool very useful and accurate, but can't find it on Trading View, so I made one for myself and everyone here ;)
Alert is available too.
Indicator Overview
The 2-Year MA Multiplier is intended to be used as a long term investment tool.
It highlights periods where buying or selling Bitcoin during those times would have produced outsized returns.
To do this, it uses a moving average (MA) line, the 2yr MA, and also a multiplication of that moving average line, 2yr MA x5.
Note: the x5 multiplication is of the price values of the 2yr moving average, not of its time period.
Buying Bitcoin when price drops below the 2yr MA (green line) has historically generated outsized returns. Selling Bitcoin when price goes above the 2yr MA x 5 (red line) has been historically effective for taking profit.
Why This Happens
As Bitcoin is adopted, it moves through market cycles. These are created by periods where market participants are over-excited causing the price to over-extend, and periods where they are overly pessimistic where the price over-contracts. Identifying and understanding these periods can be beneficial to the long term investor.
This tool is a simple and effective way to highlight those periods.
Credit to & Created By
Philip Swift
Date Created
July 2017
BITSTAMP:BTCUSD