Draw right extended line on "High and Low bar" of pivot High candle - pine-script-v5

I want to draw a line , extended right, on the Low of the pivot high candle and at High of the pivotlow, as applicable in the running market, can anyone suggest a little code which does that? . we should also delete history to make the chart clear. I am new in pine script

Related

Replace default chart in Pine Script while using overlay=true

Is it possible to replace/make invisible the default chart using Pine Script? As an example, the default chart always shows candles. I would like to write an indicator (using overlay=true) to erase (or make invisible) the default candle chart and replace it by just plotting the close values (e.g., plot(close)). This is just a simple example to illustrate what I want to do and where I'm getting stuck. Thanks in advance.
That's something I've needed in the past too, but unfortunately there's currently no Pine Script command available that allows for the manipulation of the visibility of the symbol on the chart.
It can be partially done, by making the body of the candle the same as the background color, but that still leaves the candle wicks and border intact.
barcolor(chart.bg_color)
Unfortunatly, there's no command to do the same for wickcolor and bordercolor.
Another approach could be to plot a new bar over the existing bars, with body, wicks and border all in the background color.
However, that will not work either - not even when you use explicit_plot_zorder=true - because the z-index of the chart symbol is always seems to be higher.
//#version=5
indicator("My script", explicit_plot_zorder=true, overlay=true)
plotcandle(open, high, low, close, "hideCandle", chart.bg_color, chart.bg_color, bordercolor=chart.bg_color)
So, in short, no solution for this yet.

How to implement this stacked line chart in MPAndroidCharts or iOS-Charts

I have a number of charts/graphs created with the ported MPAndroidCharts project iOS-Charts by DanielGindi but I'm getting a request and I'm just not sure it's technically possible with things as they exist today.
I have used gradients but not sure if there's a way to kind of have it just be a 2 sided/colored gradient instead of a gradual fade. I have not created or seen an example of a dotted line coming through the existing chart but assuming zoom isn't a possibility I could hypothetically float a view over the top of it but I'd definitely prefer to have it in the native charts code/implementation.
The first graph is showing how much a user plans to have at retirement, the two shades of green represent different sources of money, the dotted line represents their spending from retirement to their estimated time of death.
The second graph is showing the gap between how much a user plans to have at retirement and how much we project they're missing compared to what they have and how that will look across the time from retirement to estimated death.
Thoughts?
It looks like a line chart with three lines and each with a solid fill.
In the top one, the dashed line graph has a white stroke and no fill, but in the bottom one, it has a black stroke and gray fill.
In the top one, the dashed line should be z-ordered to be on top, but in the bottom one, it should be z-ordered to be on the bottom.

How to make a stacked bar chart where the total measure is always fixed at 100%?

I am attempting to create a 100% stacked bar chart in Tableau where the total stacked measure is always equal to 100% on the axis in order to make a productivity dashboard. I want all filter options to look like the first picture attached below where the total stretches and stops at 100%. However, some cases break this rule, such as going over 100% or when the "All" option is selected and stretches it 700%.
I tried fixing the axis max at 100% and it works perfectly for all the individual employees but since the "All" selection goes up to 700%, it just shows it all the way full at 100%. Is there anyway to make my total measure, in this case "Goal", always set to 100% no matter what the number is? This is my current formula for my total measure of "Goal" {Fixed [Contractor], Date: SUM([Goal])} / {Fixed [Contractor], [Date]: SUM([Goal])}
Thank you for any help!
Employee 1 with normal productivity where the axis is staying at 100%.
Employee 2 going over 100% where the axis then stretches past 100%.
All employees added up where it stretches the axis to over 700%.
This is most likely a problem with the "Compute Using" attributes for the table calculation. Since table calculations are secondary calculations on top of your existing measures you have the flexibility for how they are calculated.
Here is how to adjust this. Click on your measure and select "Edit Table Calculation..."
To get the same result as you I will want the table calculation to calculate on "Table (across)" which will look at the dimension (in my picture, Category) instead of by Category AND Month. The little numbers in brackets and the yellow highlights are especially helpful in showing you how the calculations are being interpreted.
See the default "Table (down)" and the desired "Table (across)" calculations in the screenshot below. You will likely want the same but it might depend on your exact Viz setup.

pie chart but in another shape

I just wanna ask if it is possible to make a pie chart but in another shape.
An example would be say there were two candidates who ran for governor in a state. I would want to show the results in a chart. I want the shape of the chart to resemble the shape of the geographical location of the state.
I did some digging and this is the only one that showed up which may help me(but not really) https://forums.adobe.com/thread/988130
As your adobe thread implies there are (at least) three issues to consider:
1) you want to show the votes each candidate received as a portion of the area of the state. If your state is nearly square, you could overlay a grid and assign each candidate a number of grid cells according to the votes they received. If the grid cells are county or precinct outlines that works even better, but this isn't a pie chart because a pie chart uses a polar coordinate system.
2) if you really must have a pie chart which is polar, consider that the average viewer may not be able to visually integrate the areas to get meaningful results. Further you will have to integrate the area swept out by the sectors of the pie like a radar screen, and this contour integration is made more difficult by the fact that you must do it numerically. This means you must sample the boundary distance as a function of angular displacement from some center of gravity you have chosen, like the state capitol. But depending on the location of the state capitol, your visual could become even more distorted. Idaho comes to mind.
3) a good compromise might be just to overlay a pie chart on top of a silhouette or map outline of the state with appropriate drop shadows and emphasis to make the pie chart pop as well as the state outline. it would certainly be much quicker as well as much more readable.

Using the Overlay feature in panel but showing only an averaged line

I have created an overlay of 100 curves. I thought the image looked impressive but one of my reviewers stated that I should only show the averaged line. Meaning, only show a line that is the average of the 100 curves. Is this possible using the xtline feature, or do I need to get deeper into programming code to produce the graphic? Alternatively, it would be great if I could show both (the 100 curves and the averaged curve) in the same graphic.
You don't need anything complicated here. Just calculate the mean across the panel and show it directly. Here is some technique. I am guessing that in your real example with 100 curves a legend is pointless. Note the c(L) and read the help to find what it does.
webuse grunfeld, clear
set scheme s1color
gen log_invest = log(invest)
egen mean_log_invest = mean(log_invest), by(year)
line log_invest year, legend(off) lc(gs12) c(L) || line mean_log_invest year, c(L) scheme(s1color) ytitle(something sensible)