I have not found this function anywhere on Tradingview but it can be very useful in setting orders in a strategy and non-integer boundaries for certain indicator designs. Its a bit underwhelming, but in other languages you can call a mod() function and the output will be the remainder of the integer.
If you want to set an order at a specific tick value,...
If 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.
This script is a mixture of my two previous scripts "True Strong Classical Support/Resistance Levels" and "Hidden Supports & Resistances + Round Levels". This combination brings on better identification of the most efficient support/resistance levels.
Note that "Hidden SnR Levels" part of the code is only expected to work on Forex charts, but apart from that, the...
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...
//Strategy based on the idea that stop loss and take profit are often placed at full price levels or round numbers, whcih acts as resistance and supports levels
//Actual price (close) is above round number.
//Round number level was not touched in previous ten bars (arbitrary value).
//Place a buy and follow the order with a trail step because price...