Price density [Measuring Market Noise:Take advantage]$$ Market noise can be problematic to some types of trading strategies yet beneficial to others.
By measuring noise using the 'Price Density' can enable us to improve our
trading edge and turn noise to our advantage.
Robust analysis of noise can inform us when it is best to avoid trend-following
systems (when noise is too high), and vice versa for systems based on a
mean-reverting trading premise (when market noise is low).
__________________________________________________________________________
Using Noise to our advantage
* Two techniques:
-Measure Noise and trade when suitable for the system
~ High noise = avoid trend-following
~ Low noise = avoid mean-reversion
-Match assets to strategies
~ Only trade 'noisy assets' with Mean-reversion Strategies
~ Only trade 'efficient assests' with Trend-following Strategies
## Price density:-
High values = High noise
Low values = Low noise
___________________________________________________________________________
Disclaimer!! Do your own research
Breadth Indicators
Trend channel [log scale] with projection forecastTrend channel with projection forecast
This indicator is used to model data where growth or decay accelerates rapidly at first and then slows over time.
Because the channel distance is based off the largest pullback or highest peak within a trend, for effectively drawing and using this indicator it is recommended that this type of indicator is applied to mature trends .
This model is interesting for the long term series data (such as 10 or 20 years span) because can be plotted correctly on logarithmic charts .
Technical issues
*The user have to pan over the chart from the beginning to the end of the study range (such as 10 years of bars) so the pine script could generate those lines on the chart.
*If on the chart the number of bar is less than the lookback period, it won't generate any lines as well.
Disclaimer
Success in trading is all about following your trading strategy and indicators should fit into your own strategy, and not be traded purely on.
This script is for informational and educational purposes only. Use of the script does not constitute professional and / or financial advice. You are solely responsible for evaluating the outcome of the script and the risks associated with using the script. In exchange for the use of the script, you agree not to hold monpotejulien TradingView user responsible for any possible claims for damages arising out of any decisions you make based on the use of the script.
Moving Average Support and Resistance ChannelThe Moving Average Support and Resistance Channel is a channel that consists of trend lines of resistance and support of the analyzed instrument, represented as moving averages with the selected type and smoothing period on a certain timeframe, where:
- Middle Line - the middle of the channel (the moving average of the pivot point using the Floor Pivot method)
- R1 - first resistance (moving average of support + Factor*ATR)
- R2 - second resistance (R1 + Factor*ATR)
- S1 - first support (moving average of resistance-Factor*ATR)
- S2 - second support (S1-Factor*ATR)
- Factor-ATR multiplier
Despite the fact that the indicator consists of moving averages, it can work equally well both during a trend and in its absence.
Characteristics of the trend movement:
• During an uptrend, the moving averages of the indicator are directed upwards, the price is above the Middle Line level most of the time
• During a downtrend, the moving averages of the indicator are directed down, the price is below the Middle Line level most of the time
• During the flat period, the boundaries of the moving average channel narrow, the channel tends to align in a horizontal position, the price consolidates most of the time around the Middle Line level, fighting off the support and resistance levels of the indicator.
The position of asset prices outside the indicator may mean an early correction or trend reversal.
How to trade:
One of the trading methods may be that during a breakout or a pullback after a breakout of the Middle Line level, the target of further movement, depending on the direction of this movement, may be the levels R1, R2 or S1, S2. Use this situation to make a profit.
I wish you good luck in building your trading plans and remember: such indicators do not predict the future price movement on the chart, they only determine the characteristics of the price movement at the current time, taking into account historical data.
MyTradePartnerMyTradePartner strategy makes the cryptocurrency markets buy and sell automatically. 5 stoploss, fixed profit take and stoploss level can be customized from strategy settings. There are 4 separate strategies that you can set in the strategy. First of them, there are strategies that decide long and short positions in accordance with your settings at the pivot levels, second of the super trend, third of the potential return levels, third of the up and down breaks. Pyramiding can offer multiple entry points. Strategy back tests can be adjusted to the desired time period and can be used as spot or term if desired. Frostybot is set to work fully compatible with js when the necessary inputs are made from these strategy settings. When installing an alarm for FROSTYBOT JS, the alarm message field is {{strategy.order.alert_message}}.
FEATURES:
-Fully compatibly with Frostybot
-High Percent Profitable strategy up to %60
-İnclude five level Trailing Stoploss, fixed stoploss and takeprofit with position size management
-include four strategy mentably in one strategy use one, use two or both
-All settings are customizable. Create your unique strategy with settings.
On-Balance Volume Oscillator with Divergence and PivotsThis is On-Balance Volume recalculated to be an Oscillator, a Divergence hunter was added, also Pivot Points and Alerts.
On-Balance Volume, or OBV is considered a "leading indicator" - in contrast to a "lagging indicator" just as Moving Averages it does not show a confirmation what already happened, but it shows what can happen in the future. For example: The chart is climbing while the OBV oscillator is slowly declining, gets weaker and weaker, maybe even prints bearish divergences? That means that a reversal might be occurring soon. Leading indicators are best paired with Stop and Resistance Lines, general Trendlines, Fib Retracements etc...Your chart is approaching a very important Resistance Trendline but the OBV shows a very positive signal? That means there is a high probability that the Resistance is going to be pushed though and becomes Support in the future.
What are those circles?
-These are Divergences. Red for Regular-Bearish. Orange for Hidden-Bearish. Green for Regular-Bullish. Aqua for Hidden-Bullish.
What are those triangles?
- These are Pivots. They show when the OBV oscillator might reverse, this is important to know because many times the price action follows this move.
Please keep in mind that this indicator is a tool and not a strategy, do not blindly trade signals, do your own research first! Use this indicator in conjunction with other indicators to get multiple confirmations.
1k TICK arrowsThis plots green up arrows when the TICK index goes to -1,000 or lower or red down arrows when the TICK index goes +1,000 or higher. Can be used as a short term reversal signal (not investment advice). Will unfortunately plot on all charts but should only be relevant for US equity indices, mainly S&P500/ES futures. Indicator will adapt to the charts time frame and is hard coded to only show during 9:30-16:00 EST.
Times and Gold Zonethis indicator is to see all the time sessions but you have another session that you can change the hour to only see the best volatility of the pair you want
OBV + Simple Moving AverageThird time is a charm. On Balance Volume with simple moving average. Hopefully we don't get this kicked back to us.
[UTILS] Unit Testing FrameworkTL;DR
This script doesn't provide any buy/sell signals.
This script won't make you profitable implicitly.
This script is intended for utility function testing, library testing, custom assertions.
It is free and open-source.
Introduction
About the idea: is not exclusive, programmers tend to use this method a lot and for a long time.
The point is to ensure that parts of a software, "units" (i.e modules, functions, procedures, class methods etc), work as they should, meet they design and behave as intended. That's why we use the term "Unit testing".
In PineScript we don't have a lot of entities mentioned above yet. What we have are functions. For example, a function that sums numbers should return a number, a particular sum. Or a professor wrote a function that calculates something or whatever. He and you want to be sure that the function works as expected and further code changes (refactoring) won't break its behaviour. What the professor needs to do is to write unit tests for his function/library of functions. And what you need to do is to check if the professor wrote tests or not.
No tests = No code
- Total test-driven development
Ok, it is not so serious, but very important in software development. And I created a tool for that.
I tried to follow the APIs of testing tools/libs/frameworks I worked or work with: Jasmine (Javascript), Mocha/Chai (Javascript), Jest (Javascript), RSpec (Ruby), unittest (Python), pytest (Python) and others. Got something workable but it would be much easier to implement (and it would look much better) if PineScript had a higher-order functions feature.
API
_describe(suiteName: string)
A function to declare a test suite. Each suite with tests may have 2 statuses:
✔️ Passed
❌ Failed
A suite is considered to be failed if at least one of the specs in it has failed.
_it(specName: string, actual: any, expected: any)
A function to run a test. Each test may have 3 statuses:
✔️ Passed
❌ Failed
⛔ Skipped
Some examples:
_it("is a falsey value", 1 != 2, true)
_it("is not a number", na(something), true)
_it("should sum two integers", _sum(1, 2), 1)
_it("arrays are equal", _isEqual(array.from(1, 2), array.from(1, 2)), true)
Remember that both the 'actual' and 'expected' arguments must be of the same type.
And a group of _it() functions must be preceded by a _describe() declaration (see in the code).
_test(specName: string, actual: any, expected: any)
An alias for _it . Does the same thing.
_xit(specName: string, actual: any, expected: any)
A function to skip a particular test for a while. Doesn't make any comparisons, but the test will appear in the results as skipped.
This feature is unstable and may be removed in the future releases.
_xtest(specName: string, actual: any, expected: any)
An alias for _xit . Does the same thing.
_isEqual(id_1: array, id_2: array)
A function to compare two arrays for equality. Both arrays must be of the same type.
This function doesn't take into account the order of elements in each array. So arrays like (1, 2, 3) and (3, 2, 1) will be equal.
_isStrictEqual(id_1: array, id_2: array)
A function to compare two arrays for equality. Both arrays must be of the same type.
This function is a stricter version of _isEqual because it takes into account the order of elements in each array. So arrays like (1, 2, 3) and (3, 2, 1) won't be equal.
Usage
To use this script to test your library you need to do the following steps:
1) Copy all the code you see between line #5 and #282 (Unit Testing Framework Core)
2) Place the copied code at the very beginning of your script (but below study())
3) Start to write suites and tests where your code ends. That's it.
NOTE
The current version is 0.0.1 which means that a lot of things may be changed on the way to 1.0.0 - the first stable version.
COIN FX PRO TRADERCoin Fx Pro strategy makes the cryptocurrency markets buy and sell automatically. 5 stoploss, fixed profit take and stoploss level can be customized from strategy settings. There are 4 separate strategies that you can set in the strategy. First of them, there are strategies that decide long and short positions in accordance with your settings at the pivot levels, second of the super trend, third of the potential return levels, third of the up and down breaks. Pyramiding can offer multiple entry points. Strategy back tests can be adjusted to the desired time period and can be used as spot or term if desired. Frostybot is set to work fully compatible with js when the necessary inputs are made from these strategy settings. When installing an alarm for FROSTYBOT JS, the alarm message field is {{strategy.order.alert_message}}.
For best back test performance results. Use it
BTCUSDTP and 5 MIN TIME FRAME!!!
REAL MARKET RATESBased on near and long term eurodollar yield curve. Attempts to indicate, through a spread median, how major players may position themselves in the near future.
Coppock Curve Correlation MTF & Slopes - Long Strategy- This strategy is based on the Coppock Curve Correlation MTF & Slopes tool
- Condition for entry is very simple :
-> If the correlation of 8 timeframes expressed by 4 curves reaches 1 or -1
-> and the Coppock curve and the Coppock Slope (on 3 periodes back) are rising => then entry.
(You can also visually look at : orange/yellow dot on the slope wave and green flag).
- There's the possibility to trail stop loss and multiple take profit levels.
- Back testing period setting.
- I've added the possibility to extend the lookback period of the correlation for the curves.
- Results could be interesting with a well managed trailing stop loss / take profit and trading on higher time frames.
Market spot - ADA/USDT
Timeframe = 3min
Coppock Curve Correlation between MTF & SlopesMy first tool !
1. The waves shows the slope of the curve. The front one = 3 periods, back one = 2 periods, difference = white area.
2. The moving lines shows the curve correlation between 2x 2 time frames (adjustable on the settings) on 2 periods lookback.
2.1 Theres few regions of high correlation, lines are at (absolute values) 0.5, 0.75, 1
3. On the top there's the Coppock curve -> if falling since 1 period = red, else green.
4. Diamonds shows : if correlation is in the strong correlation area and slope is falling or rising : red or green diamond.
This tool could be interesting to have an idea if there's strong correlation between timeframes instead of watching 4-5 different timeframes !
Nasdaq main tickers strength gauge A kind of bandwidth indicator for Nasdaq index.
A widget to get an overview to the current market.
Part 1: Strength index
How the indexing work:
For each ticker, we obtain an indexed value (base on the distance from central price value) which gauge the relative strength of each global index.
How to read the curve:
The value is based on the location from the band.
1 : price is reached its level 1 upper band.
-1 : price is reached its level 1 lower band.
Above zero, means the price is above mid-price of the day. It is probably receiving a positive capital inflow
Exceed the boundary(-1, 1): more likely there is a drift on that direction for that moment.
The calculation method is discussed on my last publication:
Part 2: All time high table
How to read the table (new update):
It is how far from the "All time high " Value
If the percentage is smaller than 1% (very close to break all time high), it will be shown in red.
If the percentage is smaller than 3% (close to break all time high), it will be shown in yellow.
Those highlighted tickers are considered as the leader stocks for the Nasdaq
On Balance Volume - Color Packed Patch'emOBV is provided as a built-in by TradingView.
This contribution grew out of reading about trend discovery, and since the library kept on this end was lacking in a volume-centric indicator, it looked like a good time to play around.
This approach isn't all that much different than many others with the possible exception of its color scheme.
Should you decide to use the script, it might be worth your while to work with the logic of color and line, to produce alerts.
Enjoy.
+ Rate of Change (and OBV)The Rate of Change, or RoC, is a momentum indicator that measures the percentage change in price between the current period and the price n periods ago. It oscillates above and below a zeroline, basically showing positive or negative momentum. I applied the OBV's calculation to it, but without the inclusion of volume (also added a lookback period) to see what would happen.
Actually what happened was I was looking at hot-rodding the OBV indicator, but then wondered if I could apply the cumulative calculation to another indicator to see what would happen. Not sure why I chose the Rate of Change, but it seemed a neat idea. And it worked! And so I called it the "Cumulative Rate of Change." I only recently realized that this is actually just the OBV without volume, HOWEVER the OBV does not have a lookback period, and its source is the close of each period. Basically, when you look at the calculation for the OBV you'll notice that it's a cumulative measure of the "change" of the closing price against the previous close times the volume. The Rate of Change is basically that measurement over more than one period, excluding the volume, and is not cumulative. Thus the "Cumulative Rate of Change" is basically an OBV without the volume but with the capability to adjust the lookback period.
Anyway, after days and weeks of playing with the indicator pretty infrequently I did decide that I actually really liked it, especially with the addition of moving averages and bollinger bands. So I decided to play with it a bit more.
I added a drop-down menu to include the standard Rate of Change indicator, and then thought I may as well add the OBV too, in case someone might like to compare that to the C-RoC, or just wants an OBV with myriad moving averages and bollinger bands.
By default I have the indicator set to the "C-RoC" and the lookback is set to 1, but play with longer settings (this is pretty much necessary if using the traditional RoC, which is by default set to 10 in TradingView, and is nigh on useless at 1).
I also recommend playing with the source. 'Close' is nice, but 'ohlc4' provides some very nice signals as well, as it follows the price flow for each period completely, filtering the noisiness of 'close' as source.
Hope you guys like this. With the bollinger bands and your preferred moving average settings this can be a powerful tool for re-entering trades in trend, taking profits, determining momentum swings.
Smart On Balance Volume MTFSmart On Balance Volume
And constructed this indicator to have a variation of the conventional volume, the on balance volume is an indicator that is not given much value when I think that it is a formidable underlying basis of what is happening more when some etf cannot be measured with the PVI or NVI.
The Stochastico is built with the OBV signal of 3 different time frames, as it is for daily work
Has multiple settings and signals =
Color in overbought and oversold zones
visual alerts of crossovers in overbought and oversold zones
Alerts in for TDW on overbought and oversold
Signal length for% K
Signal length for% D
Smoothing length for% K and% D
A switch is added to toggle between the 3 time frames and the main one
Switch is added so you can see the original OBV
A switch is added to change the color in the bars
If you like it and find it useful please leave the comments below
Lumber to Gold ratioDISCRIPTION:-
Lumber to gold ratio helps to predict up upcomming market correction as investors are flocking towards safe heaven.
USE CASE SCENARIO:-
If the ratio is above the zero horizontal line it is a risk of scenario
If the ratio plunge below zero it might show imminent market correction.
BUFFET INDICATORDISCRIPTION
The stock market cap to GDP ratio has become known as the Buffett Indicator in recent years, as Warren Buffett commented that he believes it is “probably the best single measure of where valuations stand at any given moment.”
CALCULATION
100*VALUE OF ALL STOCKS IN COUNTRY/GDP OF COUNTRY
100*wilshire5000/gdp
Trend Background by Alejandro PThis indicator is a comprehensive trend indicator designed to help traders filter market conditions for their trading.
The indicator has the option to use a classic Simple Moving Average as a trend filer or a more advanced Simple Moving Average Slope.
The indicator can also use the Aroon indicator as the trend filter and both the SMA and Aroon can be used together to only trade in strong trends.
The Simple Moving Average Slope and the Aroon filters can allow you to filter our 3 market conditions. 1- Upwards Trend, 2- Downwards Trend, 3- Ranging
By tuning these filters to your strategy you can make sure you are only taking trades when the trend is on your side and you can even filter out ranging market conditions to trade the best strategies depending on the market conditions.
Technical details:
If the Simple Moving Average filter is on and the Slope filter if off the indicator will determine the trend by where the price is relative to the moving average. If the price is higher than the SMA then the trend will be bullish, if the price is below the SMA the trend will be bearish.
If SMA filter and Slope FIlter are both on then the trend es defined by the slope of the SMA, this means that if the SMA slope is increasing then the trend will be bullish, if the slow is negative then it will be bearish, but if the slope is within a certain percentile that is classified as neutral then there will be no trend or a neutral market.
If the Aroon filter is enabled this will calculate the trend by the percent of candles with new highs or lows in a similar way as the SMA slope filter works
If both filters are enabled then both filters will have to coincide for a bull or bear trend to be determined.
Forex bot full strategy with risk managementThis is a full strategy designed for forex major pairs, specially EUR/USD using 1h time frame chart.
Its components are
200 EMA
MACD
OBV
PSAR
RIsk management with tp and sl movements
Rules for entry
For long = Previous histogram from MACD was below 0 and current one is above 0. CLose of a candle is above EMA 200 , OBV oscillator is negative and we have an uptrend from PSAR
For short = Previous histogram from MACD was above 0 and current one is below 0. CLose of a candle is below EMA 200 , OBV oscillator is positive and we have an downtrend from PSAR
Rules for exit
For tp and sl values we calculate the distance from the close of candle until the psar values.
If you have any questions, let me know !