mex_fundingScript for calculating Bitmex funding based on the Premium tickers Bitmex submits to Tradingview
Make sure you add the correct Bitmex Interest Base and Quote Symbols in the input settings
For example for www.bitmex.com the inputs are:
Chart ticker: XBTUSDPI8H
Input Settings
Interest Base: XBTBON8H
Interest Quote: USDBON8H
Futures
Session LiquidityThe “Session Liquidity” TradingView indicator by Infinity Trading creates dynamic horizontal lines at the high and low points of a specified time span within the trading day. This indicator gives the user control of three separate time spans so the user can dynamically see the highs and lows of their favorite daily time spans.
Purpose
This indicator is similar to my TradingView indicator “Futures Exchange Sessions 3.0”. In that indicator the user gets control of dynamic price boxes. For me, these boxes made it difficult to spot ICT’s Orderblocks. So instead of boxes I made independently controllable lines and now I can spot ICT Orderblocks and easily identify Liquidity Pools.
Inputs and Style
Everything about the three dynamic lines can but independently configured. Start & End Times, Line Color, Line Style, Line Width, Text Characters, Text Size, Text Color can all be adjusted. The high and low lines as well as their text labels can be individually toggled on or off for maximum control.
Timezone
All of the start and end times are in EST. Additionally, each time span line needs a specific start of each day. This is controlled by a setting called “Line Start Day Timezone” where the user sets a timezone that corresponds with the start time. In general if a timespan resides within a particular Session pick the corresponding timezone. If the users line fits in the Asian Session then choose Asia/Shanghai. If the line is within the London Session then choose Europe/London. And the same goes for the New York Session.
Special Notes
If the Line Start Time is within one candle of the Start Day Timezone in the Settings, then the line/box won’t display. So choose the previous timezone
Lines only display when the timeframe is <= 30 minute
Gallery
Z Score BandThis is a band based on Z Score. What is Z Score? In layman's terms it's a method of finding outliers within a sequence of numbers. It's highly effective to quantify pump and dumps in the crypto market.
The middle line is a simple Exponential Moving Average, you can configure this with whatever period you prefer. It comes default with a period of 247 to which I find suitable for my style of trading. The upper and lower bound are determined by the standard deviation you choose in the settings, it comes with a default of 1.69 although I've heard people saying 2.5 is a better number to really pinpoint outliers.
Trading with this indicator is like trading with any band based indicator. The main difference is that this indicator's sole purpose when I wrote it is to help me find shorting positions in the futures market. On the contrary though, longs are also achievable although I rarely long the futures market.
If prices hit the upper bound and get rejected, it's probably because the move was an outlier, it doesn't happen often and when it does usually it reveals crypto's nature of buying spot and hedging short in the futures market. When prices stay above the upper bound, switch to a higher timeframe until we can see that it's still have some ways upwards.
What's true about using this as a shorting tool is also true with longs. However, it might not be as effective, I'd like to be proven wrong.
Weekly Power 3Did you know there is a simple line you can place on your chart to immediately make the weeks price action more understandable? Its called the Weekly Open Line. And its the opening price of the trading week. It was created by The Inner Circle Trader (ICT) and incorporates another one of his concepts called Power 3.
The Weekly Power 3 indicator takes the idea of the Weekly Open Line and builds a suite of intelligent and dynamic tools around it that will immediately help the user to start understanding how price moves within the trading week context.
Features
Static Weekly Open Line
Intelligent Days of the Week Text
Dynamic Weekly High Line
Dynamic Weekly Low Line
Weekly High Candle Label (highest candle of the week)
Weekly Low Candle Label (lowest candle of the week)
Best Odds High of the Week Zone Line & Text
Best Odds Low of the Week Zone Line & Text
Components
The primary feature is a line that forms on the weekly open price and grows as the week progresses. Additionally, lines are created for the highest and lowest prices of the week so the weekly profile can be easily recognized. A dynamic label marks each weeks highest and lowest point. This will automatically move as prices expand throughout the week.
A very useful component of the Weekly Power 3 indicator is the Days of the Week text. Each Day of the Week text is displayed in the middle of each trading day and also the user can specify in the Settings whether to position the text at the high or low of the weeks price range. Additionally, there is a Buffer setting that allows the user to move the Days of the Week text up or down to prevent chart overlapping.
To help the user visualize the span of time with the best odds of forming the weekly highs or weekly lows, according to ICT, this indicator adds at static line and optional label into the charts future that projects the span from Tuesday’s London Open to Wednesday’s New York. Having a static line out in the future on your chart really helps to picture where price could be drawn to based solely around time of the week.
Premise
ICT says that the weekly open price is the most important level that price reacts to across the five days of a trading week. If the week profile is expected to be bullish then price many times goes below the weekly open line at the beginning of the week and above it later in the week (a.k.a Bullish Power 3). Consequently, if the week is anticipated to be a bearish week, price often times starts the week high and then goes lower throughout the week (a.k.a Bearish Power 3).
ICT always specifies that the weekly high or weekly low have the best odds of forming between the Tuesday’s London Open and Wednesday’s New York Open.
Inputs and Style
Like all scripts publish by Infinity Trading, everything in the indicator is customizable by the user. Every label, line, or text can be individually toggled ON or OFF so the user has complete control over the elements they want displayed on their chart. All of the lines can be individually adjusted by color, line style, or line width. The color and text color on the high and low of the week labels can be individually changed. The text in the chart (day of the week & best odds zones text) each have a “buffer” value. This allows the user to individually move the text up or down on the chart to declutter the chart. And lastly, the day of the week text can be positioned above or below the weeks price action and the text will dynamically move higher or lower as price expands throughout the week.
Previous weeks have all of the Weekly Power 3 markups so it's easy to study past price action and identify trends.
Gallery
View the weeks price action
View multiple weeks price action
Visualize future price action
Crypto BTC Correlation Scalper Gaps StrategyThis strategy is based on the gaps theory.
In this case we have the BTC futures from CME, which acts in a way similar to stocks, and we can have gaps present between close/open session, and also sometimes between same candle due to huge movements intra candle.
At the same time I have combined this with a daily moving average, to help out a bit with the trend, since we are looking at small timeframe like 1-15/30min .
On top of that we have a reverse option, where long = short and viceversa, which can be used with against BTC pairs .
Rule are simple:
For long, we have a long gap and the close of the correlated candle is above daily sma
For short, we have a short gap and the close of the correlated candle is below daily sma
For exit:
For exit, we take the highest highest values for short entry TP, meaning we get the different from the HH and rest the current open candle distance, and use that distance as a TP.
At the same time for long entry, we take the lowest low value and rest current close of the candle to that value, and we get the TP.
Can also be applied this logic for SL aswell but from the test I have found out that exiting based on a reverse condition(when tp is not being hit), gives better results/dd overall.
If you have any questions, please let me know !
Future's spread with base contract (MOEX)English:
Indicator calculates spread between future and it's theoretical price baased on base contract, number of days to expiration and central bank key rate.
I didn't find any means of getting base contract of security on chart so I hardcoded futures and corresponding base contracts.
Hardcoded futures are MOEX (Moscow Exchange) only and key rate used in script is Russian Central Bank's key rate from 2013, but I believe you can easily adapt it to any other key rate history. I can share source code of tiny C++20 utility for easy generation of get_rate(time) function from more human-readable date format rather then UNIX timestamp used in PineScript.
Only quarterly futures are supported. Only in "SIU2022" like notation. "SI1!" like aliases are not supported.
Русский:
Индикатор отображает спред фьючерса к его теоретической цене с учётом усыхания на каждый день.
Не нашёл, как определить базовый актив фьючерса средствами TradingView - поэтому это соответствие захардкожено вручную.
Поддерживаются только квартальные фьючерсы, только MOEX, только хардкор.
Поддерживается история ключевой ставки ЦБ РФ с 2013 года.
Используйте коды фьючерсов вида "SIU2022".
Не поддерживаются альясы вроде "SI1!", "EU1!".
EuroDollar Curve Implied 3M RateChart shows the Eurodollar futures prices latest prices from Sep 22 onwards. Display logic based on LongFiats code. This needs to be readjusted manually every 3 months whenever the front-month expires. Good tool to see where professional eurodollar futures think interest rates will be over the next few years. Check regularly as sentiment changes.
Futures Exchange Sessions 3.0Description
The ultimate conclusion to the Futures Exchange Sessions 2.0 indicator. In version 3.0 the user gets full control of the start and end times of three separate dynamic boxes and one horizontal line. If the user wants to visually keep track of killzones, lunches, or any other time span in a trading day, version 3.0 will dynamically expand and keep track of price within the time specified by the user.
Inputs and Style
Everything about the three dynamic boxes and one horizontal line can but independently configured. Color, style, border, width can all be adjusted. In the Settings each box has a text box so the user can give each one a unique name.
Timezone
All of the start and end times are in EST. Additionally, each box and line need a dependent start of each day. This is controlled by a setting where the user can specify a timezone called Start Day Timezone which would be midnight of the respective timezone. In general if a box or line resides within a particular Session pick the corresponding timezone. If the users box/line fits in the Asian Session then choose Asia/Shanghai. If the box/line is within the London Session then choose Europe/London. And the same goes for the New York Session.
Special Notes
If start time is within one period of the Start Day Timezone in the Settings, then the line/box won't display
Boxes and time lines only display when timeframe is <= 30 minute
To turn off box text label set opacity to 0%
Binance Futures Swap-Spot Basis LabelNote: This script will only work with Binance Futures Symbols
This script calculates the basis between the Binance Future and Binance Spot market for the coin you are currently viewing and paints a label on the chart which displays the percentage difference between future and spot. If the future is trading below the spot market the text will be red indicating backwardation and if the future is trading above spot, it will be green indicating contango. Please note this script will only work on Binance perps against Binance spot. The script will change based on what perp you are looking at, no inputs are required.
SPY to ES / MESSPY to ES is an indicator that converts SPY price targets to ES / MES futures price targets.
This indicator is helpful when you have price targets for SPY but trade ES or MES futures instead of SPY. It coverts the SPY price targets to ES / MES futures, and draws the SPY VWAP line on your ES / MES chart.
It supports the following lines
Bullish Above
Bearish Below
Long PT1
Long PT2
Long PT3
Short PT1
Short PT2
Short PT3
It also converts the SPY VWAP to it's current ES / MES value.
Note: The conversion do not work during pre and after market and the lines are only correct during market hours.
Binance Big Open Interest Delta Change v2 Note: This script will only work properly with Binance Futures symbols.
This script simply looks at the open interest for the symbol you are currently viewing and determines if a large change in open interest has occurred, which triggers a background color alert.
It does this by comparing the absolute value of the range of the current open interest bar with a simple average (length set by user) of the past x range. The user also determines what is considered a 'large' change in open interest by setting a multiplier with which the current range must exceed compared to the average range in order to trigger an alert.
If the change in open interest is an increase in OI, the alert is blue, and if the change in open interest is a decrease, the alert is orange.
The open interest ticker that is used for calculation is derived by adding the current ticker and "_OI" so that it auto changes each time you switch to a new Binance futures contract.
Candle Level of VWAP [By MUQWISHI]The " Price of Volume Weighted Average Price " (PVWAP) indicator calculates the VWAP standard deviation of bar price.
Features:
1. Ability to smooth the "Price of Volume Weighted Average Price" line.
2. Ability to choose the anchor period (timeframes).
Let me know if you have any questions.
Thanks.
Crude Oil: Backwardation Vs ContangoCrude Oil, CL
Plots Futures Curve: Futures contract prices over the next 3.5 years; to easily visualize Backwardation Vs Contango(carrying charge) markets.
Carrying charge (contract prices increasing into the future) = normal, representing the costs of carrying/storage of a commodity. When this is flipped to Backwardation(As the above; contract prices decreasing into the future): it's a bullish sign: Buyers want this commodity, and they want it NOW.
Note: indicator does not map to time axis in the same way as price; it simply plots the progression of contract months out into the future; left to right; so timeframe DOESN'T MATTER for this plot
TO UPDATE (every year or so): in REQUEST CONTRACTS section, delete old contracts (top) and add new ones (bottom). Then in PLOTTING section, Delete old contract labels (bottom); add new contract labels (top); adjust the X in 'bar_index-(X+_historical)' numbers accordingly
This is one of several similar Futures Curve indicators: Meats | Metals | Grains | VIX | Crude Oil
If you want to build from this; to work on other commodities; be aware that Tradingview limits the number of contract calls to 40 (hence the multiple indicators)
Tips:
-Right click and reset chart if you can't see the plot; or if you have trouble with the scaling.
-Right click and add to new scale if you prefer this not to overlay directly on price. Or move to new pane below.
-If this takes too long to load (due to so many security calls); comment out the more distant future half of the contracts; and their respective labels. Or comment out every other contract and every other label if you prefer.
--Added historical input: input days back in time; to see the historical shape of the Futures curve via selecting 'days back' snapshot
updated 20th June 2022
© twingall
VIX: Backwardation Vs ContangoVIX: Backwardation Vs Contango
Quickly visualize Contango vs Backwardation in the S&P 500 Volatility Index by plotting the prices of the futures contracts over the next 9 months
Note: indicator does not map to time axis in the same way as price; it simply plots the progression of contract months out into the future; left to right; so timeframe DOESN'T MATTER for this plot
TO UPDATE(every few months recommended): in REQUEST CONTRACTS section, delete old contracts (top) and add new ones (bottom). Then in PLOTTING section, Delete old contract labels (bottom); add new contract labels (top); adjust the X in 'bar_index-(X+_historical)' numbers accordingly
This is one of several similar indicators: Meats | Metals | Grains | VIX
Tips:
-Right click and reset chart if you can't see the plot; or if you have trouble with the scaling.
-Right click and pin to Scale A to plot on the same scale as price
--Added historical input: input days back in time; to see the historical shape of the Futures curve via selecting 'days back' snapshot
updated 15th June 2022
© twingall
Metals:Backwardation/ContangoMETALS: Gold , Silver , Copper ( GC , SI, HG)
Quickly visualize carrying charge market vs backwardized market by comparing the price of the next 2 years of futures contracts.
Carrying charge (contract prices increasing into the future) = normal, representing the costs of carrying/storage of a commodity. When this is flipped to Backwardation (contract prices decreasing into the future): its a bullish sign: Buyers want this commodity, and they want it NOW.
Note: indicator does not map to time axis in the same way as price; it simply plots the progression of contract months out into the future; left to right; so timeframe DOESN'T MATTER for this plot
There's likely some more efficient way to write this; e.g. when plotting for Gold ( GC ); 21 of the security requests are redundant; but they are still made; and can make this slower to load
TO UPDATE(once a year will do): in REQUEST CONTRACTS section, delete old contracts (top) and add new ones (bottom). Then in PLOTTING section, Delete old contract labels (bottom); add new contract labels (top); adjust the X in 'bar_index-(X+_historical)' numbers accordingly
This is one of three similar indicators: Meats | Metals | Grains
-If you want to build from this; to work on other commodities ; be aware that Tradingview limits the number of contract calls to 40 (hence the 3 seperate indicators)
Tips:
-Right click and reset chart if you can't see the plot; or if you have trouble with the scaling.
-Right click and add to new scale if you prefer this not to overlay directly on price. Or move to new pane below.
--Added historical input: input days back in time; to see the historical shape of the Futures curve via selecting 'days back' snapshot
updated 15th June 2022
© twingall
Grains:Backwardation/ContangoGRAINS: Wheat , Soybeans , Corn (ZW, ZS, ZC )
Quickly visualize carrying charge market vs backwardized market by comparing the price of the next 2 years of futures contracts.
Carrying charge (contract prices increasing into the future) = normal, representing the costs of carrying/storage of a commodity. When this is flipped to Backwardation (contract prices decreasing into the future): its a bullish sign: Buyers want this commodity, and they want it NOW.
The above chart shows a nice example of backwardation.
Note: indicator does not map to time axis in the same way as price; it simply plots the progression of contract months out into the future; left to right; so timeframe DOESN'T MATTER for this plot
There's likely some more efficient way to write this; e.g. when plotting for Wheat (ZW); 15 of the security requests are redundant; but they are still made; and can make this slower to load
TO UPDATE(once a year will do): in REQUEST CONTRACTS section, delete old contracts (top) and add new ones (bottom). Then in PLOTTING section, Delete old contract labels (bottom); add new contract labels (top); adjust the X in 'bar_index-(X+_historical)' numbers accordingly
This is one of three similar indicators: Meats | Metals | Grains
-If you want to build from this; to work on other commodities ; be aware that Tradingview limits the number of contract calls to 40 (hence the 3 seperate indicators)
Tips:
-Right click and reset chart if you can't see the plot; or if you have trouble with the scaling.
-Right click and add to new scale if you prefer this not to overlay directly on price. Or move to new pane below.
--Added historical input: input days back in time; to see the historical shape of the Futures curve via selecting 'days back' snapshot
updated 15th June 2022
© twingall
Meats: Backwardation/CantangoMEATS: Live Cattle , Feeder Cattle, Lean Hogs (LE, GF , HE)
Quickly visualize carrying charge market vs backwardized market by comparing the price of the next 2 years of futures contracts.
Carrying charge (contract prices increasing into the future) = normal, representing the costs of carrying/storage of a commodity. When this is flipped to Backwardation (contract prices decreasing into the future): its a bullish sign: Buyers want this commodity, and they want it NOW.
Note: indicator does NOT map to time axis in the same way as price; it simply plots the progression of contract months out into the future; left to right; so timeframe DOESN'T MATTER for this plot
There's likely some more efficient way to write this; e.g. when plotting for Live Cattle (LE); 8 of the security requests are redundant; but they are still made; and can make this slower to load
TO UPDATE(once a year will do): in REQUEST CONTRACTS section, delete old contracts (top) and add new ones (bottom). Then in PLOTTING section, Delete old contract labels (bottom); add new contract labels (top); adjust the X in 'bar_index-(X+_historical)' numbers accordingly
This is one of three similar indicators: Meats | Metals | Grains
-If you want to build from this; to work on other commodities ; be aware that Tradingview limits the number of contract calls to 40 (hence the 3 seperate indicators)
Tips:
-Right click and reset chart if you can't see the plot; or if you have trouble with the scaling.
-Right click and add to new scale if you prefer this not to overlay directly on price. Or move to new pane below.
--Added historical input: input days back in time; to see the historical shape of the Futures curve via selecting 'days back' snapshot
updated 15th June 2022
© twingall
Futures Exchange Sessions 2.0Description
Successor to Futures Exchange Sessions indicator. Completely rebuilt code from the ground up. Every feature has been redesigned and refactored to be the most beneficial while allowing for complete configuration by the user.
This indicator displays Futures Sessions as live boxes that expand dynamically as price moves over the time interval. These boxes make liquidity levels extremely easy to spot and visualize. It helps the user identify market structure and develop their own bias of price action. Everything about the Session boxes can be configured. Box color, border color, border style, and border width are all individually controllable. Each Future Session can be turned on or off at any time. Also, each box has their own text label (Asian Session, London Session, New York Session) and this text can be moved around the box, change color, and change size.
Previous days highs and lows (major liquidity levels) are always important to the futures trader. This indicator now allows the user to individually display the three previous days highs and low levels as lines with optional label. Each line can be independently toggled on or off and like always, every conceivable customization option is available to the user. And the labels can be moved to the right (via the Input Settings) to allow unobstructed views of candles.
The midnight EST open and 8:30 AM EST open horizontal lines (developed by the Inner Circle Trader) are returning in this indicator. But the biggest improvement is that the lines stop at the current bar or the last bar of the trading day. Additionally, the time lines are displayed on previous days so the user can easily see how the candles reacted to these important times of the day.
The Session boxes and the horizontal time lines now can be set to only display a certain number of day back. If the user wants just to see Session boxes for the previous day only, they can do that. If the user wants to see the last 15 days of boxes or lines it is very easy to increase the days back in the settings. Currently, the max days back is 80 calendar days.
Additional Images
Easily visualize and understand price action across time
Everything is customizable so the user can easily match this indicator to their color preferences
Special Notes
To turn off box session text set opacity to 0%
Boxes and horizontal time lines only display when timeframe is <= 30 minute
Pre-Market levels for Futures This indicator draws the Pre-Market Low and High for futures. Futures do not really have "P.M" because they are almost always open, but I chart /ES and trade $SPY options, so this has been useful in finding P.M levels.
EMA_TREND_CATCHERSimple strategy based on the crossing of moving averages of 50,100 and 200 periods. Designed to identify trends
You are ready to use trading bots (all you have to do is fill in "Variables for Alert"). However, it can also be used for discretionary operations.
BTCUSDT FUTURES BINANCE
4H
ICT Index Futures Session LinesICT Index Futures Session Lines
Description:
The script is based on one of ICT's concepts on trading Index Futures. The script lays out the daily range from an intraday basis.
Range:
00:00 - New York Midnight
08:30 – New York Open (News events come out)
12:00/13:00 - New York Lunch (No trade time period)
13:30 - (Algorithm)
16:30 - Close
* The open, high and low lines are plotted from 00:00 to 08:30
How To Use:
You will need to check the daily bias. Prior to 8:30 you are to look for previous swing points where liquidity may exist. During the open you want to see if a high or low is taken out, and then wait for an energetic break/displacement for a potential FVG/imbalance retracement entry.
Strategy is for LTF (1 to 15m)
Default time zone is set to America/New_York (UTC New York), so lines will be plotted correctly regardless of user’s local UTC chart setting.
U.S. Futures Price LimitsThis scripts plots settlement and the circuit breaker limits for U.S. Equity Indexes. The current limits for the equity index futures are + and - 7%, 13%, and 20% from the previous day's settlement price. If price reaches these levels trading is either paused briefly or for the remainder of the day. The full resource (CME Website) is below.
There are plans to add the remainder of the most actively traded U.S. Futures Markets.
To find out more about the price limits it is best to use the CME's website as a reference.
www.cmegroup.com
Intraday Power 3 VisualDescription
This indicator draws a dynamic "Open High Low Close" type visual on intraday charts so the trader can easily keep track of the daily/weekly movement. This indicator was inspired by the Inner Circle Trader’s (ICT) “Power 3” concept, which is Accumulation, Manipulation, and Distribution of price on a daily timeframe.
Visual
This indicator plots the chosen timeframes opening price along with a live line for the current price. This makes it very easy to identify the daily/weekly range along it’s open. And the user can combine this indicator with my other indicator “Futures Exchange Sessions” to plot the midnight EST & 8:30 AM EST lines to get a great summation of over night price action.
Inputs and Style
In the Input section the user can dynamically switch between Daily and Weekly timeframes. Built in ability to move the entire Visual to the right makes preventing indicator overlap a breeze. All of the lines can be configured: color, style, and width. Independently toggle ON/OFF the Power 3 labels (Accumulation, Manipulation, Range Extension, Distribution) and can change labels color. The labels dynamically move and switch positions based upon bear or bull daily/weekly range.
Special Notes
The Futures market is open 23/5. It is closed everyday for 1-hour at 5pm EST and closed over the weekends. Because this Intraday Power 3 Visual is drawing in the 'future' on the users TradingView chart, when the visual is close or in a time when the market is closed, the visual doesn't behave properly. This is because TradingView doesn't display times when the Market is closed, thus the drawings cannot be displayed during those times. There is nothing wrong with the script. Please wait until the Market is open and the visual will be drawn normally.
This indicator is intended for use in the Futures Market