I want strategy enter long when the price centered around pivot piont - pine-script-v5

I want strategy enter long when the price centered around pivot piont and break next line fibonicca 0.236 up by 2 piont
and stop loss down pivot point by 2
and strategy short
exit
in thw event of adownward fibonacci reversal
As in attached picture
photo

Related

How to hide Pivot Points HL if outside a range of candles count

I am trying to modify the TradingView "Pivot Points HL" indicator code to hide pivots if the Right value (count of new candles to the right) is outside a range. For example, If I set it to "10/15" now it just prints the Pivot as soon as 15 candles appeared and they are all lower (for pivot high). I want to make it basically go back and hide it if that count say becomes "30".. so "10/30" will hide the pivot (so a Pivot will be shown as long as the right count of candles is >= 10 and <= 30). Is there a way to do that in Pinescript? What modifications to make on the Pivot Points HL source code to achieve that? Thanks.

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.

Tableau Percentage calculation

I am learning Tableau using sample dataset Sample Superstore. I am trying to find out, For a given period let us say January 2012, what percentage of sales were shipped using a specific product container (e.g. Jumbo Box)
When containers are in Rows, I get 2.22% and when I flip row to column and vice-versa I get 9.17%. Would appreciate some inputs to clarify this.
2.22%
9.17%
When you use table calculation the values will differ according to the viz and what type of calculation you have used. For example table down will calculate from top to bottom and table across will calculate from left to right. Like this you will see many other options for calculations.
In below example I have used running total with table across that is direction from Left to Right column values (2014,2015,2016,2017,2018).
Example:
Image1 - Original Data(without table calculation)
Data with table calculation - running total(table across)
In below image, Left to Right values are Ship Dates against Segments. Look at the Yellow color highlighted row. Year 2015 for Consumer Segment the sales value is 40,656 but in the original data(Image1) it is 24,635. The reason it is showing 40,656 is because table calculation is performed with running total by table across(left to right), so the original value 24,635 is added with previous Year's(2014) value 16,021. Hence 16021 + 24635 = 40656. It means Left value(16021) is added with the Right value(24635). This pattern will continue till the right most value.
Image2
Columns and rows are switched
In below image(Image3) Left to Right values are Segments against Ship Dates. The Columns and rows are switched. The value of Corporate Segment for the Year 2014 is changed to 25950(blue circle) because the left side value 16021 is added with the original value 9929(Image1).
Image3

Tableau: stacked column with line

I'm trying to graph workload (by day) stacking hours from tasks. I'd like to add a line indicating daily capacity of the relevant resource. I have a table for tasks and table for daily resource capacity.
When adding capacity as an independent data source, I get an error indicating I need a relationship to the primary data source.
If I join the data (on date and resource), I can get a capacity line to show, but only by adding it to the secondary axis, which leads to mismatching of scales (unless I lock in the same maximum scale for both primary and secondary axes). This works, but it's less than ideal :
a) it requires foreknowledge of maximum load,
b) lower usage resources barely move off the horizontal axis,
c) it seems to force the capacity line to use the same color palette as the column chart, plotting each time period with a different color.
Does anyone have any better suggestions?
So both axes are hours? You can synchronise the two axes to make it dynamic. Just right click on the axis on the right and there should be a check box titled "synchronize dual axes". Check that and it will sync both of them and will responded to changes dynamically.
You can also then hide the axis marks for hours on the right to make it look better. Again right click the axis and deselect the "Show Header" option.

HighCharts gauge big figure and congested percentage issues

I am having follow issues in the highchart gauges:
Sales Revenue the gauges does not start with the ranges i have assigned to it check Sales/Revenue block, ranges that i provide to the gauge is:
511721.61 604761.90 604761.91 744322.34 744322.35 1116483.52
another issue is in the profit percentage block, ranges are too closely bound. does not look good, ranges are, 40.01 41.87 41.88 44.19 44.20 46.52
third issue is if the dialer figure is exceeding the range values, the needle circles over the dialer again and stops on a wrong figure, i want that if the needle should not recircle and stop on the end of the green end.
https://jsfiddle.net/9mcw95bf/1/
[https://jsfiddle.net/9mcw95bf/1/][2]