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 Numbers Breakouts Smart Formula Signals and AlertsThis indicator uses Round Numbers breakouts and then uses smart formula with the near Round Numbers to determine best TP (take profit)/SL (stop loss) areas. Furthermore, it calculates win percentage, shows in-profit/in-loss peaks and the price amount result over a customizable date range, which when combined well with the smart formula provides decent profitable outcome. I have decided to write my own backtesting engine as the integrated TradingView strategy one has limitations and has shown inconsistencies when compared to manual backtesting…
There are many settings you can manually change to trade any instrument, any style, any approach and there are presets included for Bitcoin(BTCUSD), FOREX(EURUSD), SPY(S&P500), so you can start trading immediately! Alerts correspond to indicator settings and are turned on with a few clicks. There are 3 tables (each can be shown/hidden) showing everything you need to see/know to calibrate the indicator as you wish.
Labels, lines, tables explanations (everything can be hidden/shown):
- LONG Labels: medium-green: position open, dark-green: SL, bright-green: TP, blue: TP2
- SHORT Labels: medium-red: position open, dark-red: SL, bright-red: TP, purple: TP2
- Gray circles: position entry area | Yellow crosses: SL area
- Green line: Long TP1, Blue line: Long TP2 | Red Line: Short TP1, Purple line: Short TP2
- Grey lines: Round Numbers (customized via “Round Number up/down measure unit” input)
- Yellow labels at end of each week: end of week OVERALL total results
- Red colored background: power segment
- 3 tables: 1) INFO | STATS, 2) SPY Options Calculator, 3) Indicator Settings
If you decide to fully customize the indicator yourself, on the very top - under “PRESETS” select “MANUAL”! NOTE: If you select any of the pre-set presets, only GLOBAL settings can be changed, the rest of the settings will be “frozen” until you switch it to “MANUAL”!
- Global Settings are self-explanatory and mainly observational, show/hide, etc.
- Manual TP2 (Multi-Take-Profit) Settings:
>>>>> Include TP2 System? Turn on/off multi-profit system, with this unchecked, every trade will either end with SL or with TP1.
>>>>> TP2 System: NEAREST/FORMULA, NEAREST – after TP1 is taken > next TP2 will be a round number price target nearest to where TP1 was taken (sometimes it can be very near, sometimes further away…), FORMULA – 2nd round number price target will be optimally selected based on the distance behind and ahead of TP1 area. For TP2 – FORMULA would be the most logical choice as with multi-take-profit setting turned on – you’d want to ride it out as far as possible.
>>>>> TP1/TP2 division type: 1) Each price target (TP1, TP2) will be ½ of the position 2) TP1 will be 2/3 of the position and TP2 will be the remaining 1/3.
>>>>> TP2 hit type: “close” > candle has to close on top/crossing the price target line, “touch” > once candle touches the price target – you will be immediately alerted to take the partial profit (if you will use such setting – you will need to take the partial profits as soon as you receive the alert.
>>>>> TP1 > Back to Entry hit type: similar to TP2, “close” > candle close, “touch” > candle touch. Please note: this is a very tricky setting as if you use “close” option – your profitable trade may become a loss if a huge candle will close against your position eliminating your TP1 profit, however often the price will touch and cross the entry area to only bounce and continue with your position direction for even bigger profits… so experiment with the date range results to see what works best for your instrument/setting/strategy.
>>>>> TP2 count towards trades count: this can be a bit confusing, but it is simply how should TP2 be treated towards trades count. The indicator will show you Win Percentage and Win % is obtained from winning trades count divided by total trades count. While TP2 is not “a new trade”, it expands the profit of the trade. This is an experimental setting to count TP2 as the whole winning trade, ½ of a trade, or not count it at all.
- Manual Signals/TP1 Settings:
>>>>> TP1/TP2 offset: this one is really cool, with this feature you can hunt these conditions when the price comes very near the profit target area, but never touches it. With this setting turned on and with a good offset amount – you will be able to catch these for TP1 and TP2!
>>>>> TP1/TP2 offset amount: just what the title says, please be careful with this as this number varies significantly depending on the instrument you will be trading. Examples: 1) For SPY 0.1 would be $0.10 offset - if TP1 is $400 and price hits $399.90 > TP1 considered taken/signal shown/alert) | 2) For EURUSD, it is very different and if wrong will show TP1 immediately at position open, typical good offset for EURUSD is: 0.0005 | 3) For BTCUSD, 10 - $10 offset, if TP is $15,000 > $14,990, etc.
>>>>> Round Number up/down measure unit (in dollars $): this one is very important if you will be using “MANUAL” selection to build your own setup as it is very different for every instrument. For SPY, round numbers are single dollars or even half-dollar 50 cent numbers: 1 or 0.5 (350, 351, 352, etc. or 350.50, 351, 351.50, 352, etc.), while for Bitcoin (BTCUSD) a single unit ($1) is too small to be a round number as Bitoin moves much faster and wider every second and it would have to be at least 50 ($50) to make sense. Similar for FOREX (EUR/USD) a single 1 unit ($1) will be too big as EURUSD will never move a whole $1 in 15 minutes or even a day.. and would have to be something like 1.05500. You can easily determine if this number makes sense for your instrument by observing the grey Round Number lines which will correspond based on this setting. You can also visually observer if the price of the instrument appreciates these round numbers.
>>>>> Close Position Before Market Closes: just what the title says. Indicator will close the position 15 minutes before market closes (US session), update backtesting stats, alert you.
>>>>> Close Position Before Power Hour: 3PM – 4PM ET is the last hour of US trading session, where sudden move in any direction can happen with huge volatility, while sometimes nothing will happen at all… Many try to avoid it, so if you wish to avoid it as well - turn this on and it will alert you to close your positions 15 minutes before Power Hour starts, backtesting/stats will be adjusted accordingly.
>>>>> Skip OVERSIZED candles in signals: turn on this setting to skip signals, which happen to fall on big candles. This is basically a protection from huge volatility moves, which usually happen during financial news/events and if you are not a fan of these – you can set this option for indicator to not open anything based on the candle size.
>>>>> Color OVERSIZED candles: this will help you calibrate the size of the OVERSIZED candles if you decide to use this setting and overall visually see them.
>>>>> OVERSIZED candle size: OVERSIZED candle size must be input as it varies significantly. Please note: for each instrument – the size number is completely different, as for SPY: 2 would mean any candle bigger than $2 distance will be considered OVERSIZED, for Bitcoin it would have to be several hundred dollars, like 400-500. For FOREX, this would have to be a decimal, for EURUSD something like 0.0005. It’s best to experiment visually with this setting depending on the instrument you will be trading while setting up the size. To see a typical huge unusual candle – look up financial calendar for something like FOMC meeting, then measure the candle input it into this setting.
>>>>> OVERSIZED candle size calculation type: this is just more flexibility for your preference. If you wish to calculate the size of the candle based on the open/close – select “BODY”, if you wish to use high/low – select “STICKS (from tip to tip)”. Hard to say which one is better, so it is up to you to decide.
>>>>> Include EMA in signal formula: LONG signals will only be shown only if above EMA, SHORT if below EMA. EMA length is of course customizable in below.
>>>>> Skip opposite candle types in signals: signals where the candle color confirms the direction of the trade, but the candle type is opposite (like a green colored bearish hammer for example) will be avoided (such candles can be very uncertain/deceptive).
>>>>> Skip doji: signals where the signal candle is doji (uncertain) will be avoided.
>>>>> TP1 hit type/system: same thing as TP2 hit type/system.
>>>>> SL hit type/system: same as TP1 and TP2 types/systems.
>>>>> Intraday Session Signals Active Time in ET: time range during the day when indicator will show signals (open trades, alert you, etc.). This is specifically for intraday trading. You can turn it off completely by selecting a BLANK option.
>>>>> Intraday TP/SL Active Time in ET: same as above, but for taking profits/stop losses.
*** To add the alerts
-Right-click anywhere on the TradingView chart
-Click on Add alert
-Condition: Select this indicator by it’s name
-Alert name: Whatever you want
-Hit “Create”
-Note: If you change ANY Settings within the indicator – you must DELETE the current alert and create a new one per steps above, otherwise it will continue triggering alerts per old Settings!
If you wish to try this out for a week or so – please write me directly and I will give you access.
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
Custom GridIt's a simple little tool that enhances Tradingview's horizontal level grid. Set the range of up to 12 assets, you save your model, and the levels will show up automatically when you switch between graphs.
it is obvious to note that the market reacts on the round levels if it discovers its levels for a long time.
Where using notions of supports / resistances gives you level information once the level has been created, again you can correlate this indicator with other SMC and price action tools to identify areas of rejections or dips. institutional interventions.
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
Spartan Trading Round NumbersRound number Swing Trading System:
Setup part 1: Set Near Round Number And Specific Gap in indicator input session
Setup part 2: What is the direction of the trend? Use Dow Theory, moving averages or your preferred technical analysis to determine the trend. Only trade with the trend.
Setup part 3: Wait for the price to swing in the direction of the trend
Setup part 4: Wait for a correction to begin after a high in an uptrend or low in a downtrend near a round number.
Entry price: Set your entry price at the next round number up in a downtrend or down in an uptrend
Stop loss: Set your stop loss at the next but one round number or the fifty level
Take profit: Set your profit target 200-300 Points from your entry price.
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!
Auto Round Number and Repdigit LineAuto Round Number and Repdigit Line
It is an indicator that automatically draws round numbers of any number of digits and doublet horizontal lines.
Two horizon lines are drawn above and below the current price and are designed to always follow the price.
For "Round-Up / Round-Down Digits", specify "Number of zeros you want to arrange".
For "Repdigit Digits", specify "what digit of the current price you want to get doublet".
If you want to know how it behaves, use "Bar Replay".
(Google Translate)
任意の桁数のラウンドナンバーとゾロ目の水平線を自動で描画するインジケーターです。
水平線は現在の価格の上下に2本ずつ描画され、常に価格に追従するように設計されています。
「Round-Up / Round-Down Digits」は、「並べたいゼロの数」を指定してください。
「Repdigit Digits」は、「現在の価格の何桁目をゾロ目にしたいか」を指定してください。
挙動を知りたい場合は、「バーのリプレイ」を使ってください。
00,25,50,75,00 - RND/LVL00,25,50,75,00 - RND/LVL
This concept is very simple..
Use round numbers as support and resistance, target the (.25 - .50 - .75) levels for take profit..
Basically, the rounds numbers are high liquidity zone (psychological and banks levels)
You can clearly see the price moving between those zones.
Recommanded timeframe : M30-H1-H4 (M15-M30) for entry..
I usually look at rejection at those levels for short or buy depend of the context.
You can place SL on the next .25 pips over the hard round numbers resistance-support.
Good Luck and if you have any comments, write bellow.
Thanks!
Here some example :
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.