[RESEARCH] Custom Median vs Built-in MedianI compared custom median (using the sorting solution by @apozdnyakov) with built-in median (using percentile_nearest_rank function)
If you see the zero line this means the solutions give the same results.
The best results was achieved on the odd lengths.
Conclusions:
1) Do not try to reinvent the wheel.
2) Always check the Pine Script docs to find already implemented solutions.
在腳本中搜尋"采列VS新圣徒"
MY_CME eod OI vs CFTC eow OIDaily e-o-d Open Interest as published by CME.
As CFTC COT Open Interest relates to last Tuesday, here you can have an idea how things evolved day-by-day since then.
As CME total OI is not accessibl as data, here I sum OI of the next 9 outstanding contracts, which gives a fair idea of the trend in OI
Relative Performance between between Stock and SPXSimply plots the close to close performance of your instrument vs SPX below your main chart
Offers further SMA of EMA of such relative performance to get a better idea of the relative strength against the major market
XRPUSDSHORTS XRPUSDLONGS - Bitfinex XRP Shorts & Longs// Created by titanlyy
// This script was inspired by @autemox who created the BTC version of this.
// I was looking for an easy script to display XRP Longs vs Shorts, at the moment of publishing this indicator, XRPUSD Shorts are very near ATH
// Hope this helps. Peace out.
// 7th September 2018
Multi SMA EMA WMA HMA BB (5+5 MAs + Bollinger Bands) MTF by RRBMulti SMA EMA WMA HMA BB (5+5 Moving Averages of Any Type with Bollinger Bands) MTF by RagingRocketBull 2018
Version 1.0
This indicator shows multiple MAs of any type (SMA EMA WMA HMA etc) with BB and MTF support
There are several versions: Simple, MTF, Pro MTF and Ultimate MTF. This is the MTF version. The Differences are listed below. All versions have BB
- Simple: you have 2 groups of MAs that can be assigned any type (5+5)
- MTF: +assign 1 custom Timeframe to any group combo (5+5 Custom TF)
- Pro MTF: +multiple Timeframes for multiple MA groups (4*3 MTF), horizontal levels and show max bars back options
- Ultimate MTF: +individual settings for each MA, multiple Timeframes
There are 2 groups of MAs, 3rd group is BB. You can:
- show/hide all MAs in a group. Use length 0 to hide a particular MA independently or uncheck in Style.
- apply any MA type to all MAs in a particular MA group. For example, you can assign all EMAs the HMA type. Groups are called EMAs and SMAs just for reference.
- assign Custom Timeframe to a particular MA/BB group combination or all groups. For example, show daily (D) EMAs+SMAs on H1 Timeframe, or only H4 (240) BB on H1.
You can use different types of MAs as dynamic S/R levels to trade of off and MA crosses as signals for possible trend change (golden/death bull/bear crosses).
Current Timeframe MAs can be used together with Custom Timeframe MAs on a single chart. Higher TF MAs are more important than lower TF MAs.
Most common MA types are: SMA, EMA, WMA, HMA.
Most common MA lengths are: 12, 20, 26, 30, 50, 100, 200, 400 etc.
MTF Notes:
- Script UI uses simple timeframe textbox instead of input resolution dropdown to allow for 240 120 and other custom TFs
- Groups that are not assigned a Custom TF will use Current Timeframe (0).
- MTF will work for any MA type assigned to the group. BB group always uses SMA type.
- MTF works both ways: you can display a higher TF MA/BB on a lower TF or a lower TF MA/BB on a higher TF.
- MTF MA values are normally aligned at the boundary of their native timeframe. This produces stair stepping when a higher TF MA is viewed on a lower TF.
Therefore Point Density/Smoothing is applied by default on MA MTF for visual aesthetics. Set to 0 to disable and see exact ma mtf values (lines with stair stepping and original mtf alignment).
- Smoothing is disabled for BB MTF because fill doesn't work with smoothed MAs after duplicate values are replaced with na.
- MTF MA Value fluctuation is possible on the current bar due to default security lookahead
Features:
- 2 groups of custom 5+5 MAs of any type including Hull Moving Average (HMA)
- BB
- 1x Custom Timeframe with step line smoothing for 3 groups (MAs + BB)
1. based on 3EmaBB, uses plot, fill, security, change, barstate, stdev and custom hma functions
2. you can't set certain constants from input due to Pinescript limitations - change the code as needed, recompile and use as a private script version
3. you can't have plot* inside ?/if/for/function, and implementing condition forks using 2 sets of plots (na vs non-na) doubles indicator params and styles - confusing
4. swma has a fixed length = 4, alma and linreg have additional offset and smoothing params
Feel free to use. Good Luck!
MA Ribbon HA* Inspired by Krypt's and Madrid's Ribbon
* Supplemental to bullish or bearish trend confirmations with Heikin Ashi candles (e.g. 10/20 MA cross)
* Default of: MA 5-55, 100 and 200
* Ability to switch between Simple vs Exponential MAs
You may switch color gradient by using this tool,
www.perbang.dk
Hope this helps. Please do let me know if you know how to script the wishlist below =)
Thanks!
---
Wishlist/to do next:
1. Be able to do this color change on counter-trend by implementing this script from Madrid's:
leadMAColor = change(ma05)>=0 and ma05>ma100 ? lime
: change(ma05)<0 and ma05>ma100 ? maroon
: change(ma05)<=0 and ma05=0 and ma05
change(ma)>=0 and ma05>maRef ? lime
: change(ma)<0 and ma05>maRef ? maroon
: change(ma)<=0 and ma05=0 and ma05
na(src ) ? na : src
...
price = dropn(src, dropCandles)
3. Be able to update line thickness of E/MA 10 & 20, as well as their colors.
4. A way to input two HEX colors and automatically update the ribbon lines to have those color gradient.
DMI ADX TREND 2.0 (edit by GeertVD)Edit of the popular script by @TraderR0BERT
New features:
- horizontal colored areas, indication weak/medium/strong trend
- vertical bars, signaling trend/momentum changes
- DI+ vs DI- contraction/expansion histogram (to measure the DI volatility)
Current RSI vs Sector RSI ComparisonIn the example above GOOGL's RSI is being compared against the RSI for XLK, the technology sector fund. The red and green areas make it easy to see if Google is under or overperforming relative to other tech stocks. I've included a normal RSI above it for comparison.
You can compare any stock to a sector, i.e. JP Morgan (JPM) versus the financial sector (XLF), or whatever your heart desires. All major sectors are selectable from a drop-down box and the output can also be visualised as a histogram too, much like a MACD.
Bitfinex BTC longs vs Short & RatioSince the last BTC Short Squeeze on Bitmex maintenance I decided to made a Indicator plotting Long:Short ratio, and their respective graphs.
Green = Longs
Red = Shorts
Black = Ratio (Longs:Shorts)*Close <= Close price just for chart normalization!
I hope you find it useful.
NOTE: It isn't a prospective indicator, but try to find out who's bitching the market and when ;p
Volume Flow Indicator [LazyBear]LFThis is Lazybear's port of VFI by Katsanos, which ideally requires 2 different sets of coefficients for intraday vs longer term charts. I added definitions of the values to allow for one set to be used intraday while the other is used for resolutions of 1d or more. This version will dynamically adapt the coefficients using the chart's resolution. I've also added options to show crosses with the MA and the zero line, and the possibility to have the zero line change color when using the long term set of coefficients, as a reminder.
LazyBear's original version is here .
This is the Katsanos documentation on VFI: www.mkatsanos.com .
Bears/Bulls [MTC]
Bulls vs. Bears, shows the strength of each buyer against sellers and shows us the market trend to make a better decision with an area that can help us to take better points of entry
Español.-
Toros vs Osos, nos muestra la fuerza de cada compradores contra vendedores y nos muestra la tendencia del mercado para tomar una mejor decisión con un área que nos puede ayudar a tomar mejores puntos de entrada
ETCUSDSHORTS ETCUSDLONGS - Bitfinex ETC Shorts & Longs// Created by titanlyy
// This script was inspired by @autemox who created the BTC version of this.
// Expecting the coinbase pump in Q3 2018, I was looking for an easy indicator script to display ETC Longs vs Shorts
// Hope this helps. Peace out.
// 12th July 2018
Leo Top Alts %Change IndicatorOften BTC movement is predicted by ALT movement. This indicatory takes the top 10 alts and averages their change period over period so for example today vs yesterday. This is like the % number you see in tradingview on the right next to the symbol.
Unfortunately I had to limit it to 10 as it takes a long time to compile, wanted to do top 100
Exchange Price ComparisonCompare the BTC price at your preferred exchange against 7 other exchanges. Avoid trades at poor market value, target trades at good market value.
Average price across 8 exchanges is the 0 line, with your selected exchange displayed green if it's below the average price, red if it's above the average price. Values are displayed as distance from the average, positive or negative.
Useful for evaluating your exchange price vs average market price, to avoid poor market value trades, target good value trades, shop around exchanges for best value, potential to be adapted for arbitrage opportunities.
8 Exchanges used:
Bitfinex
Bitmex
Poloniex
Binance
Coinbase
Bitstamp
Bittrex
Kraken
Requested by Mister_Pocketlint on discord. Inspired by anise.
BTCUSD Longs & Shorts Change AmountThis indicator contains 3 scripts.
1. "long change amount" & "short change amount"
2. "long plus & short minus" & "long minus & short plus"
3. "long vs short ratio"
Please turn off 2 not used.
Bitfinex Longs vs Shortssexy view of the current long/short positions on Bitfinex. I saw some pay-for, hidden-source-code version of this and thought: "oh man."
Bitfinex Long vs Short (TickerID)Uses the active ticker to show long/short values on all Bitfinex pairs that have that data available on Tradingview.
Closing Leverage and Rate of ChangeShows BTCUSDLONGS vs BTCUSDSHORTS along with their rate of change on a scale that's friendly for a combined indicator. ROC is increased proportionally so you can see it in relationship to Open Shorts and Open Longs on the same graph without zooming. I had been using an offset as well, but using an offset to adjust position causes the highs to look lower and it makes the lows look less low. It was significant enough to seem like a bad idea to include.
TTM SQUEEZE with ALERT by NM// ######################################################################################
// This script was created because the original TTM Squeeze script
// did trigger when only one of the Bollinger Bands was
// in the Keltner channel. It now gives the option to use it as was
// or to force it to only give a signal when both BB are in the Keltner channels
//
// Furthermore an alert was added to fire when we are squeezing
// no matter which option your choose (original or strict)
//
// To create an alert, click on the alerts in the right column on your screen
// then click on the +button to add an alert.
// Select from the conditions "CTTV Squeeze" and "Once per bar close"
// Keep in mind that you set this alert for one instrument and one particular time frame
//
// If you would have any questions, contact me :
// TradingView : @Nico.Muselle
// ######################################################################################
How to start using this script ?
1. Add this script to your favorites
2. Click on the Indicator-button on the top bar of your chart
3. Click on Favorites and find CTTV TTM
Do also check out my other indicators :
Percentage change -
Power Moving Average Pro - (use Moving Averages of higher time frames on lower time frame charts) -
Power Moving Average - (use 1 moving average of a higher time frame on the current time frame) -
BitFinex Longs vs. Shorts -
Relative Strength Index Direction -
Reversal Candles -
EMADiff -
Improved Linear Regression Bull and Bear Power v02 -
Improved Linear Regression Bull and Bear Power v01 -
PS : Sorry about the messy chart - Bottom indicators show the TTM Squeeze, top one being the original posted here, bottom one being the more strict option.
Bitfinex BTCUSD margin longs vs shortsNon overlay indicator for BTCUSDLONGS and BTCUSDSHORTS + delta
Volume Indicator VSidea take from Alexander Elder, author of: The New Trading for a Living: Psychology, Discipline, Trading Tools and Systems, Risk Control, Trade Management
Meaning of colouring:
- Green bar Volume: If we look back certain numbers of volume bars, higher close price and higher volume.
- Blue bar Volume: If we look back certain numbers of volume bars, higher close price and lower volume.
- Red bar Volume: If we look back certain numbers of volume bars, lower close price and higher volume.
- Orange bar Volume: If we look back certain numbers of volume bars, lower close prince and lower volume.
- Grey bar Volume: If we look back certain numbers of volume bars, same price and same volume.