Syminfo.TypeHello traders
Earlier this week I discovered a new built-in variable called syminfo.type
What is it for?
This variable returns the type of the current symbol. Possible values are cfd, stock, futures, indices, forex, crypto, fund.
Cool bro but... should we care?
Well... we all should. Imagine you have a generic script and you want a different configuration whether you're trading FOREX or Crypto .
I designed a dummy example in that script that will preset the inputs according to the asset type from the chart.
Here I want 12/26/9 for forex and 20/50/50 for crypto - 30/60/90 otherwise
Quick caveat
It seems that for any crypto asset, syminfo.type returns "bitcoin". TradingView will fix it at some point but wanted to give you the heads-up regardless
Enjoy and all the BEST ^^
--
Dave
Futures
Market Profile for Futures with Session and After Hours SplitAdapted existing Market Profile scripts to be move suitable for Futures Markets with Session and After Hours split
Script Provides split Market Profiles for Session and After Hours
Users can customize the Session and AH hours inputs to suit any ticker and their interpretation of prime and non-prime hours
ANN MACD : 25 IN 1 SCRIPTIn this script, I tried to fit deep learning series to 1 command system up to the maximum point.
After selecting the ticker, select the instrument from the menu and the system will automatically turn on the appropriate ann system.
Listed instruments with alternative tickers and error rates:
WTI : West Texas Intermediate (WTICOUSD , USOIL , CL1! ) Average error : 0.007593
BRENT : Brent Crude Oil (BCOUSD , UKOIL , BB1! ) Average error : 0.006591
GOLD : XAUUSD , GOLD , GC1! Average error : 0.012767
SP500 : S&P 500 Index (SPX500USD , SP1!) Average error : 0.011650
EURUSD : Eurodollar (EURUSD , 6E1! , FCEU1!) Average error : 0.005500
ETHUSD : Ethereum (ETHUSD , ETHUSDT ) Average error : 0.009378
BTCUSD : Bitcoin (BTCUSD , BTCUSDT , XBTUSD , BTC1!) Average error : 0.01050
GBPUSD : British Pound (GBPUSD,6B1! , GBP1!) Average error : 0.009999
USDJPY : US Dollar / Japanese Yen (USDJPY , FCUY1!) Average error : 0.009198
USDCHF : US Dollar / Swiss Franc (USDCHF , FCUF1! ) Average error : 0.009999
USDCAD : Us Dollar / Canadian Dollar (USDCAD) Average error : 0.012162
SOYBNUSD : Soybean (SOYBNUSD , ZS1!) Average error : 0.010000
CORNUSD : Corn (ZC1! ) Average error : 0.007574
NATGASUSD : Natural Gas (NATGASUSD , NG1!) Average error : 0.010000
SUGARUSD : Sugar (SUGARUSD , SB1! ) Average error : 0.011081
WHEATUSD : Wheat (WHEATUSD , ZW1!) Average error : 0.009980
XPTUSD : Platinum (XPTUSD , PL1! ) Average error : 0.009964
XU030 : Borsa Istanbul 30 Futures ( XU030 , XU030D1! ) Average error : 0.010727
VIX : S & P 500 Volatility Index (VX1! , VIX ) Average error : 0.009999
YM : E - Mini Dow Futures (YM1! ) Average error : 0.010819
ES : S&P 500 E-Mini Futures (ES1! ) Average error : 0.010709
GAZP : Gazprom Futures (GAZP , GZ1! ) Average error : 0.008442
SSE : Shangai Stock Exchange Composite (Index ) ( 000001 ) Average error : 0.011287
XRPUSD : Ripple (XRPUSD , XRPUSDT ) Average error : 0.009803
Note 1 : Australian Dollar (AUDUSD , AUD1! , FCAU1! ) : Instrument has been removed because it has an average error rate of over 0.13.
The average error rate is 0.1850.
I didn't delete it from the menu just because there was so much request,
You can use.
Note 2 : Friends have too many requests, it took me a week in total and 1 other script that I'll share in 2 days.
Reaching these error rates is a very difficult task, and when I keep at a low learning rate, they are trained for a very long time.
If I don't see the error rate at an average low, I increase the layers and go back into a longer process.
It takes me 45 minutes per instrument to command artificial neural networks, so I'll release one more open source, and then we'll be laying 70-80 percent of the world trade volume with artificial neural networks.
Note 3 :
I would like to thank wroclai for helping me with this script.
This script is subject to MIT License on behalf of both of us.
You can review my original idea scripts from my Github page.
You can use it free but if you are going to modify it, just quote this script .
I hope it will help everyone, after 1-2 days I will share another ann script that I think is of the same importance as this, stay tuned.
Regards , Noldo .
Bitmex BTC Backwardation / ContangoThis indicator calculates difference between price of Bitmex's XBTUSD, and Bitmex's two nearest futures.
If the difference is negative, then it is backwardation.
If the difference is positive, then it is contango.
This script will be updated every about 3 months, when the nearest Bitmex future will be expired.
This is an updated script of , with better description.
BTC Volume absolute (fiat vs Tether vs futures)BTC volume split by fiat, Tether and futures in USD
fiat = COINBASE + BITFLYER + BITSTAMP + KRAKEN
Tether = BITFINEX + BINANCE + HUOBI + HITBTC
futures = BITMEX + BYBIT
COT Commercial Positions (Updated)
This script aims to look at the markets from a manufacturer's point of view.
Producers or large enterprises gradually sell their goods as the price increases.
Because both the amount of product and position in their hands is too high, otherwise they can not find buyers, and they have to make a safe profit.
Therefore, I have shown short positions in green and long positions in red.
Blue is the net position formed by subtracting long positions from short positions.
This script is created with the latest Quandl data number codes.
Please let me know if you see a missing or a code update.
I recommend using it in a weekly (1W) time frame.
CAUTION : Since Bitcoin producer positions are very sparse, speculative long positions have been preferred in Bitcoin.
If you're looking for Bitcoin,
select Bitcoin from the menu.
Regards.
Open Interest Exponential Ease of MovementModified Ease of Movement :
* Open Interests used on Futures instead of Volume (Includes Bitcoin)
* Exponential Moving Average used instead of Simple Moving Average
* Division Number cancelled. (Division Number gives wrong signals inside strong trends.)
NOTE : This code is open source under the MIT License. If you have any improvements or corrections to suggest, please send me a pull request via the github repository github.com
Stay tuned. Best regards !
BTC Volume Fiat vs Tether vs FuturesFutures = BYBIT+ BITMEX
Fiat = KRAKEN + BITSTAMP + BITFLYER + COINBASE
Tether = HITBTC + HUOBI + BINANCE + BITFINEX
Spot = Fiat + Tether
Tether vs Fiat = 100 * Tether / (Tether + Fiat)
Spot vs Futures = 100 * Spot / (Spot + Futures)
Open Interest Money Flow Index (OIMFI)CAUTION : This system was inspired from seiglerj' s "Money Flow Index " script. Open Interests are used instead of volume.
What is the Money Flow Index ( MFI )?
The Money Flow Index ( MFI ) is a technical oscillator that uses price and volume for identifying overbought or oversold conditions in an asset. It can also be used to spot divergences which warn of a trend change in price. The oscillator moves between 0 and 100.
Unlike conventional oscillators such as the Relative Strength Index ( RSI ), the Money Flow Index incorporates both price and volume data, as opposed to just price. For this reason, some analysts call MFI the volume-weighted RSI .
What Does the Money Flow Index ( MFI ) Tell You?
One of the primary ways to use the Money Flow Index is when there is a divergence. A divergence is when the oscillator is moving in the opposite direction of price. This is a signal of a potential reversal in the prevailing price trend.
For example, a very high Money Flow Index that begins to fall below a reading of 80 while the underlying security continues to climb is a price reversal signal to the downside. Conversely, a very low MFI reading that climbs above a reading of 20 while the underlying security continues to sell off is a price reversal signal to the upside.
Traders also watch for larger divergences using multiple waves in the price and MFI . For example, a stock peaks at $10, pulls back to $8, and then rallies to $12. The price has made two successive highs, at $10 and $12. If MFI makes a lower higher when the price reaches $12, the indicator is not confirming the new high. This could foreshadow a decline in price.
The overbought and oversold levels are also used to signal possible trading opportunities. Moves below 10 and above 90 are rare. Traders watch for the MFI to move back above 10 to signal a long trade, and to drop below 90 to signal a short trade.
Other moves out of overbought or oversold territory can also be useful. For example, when an asset is in an uptrend, a drop below 20 (or even 30) and then a rally back above it could indicate a pullback is over and the price uptrend is resuming. The same goes for a downtrend. A short-term rally could push the MFI up to 70 or 80, but when it drops back below that could be the time to enter a short trade in preparation for another drop .
Reference : www.investopedia.com
WARNING :
** Since each instrument in the list has its own unique contract data, you must first enter its name to display it. I recommend you to select OANDA from the markets. Finally, when the COT reports are issued, it may repaints. However, this repaint is usually close to closing or after close .(When COT reports are so sharp ) So use this script only 1W ( 1 week ) or 1 M ( 1 month ) timeframe.
** This data is taken to Tradingview with the help of Quandl. This is a very low possibility, but the system will not work if there is a malfunction.
FEATURES :
*** Working with all futures (Including : Bitcoin )
*** If you dont work with "Futures" , you can select "Others" from switchable menu and use volume for all instruments.
*** New generation elegant design used : Adaptive coloring Overbought - Oversold Levels according to the closing price.
NOTE : This code is open source under the MIT License. If you have any improvements or corrections to suggest, please send me a pull request via the github repository github.com
Stay tuned. Best wishes !
Weiss Wave Open Interest BarsFirstly :
LazyBear ' s "Weiss Wave " codes are used for open interests.
Original Weiss Wave Volume :
Let's start :
Open Interest vs. Volume: An Overview
Volume and open interest are two key measurements that describe the liquidity and activity of contracts In the options and futures markets. However, their meanings and applications are different. Volume refers to the number of contracts traded in a given period, while open interest denotes the number of active contracts.
Volume
Trading volume measures the number of options or futures contracts being exchanged between buyers and sellers, identifying the level of activity for that particular contract. For every buyer, there is a seller, and the transaction itself counts toward the daily volume.
Open Interest
Open interest indicates the number of options or futures contracts that are held by traders and investors in active positions. These positions have not been closed out, expired, or exercised. Open interest decreases when holders and writers of options (or buyers and sellers of futures) close out their positions. To close out positions, they must take offsetting positions or exercise their options. Open interest increases once again when investors and traders open new long positions or writers/sellers take on new short positions. Open interest also increases when new options or futures contracts are created.
Options or futures contract trading volume can only increase while open interest can either increase or decrease. While trading volume indicates the number of contracts that have been bought or sold, open interest identifies the number of contracts that are currently held.
Reference : www.investopedia.com
*** Worked to define all futures . You can look them in codes (between line : 13 to line 94 )
** CAUTION 1 : Since each instrument in the list has its own unique contract data, you must first enter its name to display it. I recommend you to select OANDA from the markets. Finally, when the COT reports are issued, it may repaints. However, this repaint is usually close to closing or after close .(When COT reports are so sharp ) So use this script only 1W ( 1 week ) or 1 M ( 1 month ) timeframe.
** CAUTION 2 : This data is taken to Tradingview with the help of Quandl. This is a tremendous possibility, but the system will not work if there is a malfunction.
Best regards.
XBT Contango Calculator v1.1
This indicator measures value of basis (or spread) of current Futures contracts compared to spot. The default settings are specifically for Bitmex XBTU19 and XBTZ19 futures contracts. These will need to be updated after expiration. Also, it seems that Tradingview does not keep charts of expired contracts. If anyone knows how to import data from previous expired contracts, please let me know. This historical data could be valuable for evaluating previous XBT futures curves.
Also, VERY important to understand is this indicator only works with Spot Bitcoin charts (XBTUSD, BTCUSD, etc). If you add this to any other asset chart, it would not be useful (unless you changed settings to evaluate a different Futures product).
Contango and Backwardation are important fundamental indicators to keep track of while trading Futures markets. For a better explanation, Ugly Old Goat had done several medium articles on this. Please check out link below for his latest article on the subject...
uglyoldgoat.com
Notes on chart above should explain most of what you need to know on to use this indicator. The zero line is the spot price on the chart, so a positive value means Futures are trading at a premium (or in Contango). You can set a value of extreme Contango which will give an alert as red background (default setting is +$500). Green background will appear when Futures are trading at a discount to spot (Backwardation).
Hope some people get some use out of this. This is my first attempt at coding anything, so any feedback would be greatly appreciated!
BTC Donations: 3CypEdvBcvVHbqzHUt1FDiUG53U7pYWviV
Premium/Discount (Input)Used to show Contango or Backwardation in futures contracts vs spot price. You can input your own tickers so can technically can be used to compare anything.
* In this example I'm showing Okex Quarterly contract vs Okex spot index price because it showcases it better.
* If you are using this after 2019 the default setting will not work because I set it to Bitmex which does not currently have a "current contract in front" ticker available.
It should be fairly self explanatory, but just ask below if you have any questions.
Commercial / Open Interest-Buschi
English:
Another view the Commitment of Traders (CoT) data
Since the Commercials are often a good indicator for future market movements, I tampered a little bit with their positioning (long or short) in relation to the open interest to visualize some kind of "commercial buying (long) or selling (short) power". It's definitely nothing more than work in progress, but I decided to publish it anyway. Critical comments are mostly welcome.
Deutsch:
Ein weiterer Blick auf die Commitment of Traders (CoT) Daten
Da die Commercials häufig ein guter Indikator für zukünftige Marktbewegungen sind, habe ich ein wenig mit ihrer Positionierung (long oder short) im Verhältnis zum Open Interest herumgebastelt, um eine Art von "kommerzieller Kauf- (long) oder Verkaufs-Kraft" abzubilden. Es ist momentan noch im absoluten Teststadium, aber ich habe mich dazu entschlossen, es trotzdem zu veröffentlichen. Kritische Anmerkungen sind sehr willkommen.
CME & XBT - BTC Futures Settlement DatesHi everyone
This in an indicator inspired by Scarrff
I added the XBT quarterly and yearly settlement dates
Enjoy
David
Futures - Measure and compare volatility in USDThis is a dirty fix.
Dollar value (syminfo.pointvalue) is wrong in Tradingview for the below listed futures, where the price is in quarters of cents.
For example ZC (Corn) says syminfo.pointvalue = 5000 (syminfo.mintick = 0.13), which gives you (with ATR = 6) volatility of $30,000 (6 * 5000) instead of the correct $300.
For all other futures I used the default syminfo.pointvalue.
Feel free to correct me, if I am wrong regarding the syminfo.pointvalue error.
Futures - Measure and compare volatility in USDDollar value (syminfo.pointvalue) is wrong in Tradingview for the below listed futures, where the price is in quarters of cents. So this is a dirty fix.
For example ZC (Corn) says syminfo.pointvalue = 5000 (syminfo.mintick = 0.13), which gives you (ATR = 6) volatility 30,000 USD instead of the correct 300 USD.
For all other futures is used the default syminfo.pointvalue.
A.I.Driven TradersAI Model Trades for 20190612The entry and exit levels here are NOT derived from any specific indicator but are coming from our A.I. driven proprietary models.
This is an attempt at exploring the trading community here at TradingView and sharing our daily trading plans published at our site with the community here in the form a Pine Script - just starting and learning this platform. Please help point out any obvious errors or gotchas committed in the scripts. Thanks and have a great trading day!
**** The Trading Plan Published for today ****
>>>> Medium-Frequency Models: <<<<< For today, Wednesday 06/12, our medium-frequency models indicate using the 2895 as a pivot point - opening a long on a break above 2895, and opening a short on a break below 2895 (wait for a close on at least a five minute chart to determine the break), both sides with a 9-point trailing stop.
Note: For the trades to trigger, the breaks should occur during the regular session hours starting at 9:30am ET. By design, these models do NOT open any new positions after 3:45pm. Only one open position at any given time.
>>>>> Aggressive Intraday Models: <<<<< For today, Wednesday 06/12, our aggressive intraday models indicate going long on a break above 2892 or 2875 with an 6-point trailing stop, and going short on a break below 2887 or 2878 with an 8-point trailing stop.
Note: For the trades to trigger, the breaks should occur during regular session hours starting at 9:30am ET. Due to the intraday nature of these aggressive models, they indicate closing any open trades at 3:55pm and remaining flat into the session close. No opening of new positions after 3:45pm. Only one open position at any given time.
Back - Front Futures Spread 4hr IndicatorThis puts a normalized back - front spread based on the close price.
BTC South Korea_PricesSince BTC prices are diverging, this set of 4 indicators charts volume-weighted prices for different exchanges:
Spot, Tether, Futures and South Korea.
I tried doing EUR & JPY, but the divergence is minimal so its a little pointless.
Here is the 4 links:
BTC Futures_PricesSince BTC prices are diverging, this set of 4 indicators charts volume-weighted prices for different exchanges:
Spot, Tether, Futures and South Korea.
I tried doing EUR & JPY, but the divergence is minimal so its a little pointless.
Here is the 4 links:
BTC Spot_PricesSince BTC prices are diverging, this set of 4 indicators charts volume-weighted prices for different exchanges:
Spot, Tether, Futures and South Korea.
I tried doing EUR & JPY, but the divergence is minimal so its a little pointless.
Here is the 4 links: