j_npc

It's All Mids

j_npc Updated   
It's All Mids extends mid-lines of a candle forward until the price revisits (covers) the midpoint. A higher timeframe can be used for the mid candles than the chart (but not the reverse). There is no data to support this is a meaningful concept.

While this script is intended to be functional, correct and useful it is important that you understand that not only is this the first script I've written but also that "I am an idiot."(tm) Using a stranger's indicator is questionable, but using a self-proclaimed idiot's indicator to trade real money is unquestionably stupid. Don't be like me. Be smart. You are responsible for what you do with this script. The source is unlocked, so feel free to copy and modify it.

Terms:
- A "mid" is the (high+low)/2 price of a previous candle that has not been auctioned since the candle close. All candles will initially have a mid unless they close on exactly their midpoint.
- A "covered" mid is a mid for which the midpoint has been auctioned since the candle closed. There is an option to display a number of these so that when a mid is hit the line doesn't just disappear from the chart and you forget what you were doing.
- A "low priority" mid is the mid of a candle which was auctioned in the previous candle(s) (chart's timeframe, not the mid's timeframe)-- chopchopchop. I have no data to show that this matters, or really, that anything matters at all.

My use: I chart a 60m mid on ES on a 5 or 15 minute chart. I am lying. I use it for something else but if I tell you that then I give away my incredible alpha that has made me so rich I can spend my time crying in corner about all the money I've lost.
Release Notes:
V1.1 update
Lines start at the mid-time of the midPoint
Details: It's all mids after all. You'd notice this if your chart timeframe is lower than the timeframe of the mids.
Now there are labels.
Details: Maybe you like labels. I like labels sometimes, but not before coffee. Lines to not like labels, even after 3 cups of cold brewed organic free trade coffee sipped at a cat cafe in a sunbeam with one of those derpy tongue gray cats purring on the line's lap. What was I talking about? Right, labels. You'd think, and lemme tell you you'd be dead wrong, that you could just trivially add a yaxis label to any line. Nope. Not happening. Make it a plot you say? Well those can't be looped through or modified, which was how I drew the lines in the first place. So what you get are little tiny numbers next to the line, because knowing the exact price isn't going to help me loose any less money and you are using a free script from an idiot so your judgment doesn't require that level of precision.

------ Original release documentation -------------------

It's All Mids extends mid-lines of a candle forward until the price revisits (covers) the midpoint. A higher timeframe can be used for the mid candles than the chart (but not the reverse). There is no data to support this is a meaningful concept.

While this script is intended to be functional, correct and useful it is important that you understand that not only is this the first script I've written but also that "I am an idiot."(tm) Using a stranger's indicator is questionable, but using a self-proclaimed idiot's indicator to trade real money is unquestionably stupid. Don't be like me. Be smart. You are responsible for what you do with this script. The source is unlocked, so feel free to copy and modify it.

Terms:
- A "mid" is the (high+low)/2 price of a previous candle that has not been auctioned since the candle close. All candles will initially have a mid unless they close on exactly their midpoint.
- A "covered" mid is a mid for which the midpoint has been auctioned since the candle closed. There is an option to display a number of these so that when a mid is hit the line doesn't just disappear from the chart and you forget what you were doing.
- A "low priority" mid is the mid of a candle which was auctioned in the previous candle(s) (chart's timeframe, not the mid's timeframe)-- chopchopchop. I have no data to show that this matters, or really, that anything matters at all.

My use: I chart a 60m mid on ES on a 5 or 15 minute chart. I am lying. I use it for something else but if I tell you that then I give away my incredible alpha that has made me so rich I can spend my time crying in corner about all the money I've lost.
Release Notes:
Updates:
Bug fixes:
  • fixed "indicate low priority mids" to control the color rather then entire display of colorLowpriMids
  • change the timeframe used for low priority mids from the chart tf to the mid tf
  • rounded mid to cents (up on green down on red)
Features:
  • added a fudge factor for mid-covering for those tickers that don't respect the mids to the cent.

If you actually are using this, let me know if there are any features you'd like. Right now I'm thinking about adding a nearest mid highlight color and to update the mid prices to match the tick size of the security (rather than rounding to the penny or not rounding at all).
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?