I'm building quite a lot of pretty complicated indicators/strategies in Pine Script. Quite often they don't work from the 1 try so I have to debug them heavily.
In Pine Script there are no fancy debuggers so you have to be creative. You can plot values on your screens, check them in the data window, etc.
If you want to display some textual information, you can...
A moving indicator that is overlaid main chart. Identifies the start of the day, and then applies this formula:
( Current High of Day + Current Low of Day ) / 2, to get the mid point. It is a useful tool to identify buy side or sell side control, along with vwap.
Simple script which marks out key swing highs & lows.
One of the only indicators I have on the chart most days
- perfect for naked charting
- quickly helps you to visually identify key areas of interest
An extension of Bill Williams fractals
- aka short term swing points
Allows you to filter for only the most prominent swing points
- you can even overlay...
standard pivot points re-written with circle plots.
Only shows the current pivot points. P, R1/R2, S1/S2
I don't use R3, R4 etc. so I didnt include them but feel free to modify the code.
You can change the resolution in indicator settings, default is set to Monthly.
Also to change the size of the circles all at once, you can input a number 1-4 in the inputs section.
This script shows a sample of how to do confidence weighted scoring indicators and for loops with Pine. This indicator may or may not be found useful, it's intent is to provide a sample on how to create such an indicator and use certain Pine features.
- Defined points based on the confidence of RSI and Stochastic indicator
- Defined points based on...
Function - Number of digits before and after the decimal point
Detect the number of digits in integers and floats, before the decimal and after it.
It also works for negative numbers.
There are some rounding issues, but the currently maximum supported number can have safely up to 3 digits after the decimal point.
This indicator contains two simple moving averages that is calculated from the pivot point rather than the closing price. This indicator is described in detail in chapter 6 of the book Candlestick and Pivot Point Trading Triggers: Setups for Stock, Forex, and Futures Markets by John L. Person.
An improved version for minimum and maximum in a day trading session. You can choose the session resolution, it ranges from 1 minute to 1 week.
It works well for stocks and non-extended sessions due to security() function limitations.
Any suggestions, please leave a comment.
Minimum and maximum points in a day trading session. It may help you spot the range which min and max occur in a session.
In day trading, for example, at securities like GBPNZD, minimum happens between 02:00-05:00 ET and maximum between 08:00-14:00 ET. This indicator can help you test this hypothesis.