Explaining Pine Script keywords: 'var' and 'nz' Life is about learning, but frequently these things seems difficult if not impossible.
When you don't know anything about a certain subject, it can be daunting, but when you know plenty of it, it is easy!
Coding/scripting can be very daunting, and sometimes difficult to overcome 'basic' things.
It is perfectly normal that some 'basic' stuff are very difficult to grasp in the beginning
(and the 'beginning' can take longer then you would think)
With this tutorial I want to make it a bit easier to get to know certain keywords like 'var' and 'nz'
Besides these links
var
www.tradingview.com
www.tradingview.com
nz
www.tradingview.com
www.tradingview.com
I wanted to add a bit of extra help, making it easier to understand the concepts of 'var' and 'nz'
The following 2 scripts are best used on a Monthly Timeframe with a Ticker that exists longer then 2 years (example Bitcoin)
After you've loading the script on your chart, open the console so you can read and follow the instructions and explanation in the script.
var
nz
www.tradingview.com
In this way I hope I can facilitate the comprehension of these keywords!
In the future I intend to make more tutorials regarding pivot points, array's, loops, ...
Cheers!
A: How to get to be the best?
B: Make no mistakes
A: how do I make sure I don't make mistakes?
B: By learning
A: How do I learn?
B: By making mistakes
VAR
Bears can't make anything happen with VAR, are we going up?Little smile on this island from VAR. If you're a bear, bull, or long option holder you're probably frustrated as hell with this one but it looks like it might take off. I like this stock as long as we're above support levels. That gap up sure is one hell of an uptrend.
Siemens Healthineers buys US cancer therapy company Varian $16BGermany-based Siemens Healthineers said Sunday it will buy U.S. cancer therapy and research company Varian in a deal worth around $16.4 billion.
Siemens Healthineers SHL, -5.32%, in which industrial conglomerate Siemens holds a majority stake, said it will buy all shares in Varian Medical Systems, Inc. VAR, +3.18% for $177.50 per share in cash.
It said that the acquisition is expected to close in the first half of 2021, and requires the approval of regulators and Varian shareholders. Varian’s board of directors unanimously approved the agreement, it added.
Palo Alto, California-based Varian had revenues in the 2019 fiscal year of $3.2 billion, Siemens Healthineers said in a statement. Varian says it employs about 10,000 people around the world.
Siemens Healthineers said it plans to finance the acquisition with a mix of debt and equity.
Source: MarketWatch
If you are interested to test some amazing buy and sell indicators, which give the signal at the beginning of the candle, not at the end of it, just leave me a message.
VAR Debit SpreadVar Put Spread, September 20, 135/125 Max loss is $4.05 debit is 5.95 Profit
Max gain will be the debit price max loss is $2
Possible continuation as it seems to be trending lower and sideways
Risk is low and Reward is high. Spread is expensive so it would have been more favorable to get this at $3 but this is how it goes.
Apparently I'm a bear I got too many shorts on.
Bitcoin weekly VAR update 1Hello ladies and gents,
Before someone gets on my case for thinking I mean this has anything to do with a weekly chart, you are mistaken.
Anyways, I have have been bullish since my last post, and I remain bullish. I will let you guys know when that changes.
One of the most respected technical analysts in the space, Tone Vays, was calling for a price of $5,000 a while back. I don't remember what price it was at, but I ran the statistics then and saw that there was less than a 1% chance of being right within his timeframe. No matter who you are, if you are not using more than TA, your knowledge is limited. Don't get me wrong, you can make a lot of money with TA, but you should aspire to learn more.
Guys, technical analysis is not everything. Expand your knowledge as far as you can to see the clearest picture - it will get closer to reality this way. We can only hope to perceive the truth - it is absurdly elusive. It has taken civilization tens of thousands of years to learn most basic truths that we take for granted today. In most cases, only one person discovered the various truths. Aspire to be one of the very few who does see reality in one aspect (near impossible to see the truth in more).
To get to the point of this post, I will be showing you guys the lowest and highest probable price for the week (with 99% confidence).
Without further adieu, let's get into the calculations:
7-day VAR: 2.33*.05*position*sqrt(7) = 30.82% (you will get a number running this calculation, but that number is arbitrary based on position - I have gone the next step and made it a percent)
Read this as: "I am 99% certain the most you will lose holding bitcoin in 30.82% in the next 7 days"
We can take this a step further with two calculations:
1) (position-VaR)/position)*market_price = $ 4,652.24
2) (position+VaR)/position)*market_price = $ 8,798.02
Thus, I am 99% certain the bitcoin will trade within the range of $4,652.24 and $8,798.02 this week. So, if you hear something else from someone else, they are probably wrong :)
-YoungShkreli
P.S. I just want to tell you guys that even though I am the only (I've not seen another - I could be wrong) person on TV who has written code for doing all this stuff and the only one who even talks about statistics used in finance, I am not, by any means, brilliant. I'm sure there will be people who think I am some really old guy who spent a life learning all of this stuff, but I did not. I am a very young person. I am not even a good programmer nor am I a good mathematician/statistician. Anyone of you could do what I have done simply by learning to program for a month and by reading the book: Options, Futures, and other Derivatives. I use Python for all code I write, I would recommend the book: Python Crash Course by Matthes.