// Downloaded From https://www.WiseStockTrader.com
// Calculate the daily Pivot and S/R //

TimeFrameSet(inDaily);
PPFloor = (H + L + C)/3;
R1Floor = (PPFloor * 2) - L;
R2Floor = PPFloor + H - L;
R3Floor = H + 2 * (PPFloor - L);
S1Floor = (2 * PPFloor) - H;
S2Floor = PPFloor - H + L;
S3Floor = L - 2 * (H - PPFloor);

TimeFrameRestore();

// Plot the Pivot Point //

Plot(TimeFrameExpand(PPFloor,inDaily,expandLast), "Pivot Point", colorLightBlue, styleThick);

// Plot the Resistance Level Clouds and Line //

Plot(TimeFrameExpand(R1Floor,inDaily,expandLast), "R1", colorGreen, styleThick);
Plot(TimeFrameExpand(R2Floor,inDaily,expandLast), "R2", colorGreen, styleThick);
Plot(TimeFrameExpand(R3Floor,inDaily,expandLast), "R3", colorGreen, styleThick);

// Plot the Support Levels Clouds and Lines //

Plot(TimeFrameExpand(S1Floor,inDaily,expandLast), "S1", colorRed, styleThick);
Plot(TimeFrameExpand(S2Floor,inDaily,expandLast), "S2", colorRed, styleThick);
Plot(TimeFrameExpand(S3Floor,inDaily,expandLast), "S3", colorRed, styleThick);