Today is a Pinescript hack to display multiple colors in one label.
I used that panel to show the Supertrend Long Term values (weekly, monthly, quarterly, yearly)
What is a Supertrend?
Definition: SuperTrend is an indicator that works on all timeframes and all instruments (stocks, , forex, ...). It is a great tool to follow market trends and optimizes your profits.
SuperTrend evolves below or above the prices depending on the trend. You can use it as an exit position indicator when its direction changes. You can also use it to place your stops.
So.... the hack is?
The hack is about creating a new label for each line - versus creating just one label containing the whole text
👉 BEST documentation: https://bit.ly/2urOkPO
💬 Discord: https://discord.gg/K6NCTX4
📺 Youtube: https://bit.ly/3bKvnZu
30💲 OFF TradingView ref: https://bit.ly/2SWgYBY
by default it's lapos_x = timenow + round(change(time)*50)
if you change 50 by 100 it will be more to the right. 150 even more to the right again
2/for vertical alignment, it's the variable called lapos_y
by default, it sets the panel to the latest close level
If you the label to be more to the top you can do lapos_y = close * 1.02
This will put the label 2% more to the top
lapos_y = close * 0,98 will set the label 2% more the the bottom
Now it's up to you to figure out the values you need :)
sir, thank u so much...one more quick question, how do you add daily, previous day, next day and last week high/low...i am currently thinking to include in my central pivot range(CPR)...that would be a great help..sir..
previous day high = security(syminfo.tickerid, 'D', high)
next day is obviously impossible because unknown. We cannot forsee the futur yet, maybe soon.... who knows.
sir, i am new to coding..i see some of the great persons using CPR., its purely based on pricing...and the results are great...next day cpr is calculated by the formula..of todays high and low i guess...i am also trying to find it..if i get it...i will definately share with you...
how to enlarge and include more information in the label? thank you so much once again...
I couldn't get it to show the blue, green, purple and red lines like on your chart. I copied the scrip as is and pasted it into pinescript. The code was validated - so no problems there. I can't figure why I'm not seeing the lines on your chart that it's meant to draw. I'm getting the panel showing ok.
Can you advise.
That's normal because this script isn't displaying those supertrends
You can add them using this indicator for example