close price numberIn this script, we're creating a custom indicator to plot the previous day's closing price on the chart. This script retrieves the previous day's close using ta.change(time('d')) function. Then, it checks the value of the previous day's close and determines the increment accordingly input . Finally, it calculates the current day's close by adding the increment to the previous day's close and plots it on the chart.
The script can be integrated into a trading strategy to generate buy or sell signals based on the crossing closing price+increment line ...
Psychological Levels: previous day close price + increment numbers tend to have psychological significance in trading. Traders often pay attention to these levels because they represent key price levels that are easy to remember and widely recognized. When the price approaches these levels, traders may anticipate increased buying or selling pressure, leading to potential support or resistance.
For take profit and stop loss -Trader can use this as a take profit level on every previous day close+increment or close-decrement
buy signal-
1)whenever price cross any previous day close+number it give buy signal
2) i am using ma for filter buy signal we can enable and disable that function from input
sell signal-
1)whenever price cross any previous day close-number it give sell signal
2) i am using ma for filter sell signal we can enable and disable that function from input
Roundnumber
Round Number LevelsQuick Script to mark out round number levels. These levels often become reversal points or where the next price range will develop. This script is intended to be a tool to aid along with additional trading strategies.
Round NumbersThis is a variation of "Round numbers above and below" indicator by BitcoinJesus-Not-Roger-Ver. I've made it two sets of lines and round number range changeable. Defaults at 100 and 500 round numbers.
Round Numbers and Quarter LevelsThis script is based on "Round Numbers Above and Below" by BitcoinJesus-Not-Roger-Ver, but unlike this script that only shows "Round Numbers" levels, my script also shows "Quarter Number" levels like 25 and 75 that are very important for those who follow the quarters theory.
Also the original script doesn't have different colors for different levels while my script has different colors and different styles for every level, this way it will be much easyer to recognize the levels at first sight.
Finally the origianl script only works with Forex while my script also works with indexes like SP500 and others.
Round Numbers are very important psychological levels in trading but also quarters levels (25 and 75) have a huge importance, so I created this script that shows all these levels with different colors and different lines style.
You can edit the color and the style of the lines as you wish and you can add all the levels you want.
In 1 hour chart 4 levels is usually enough but if you watch a daily chart then 8 levels is way better.
Features:
Personalize color to 00 round levels
Personalize color to 50 round levels
Personalize color to Quarters levels
Personalize line style to 00 round levels
Personalize line style to 50 round levels
Personalize line style to Quarters levels
Choose number of lines above and below price level (4 is default)
Institutional Price LevelsInstitutional price levels
(AKA round numbers, Perfect Price Levels-PPL)
Institutional Price Levels (IPL) script shows the closest round numbers from the current price.
Some traders uses round numbers as a support resistance levels.
For example: 0.000 0.500 1.000 levels. Additional levels are 0.200 0.800.
So I made a simple script that shows round numbers and the quarter levels(Not exactly quarter but minor levels)
Quarter level option is planned on next update.
Default range is 300 pips and you can extend until 500 pips range.
Time range is extandable to the right and left side. You can just extend the line by increasing the bar numbers.
Inputs:
Show levels - Can show and hide all levels. Level colors are optional.
Show quarter - Can show and hide minor levels which is 0.800 0.200 levels. Colors are optional
Show more levels - Can show and hide more levels. Default range is 300 pips. Additional 200 pips range is optional.
Extend right bars - Can set length of levels to the right side.
Extend left bars - Can set length of levels to the left side.
Thank you.
Auto Round levels by Script051This indicator is designed to show psychological levels/round levels.
The difference between this version and the others is that :
It will automatically show round levels for each symbol you select without having to enter "tick value" manually.
Settings
Gap : If the value is equal to zero, the round levels will be found automatically, but if you change the value, the gap between the lines will be adjusted based on the value you specified.
X2 and /2 : doubles or halves the distance between round lines
Number of lines : Specifies the number of lines to be displayed
Round Number ZonesThis indicator shows zones of round numbers for 3 custom symbols like US30, EURUSD or GOLD as lines in the chart. The starting price can also be the current or a custom one and you can configure the increments as well. CAPITALCOM:US30
math_utilsLibrary "math_utils"
Collection of math functions that are not part of the standard math library
num_of_non_decimal_digits(number) num_of_non_decimal_digits - The number of the most significant digits on the left of the dot
Parameters:
number : - The floating point number
Returns: number of non digits
num_of_decimal_digits(number) num_of_decimal_digits - The number of the most significant digits on the right of the dot
Parameters:
number : - The floating point number
Returns: number of decimal digits
floor(number, precision) floor - floor with precision to the given most significant decimal point
Parameters:
number : - The floating point number
precision : - The number of decimal places a.k.a the most significant decimal digit - e.g precision 2 will produce 0.01 minimum change
Returns: number floored to the decimal digits defined by the precision
ceil(number, precision) floor - ceil with precision to the given most significant decimal point
Parameters:
number : - The floating point number
precision : - The number of decimal places a.k.a the most significant decimal digit - e.g precision 2 will produce 0.01 minimum change
Returns: number ceiled to the decimal digits defined by the precision
clamp(number, lower, higher, precision) clamp - clamp with precision to the given most significant decimal point
Parameters:
number : - The floating point number
lower : - The lowerst number limit to return
higher : - The highest number limit to return
precision : - The number of decimal places a.k.a the most significant decimal digit - e.g precision 2 will produce 0.01 minimum change
Returns: number clamped to the decimal digits defined by the precision
Round numbers above and below(Forex) (Original by DavitBrunet)Round number indicator that draws horizontal lines at each 50 pips for Forex.
The original indicator is developed by DavitBrunet and I have modified enabling to select line style, line color and line width.
Original: ROUND-NUMBERS-INDICATOR-BY-DAVID-BRUNET
Thank you @DavitBrunet for inspiring me!
----------------------
50pips 刻みのキリ番を表示するインジケーターです。(対象は為替商品のみ)
DavitBrunet氏作成のインジケーター"ROUND-NUMBERS-INDICATOR-BY-DAVID-BRUNET"をライン種類、ライン色、ラインの太さを選択できるように変更しました。
オリジナル: ROUND-NUMBERS-INDICATOR-BY-DAVID-BRUNET
Stronger Classical Support/Resistance + Round LevelsI wrote some Support/Resistance scripts before this. In this new script, I implemented the logic of the code from the scratch, so it's very different from my previous S/R indicators and I think it's more advanced, accurate and efficient.
As the result it could do the followings for now:
- Draw more strong classical resistance/support levels by checking previous direction changes of the chart as far as Pine technically allows
- Colorize the levels based on the counted points of retracement/pullback (The darker the color is, the stronger the level is.)
- Show the number of reactions to each level
- Change the color of each level based on its main role as support, resistance or both
- Draw close round levels to current price for Forex pairs
I suggest all users of my previous S/R indicators to try this one.
Feel free to send me any issue or opinion!
Proper Round Functions [QuantNomad]Round function in PineScript is very simple and allows you to round numbers only to the closest integer number. This is a bit irritating because I very often have to round numbers to some decimal places and not integer.
So I created 2 functions I use all the time and now sharing them with you.
roundn - rounds the values in its first argument to the specified number of decimal places.
roundtick - rounds the values to current symbol mintick
I hope they will be useful for you.
Hidden Supports & Resistances + Round LevelsIf you search the internet, you won't find much about these types of resistance and support levels. Hidden levels are SnR levels calculated based on some psychological patterns and sometimes it's unbelievable that the chart responds to these levels.
So use the indicator and check the idea.
Foreign Currency Psychological ResistanceThought it would be interesting to look into psychological barriers (round numbers) denominated in foreign currencies and see where those barriers show up on a USD chart.
I did a couple of quick and superficial Internet searches to get an idea of which USD pairs are being used the most to trade Bitcoin. My conclusion is that the most relevant currencies are the Chinese Renminbi and the Brazilian Real.
Based on that, I wrote this little indicator that uses the exchange rate from the USD pairs (USDCNY, USDBLR) and the round number targets to come up with the corresponding USD price levels.
Pine Script Tutorial #4Welcome to Pine Script Tutorial #4
This is more complex than the previous 3 tutorials. This one builds upon the first 3 tutorials.
What does this code do?: It plots on a histogram (at the bottom), the difference between closest round number and the close. So for example 84 -close = 16 pips. It shows the 16 pips on the histogram.
First off, it is actually Two studies on this graph, not one. I wanted the histogram at the bottom and round number indicator to overlay on the graph. There is no code within Pine Script that lets you do that within one script.
Secondly, there is no code that lets you spit out number on the graph, that is why I used histogram, initially I wanted it to tell me 16 pips in writing but no way of doing that.
In order to replicate the graph you have to first plot the rounding formula as overlay. Thean take out the overlay and plot te histogram.
I got the rounding formula from one of the coders here and simplified it. Just search round.
Hope this helps,
Feel free to comment.