Close
Yesterday's open, high, low and closeA very simple script to plot the yesterday's OHLC, to be used in an intraday graph.
There were other scripts like this, but their code was ugly, filthy, smelly, and WET, so I did this.
[blackcat] L1 Close Histogram OscillatorLevel: 1
Background
A histogram is a special chart that is applied to statistical data that is divided into numerically ordered groups. For example groups with close relationships in the vicinity like "Close-ref(Close ,1)", "Close-ref(Close,2)" and so on. A histogram provides a snapshot of all the data so that you can quickly get an overview of the historical data, especially its general shape.In a histogram, the bars are linked - in contrast to a bar chart for categorical data, in which the bars represent categories that are in no particular order and are separated. The height of each bar in a histogram indicates either the number of individuals (called the frequency) in each group or the percentage of individuals (the relative frequency) in each group. Each individual in the data set falls into exactly one bar.
Function
L2 Close Histogram Oscillator is a novel overbought and oversold indicator that estimate the trend state by counting a specific bar relationship nearby. Once nearby bars reach consensus, it may spread to global quickly. The reason why I got this inspiration is because I have been engaged in the research of blockchain consensus mechanism. The market is a complex system, and its consensus depends on the common human characteristics: greed and fear. The trend of the market often also conforms to sociological characteristics. Maybe it's a bit complicated for me to say that. However, if you understand the principle of the spread of rumors and viruses, you can understand the situation where some individuals in the market have local consensus and gradually spread to the overall situation. This is the process of trend formation.
Key Signal
fastcounter --> fast close histogram counters
slowcounter --> slow close histogram counters
attention --> bottom price appears, with height of 10 in white
readybuy --> a small position buy opportunity after first bottom detected, with height of 20 in yellow
buylow --> a small position buy at low price, with height of 30 in lime
longentry --> a confirmed long entry signal by close histogram counter, with height of 40 in green
risk --> oscillator top is reached and trend reversal may happen, with height drop from 100 to 80 in red
Pros and Cons
Pros:
1. since this is based on consensus formation principle, i think this is a leading indicator by spreading local consensus to global
2. it is an oscillator, overbought and oversold can be easily observed.
Cons:
1. the model is not complex enough to depict market behavior exactly.
2. sideways and chop market will make this indicator's output hard to read.
Remarks
This is rare! I combined my previous theory of developing cellular automata with the market to produce such a weird indicator. I hope to inspire everyone and study market behavior in a deeper level.
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
Alternative Daily Reference Points for Intra-hour ChartsThis is a different version of my www.tradingview.com used high, lows and pivots. One problem with pivot points is the number of calculation methods. The alternative version shows historical lows, closes, highs one basic period back.
► On lower timeframes - hour or less - this will show High, Low and Close from the previous day, two days ago, the previous week and two weeks ago and VWAP.
► On 1h daily reference points need to be enabled. On higher timeframes, daily reference points will not be shown. On the daily chart, weekly levels need to be enabled to still show and will be disabled on all higher periods.
► It is configured only for normal timeframes. If you use something like 17-minutes timeframe, you will have to allow this timeframe in the code.
Bear in mind, using all lines at the same time can be a little confusing and price doesn't react to every one of them. You can probably disable lows in the uptrend or scratch closes to simplify your chart.
Have a great trade!
HTF Candle CloseThis draws a label to alert user when a higher timeframe candle closes on a intraday chart.
Purpose of it is so that people who mainly use lower timeframe charts do not forget to look at higher timeframe candle closes.
Close Trade at end of day script serves as an example how we can close trades at end of day.
can be session controlled or the time controlled.
the session should be adjusted to be earlier than the candle time.
Weighted Close [CC]The weighted close isn't an option for an input yet on TV so here is my contribution. It gives more weight to the close prices and I have included a signal line to look for buy and sell signals. Buy when the indicator goes over its signal line and sell when it falls below it.
This was a special request so let me know what other scripts you would like to see me publish or if you want something custom done!
Higher and lower close indicatorSome strategies depend on a higher or lower close than the previous bar's close. With lower time frames and small bars, this can be time consuming. The indicator reduces the time for such decisions by colour indicating the condition. A higher close than the previous bar is denoted by a green dot at the bottom of the screen, red for a lower close and blue for an equal close.
SuperRange - evoA SuperTrend like indicator based on highest and lowest candle close from a few bars back. It looks almost the same as Donchian Channels but with a dominant trend direction inside (Black line).
Uptrend: Candle closed higher than highest close
Downtrend: Candle closed lower than lowest close
This works best on higher time frames since a daily close is more powerful than a 15 minute close.
A few examples how you could use this:
Use support & resistance
Apply a moving average
Buy and sell the break-out
All perfect world examples, this does not happen all the time off course.. Its just for the idea. There are many ways to trade this so feel free to share in the comments, good luck and follow the trend! :)
Monthly MA Close Generates buy or sell signal if monthly candle closes above or below the signal MA.
Long positions only.
Inputs:
-Change timeframe MA
-Change period MA
-Use SMA or EMA
-Display MA
-Use another ticker as signal
-Select time period for backtesting
This script is not necessarily written to maximize profits, but to minimize losses.
Although it can outperform 'Buy & Hold' on some occasions when there is a multiple month bearisch trend.
You can optimise this strategy by changing the signal MA inputs.
I would suggest aiming for the best Profit Factor starting from the monthly ("M") setting.
You can always fine-tune the results at a lower timeframe.
The option to use another ticker for providing signals can give you a more stable and unified results.
For example using AMEX:SPY as signal with default parameters gives better results with NASDAQ:AAPL than if you would use NASDAQ:AAPL itself.
I used the anti-repainting function from PineCoders to prevent repainting.
This script is best used for multi-month trading positions & Daily or 4H setting of your chart.
NSDT Daily Gap RangeSimple script that plots the range between the previous day close and the current day open. This makes it easier to reference the gap up or gap down zone throughout the day.
Highlight Last Bar of: D | W | M | Hour| H4 | MinutesSimple script highlighting a vertical line on the last bar of the Day/ Week/ Month/ Hour/ H4/ minute etc.
Helps maintain visibility of higher timeframes when on lower timeframes.
Quickly identify end of period levels.
Yearly OHLplots Yearly Open, High, Low levels
Interesting interactions to note at previous yearly opens
ANN Next Coming Candlestick Forecast SPX 1D v1.0WARNING:
Experimental and incomplete.
Script is open to development and will be developed.
This is just version 1.0
STRUCTURE
This script is trained according to the open, close, high and low values of the bars.
It is tried to predict the future values of opening, closing, high and low values.
A few simple codes were used to correlate expectation with current values. (You can see between line 129 - 159 )
Therefore, they are all individually trained.
You can see in functions.
The average training error of each variable is less than 0.011.
NOTE :
This script is designed for experimental use on S & P 500 and connected instruments only on 1-day bars.
The Plotcandle function is inspired by the following script of alexgrover :
Since we estimate the next values, our error rates should be much lower for all candlestick values. This is just first version to show logic.
I will continue to look for other variables to reach average error = 0.001 - 0.005 for each candlestick status.
Feel free to use and improve , this is open-source.
Best regards.
[PX] M/W/D LevelHey guys,
this script shows monthly, weekly and daily OHLC data represented as horizontal level.
I tried to make it as user-friendly as possible. Therefore, you can add different colors and styles for each level, as well as turn them on and off.
With the "Label Offset" -parameter you are in control where the label text should appear. You can shift it from left to right and vice-versa. To shift it to the left choose a negative value. To shift it to the right use a positive one.
This best setting for me personally is the "Candle Selection" -dropdown. This allows you to decide wether you want to show the previous candles OHLC-data or the current live OHLC-data.
!!CAUTION!! If you use the "Current Month/Week/Day" -selection be aware that values shown are "live"-data of the current candle. Therefore, values will change the same way your chart keeps changing on live data.
The "Previous Month/Week/Day" -selection on the other hand is historical data and therefore only changes once we reached a new month/week/day.
If you like my work, consider leaving a like :)
Happy trading!
(PCL) Previous CloseI have recently been reading How to Day Trade for a Living by Andrew Aziz and one of the important support and resistance levels he talks about is the Previous Day Close Price.
I did not find an indicator that would simply plot this so I wrote a short simple pine script to plot the indicator.
Please feel free to edit or suggest improvements.
Previous OHLC LevelsQuick dirty code for personal use. Plots previous OHLC levels based on a selected time-frame on the chart.
Not bad if you want to see different time-frame levels.
Fill function can serve to highlight the daily range (high-low or open-close) on non-standard charts
Uses base code from JayRogers
Support/Resistance Zones x3Support and Resistance Levels + Zones for 3 time frames, based on volume at fractal levels with Zones based on wick size which is a true reflection of a Zone when compared to other S/R Zone scripts which only use a thick line not based on anything.
Original script is thanks to synapticex I have just migrated to version 3, heavily modified it and added Support and Resistance Zones.
Range: OHLC vs Previous OHLCThis will plot your choice of OHLC (or any of the averaging choices) of the current candle compared to the previous candle.
For example if you choose "high" for the input and set the chart to daily, you'll see the currently daily high vs the previous daily high.
Green candle represent a higher high and the length of the candle represents how much higher.
Red candles represent a lower high than the previous day and the length is by how much lower.
This indicator is pretty straight forward, look for me to build on this with something a little more elaborate in the near future.
Weekly/Monthly CloseJust a simple support/resistance indicator that display weekly/monthly close price and it is configurable to work in two modes:
tracking mode - to display last week/month's close
history mode - to display weekly/monthly close prices
See how last month's close (ticker blue line) provides nice resistance and the price forms a double top then it consolidates under last week's close line (thiner blue line).
It also works on intraday charts and displays history close prices, see below how last month's close (ticker blue line) provides support over and over and also how price bounces off weekly close history prices (thiner blue line).
Open Close Cross Strategy // Real Back Test // Not goodI changed close series because, close series doing repaint.
I changed the near series with the previous open series .
but can use for sup and resistance
Breakout IndicatorThis script allows you to set breakout alerts.
An alert will be triggered only when price breaks and closes beyond the specified prices. You will get an alert on the first candle that closes beyond the levels you set.
LongSetups with Entry Signals and Trailing Stop(HA)High probable Long Setups for any time frame and asset.
75+ win rate
Trailing stop always used as exit point
To trade only with the trand - enable MAs in the Inputs tab
x - means Entry signal is active and waiting for long validation
B - on a closed bar is entry signal for long
C - on a developing bar is exit long signal
Green line - long validation line. must close above to go long
Pink line - trailing stop
On Long Entry alert - use Once Per Bar Close option.
On Long Exit alert (Trailing stop triggered) - use Once Per Bar option to trigger sooner and protect your capital.
Always do your own analysis and make trades on your own risk. Find a confluence point where everything aligns and make your own decision. Don't enter a trade because the indicator tells you so. You are free to make a copy of the script and change it to your own needs for your own personal use.