Plot PreviousLow = if showPrevious and showTodayOnly and Today then RoundUp(prevLow,RoundLevel) else if showPrevious and !showTodayOnly then RoundUp(prevLow,RoundLevel) else Double.NaN PreviousHigh.SetDefaultColor(Color.GRAY) Plot PreviousHigh = if showPrevious and showTodayOnly and Today then RoundDown(prevHigh,RoundLevel) else if showPrevious and !showTodayOnly then RoundDown(prevHigh,RoundLevel) else Double.NaN # Previous Day High/Low - turn off by changing showPrevious to no TCLine.SetPaintingStrategy(PaintingStrategy.HORIZONTAL) PLine.SetPaintingStrategy(PaintingStrategy.HORIZONTAL) īCLine.SetPaintingStrategy(PaintingStrategy.HORIZONTAL) Plot TCLine = if showCPR and showTodayOnly and Today then tc else if showCPR and !showTodayOnly then tc else Double.NaN Plot BCLine = if showCPR and showTodayOnly and Today then bc else if showCPR and !showTodayOnly then bc else Double.NaN
Plot PLine = if showCPR and showTodayOnly and Today then pivot else if showCPR and !showTodayOnly then pivot else Double.NaN # Central Pivot Range - turn off by changing showCPR to no #Addlabel(aggregationPeriod = AggregationPeriod.DAY," Daily Close: " + prevClose, Color.WHITE) ĭef pivot = (prevHigh + prevLow + prevClose) / 3.0 ĭef smallR1 = prevClose + (prevDiff*1.1/ 12) ĭef smallS1 = prevClose - (prevDiff*1.1/ 12) ĭef R3 = RoundDown(prevDiff2 + prevClose, RoundLevel) ĭef R4 = RoundDown(prevDiff + prevClose,RoundLevel) ĭef R5 = RoundDown((R3 + (1.168 * (R3 - R1))),RoundLevel) ĭef S3 = RoundUp(PrevClose - prevDiff2, RoundLevel) ĭef S4 = RoundUp(prevClose - prevDiff, RoundLevel) ĭef S5 = RoundUp((S3 - (1.168 * ( S1 - S3))), RoundLevel) Input aggregationPeriod = ĭef Today = if aggregationPeriod = AggregationPeriod.DAY and GetLastDay() = GetDay() then 1 else if aggregationPeriod = AggregationPeriod.MONTH and GetLastMonth() = GetMonth() then 1 else if aggregationPeriod = AggregationPeriod.WEEK and GetLastWeek() = GetWeek() then 1 else if aggregationPeriod = AggregationPeriod.YEAR and GetLastYEAR() = GetYear() then 1 else 0 ĭef prevHigh = high(period = aggregationPeriod) ĭef prevLow = low(period = aggregationPeriod) ĭef prevClose1 = close(period = aggregationPeriod) ĭef prevClose = if manualClose != 0 then manualClose else prevClose1 # Created by Inspired from and hide_on_daily Possibly others could comment on similarities. Maybe others can comment on this but I've derived most of the values here from the original Camarilla information. There may be another way around this but this was the way I had to resolve it.īy default, the indicator will show Today's levels only but you can show prior days as well - just make sure you set 'Manual Close' back to 0 if you want to look at multiple days.Īnd finally, I am not sure how this is similar/different than PivotBoss work. If you want them to be exact, you need to set the 'Manual Close' to the actual previous day settlement. This makes a slight difference in the levels. The thinkorswim DAY aggregation retrieves the daily close price and NOT the settlement price, which is slightly different. I believe the same limitations exist on Range and Renko charts. This will not work on mobile as it does not support aggregation periods. RoundLevel = 0) but you would want it to be 2 if trading CL or even higher if looking at Forex. I'm rounding the Pivots to the nearest point on NQ (ie. One thing of interest is the 'RoundLevel' variable. Each of these elements can be turned off/on in the options. In addition to the Posty Pivots, I've also included the Central Pivot Range and prior period high/low values as other areas of interest.
That doesn't mean it won't work for other instruments, just what I have spent time looking at. This indicator can be used on Daily/Weekly/Monthly timeframes but it is intended for Day Trading futures. For this reason, there is a vertical line on the chart that displays the RTH open time but can be switched off OR modified to show another time. RTH opens above the bearish reversal zone but then trades back through it.this is weakness and likely targets the bullish reversal zone. They provide context on market opening and inform you what to expect - eg. Read more about these pivots here: Camarilla Pivots. When combined with other analysis like Vol profile, Price Action, Support/Resistance, Trendlines, etc they can become powerful. These levels, as with most pivots, are simply areas of reference.