jngy2k
Member
2nd edit: anyone know who i can use the getday() script to only plot from yesterday forward?
the getday()>=getlastday() only plots for today and days forward
but if i want it to plot yesterday as well what should i do?
edit: with this i solved below problem but new problem is how to get it to plot yesterday forward?
anysuggestions?
edit: this i solved
Good mornings and happy thanksgiving good people!
The following is the code to the pivot points indicator in thinkorswim.
I want to modify the code of that it doesn't show previous days plots.
In the following example, the code shows all pivots for $APPN.
Today being November 25, it will show pivots for tomorrow 11/26 as well as all previous days pivots.
Is there a code I can insert into the current code that will hide the pivot plots for days before Today?
I believe I should be using this code but can't get it to work.
Thanks and happy holidays.
the getday()>=getlastday() only plots for today and days forward
but if i want it to plot yesterday as well what should i do?
edit: with this i solved below problem but new problem is how to get it to plot yesterday forward?
anysuggestions?
Code:
def today = getday()>=getlastday();
edit: this i solved
Good mornings and happy thanksgiving good people!
The following is the code to the pivot points indicator in thinkorswim.
I want to modify the code of that it doesn't show previous days plots.
In the following example, the code shows all pivots for $APPN.
Today being November 25, it will show pivots for tomorrow 11/26 as well as all previous days pivots.
Is there a code I can insert into the current code that will hide the pivot plots for days before Today?
I believe I should be using this code but can't get it to work.
Code:
def today = getday()=getlastday();
plot pivotlines = if today<=today[1] then 1 else 0;
Thanks and happy holidays.
Code:
input aggregationPeriod = AggregationPeriod.DAY;
def PH = high(period = aggregationPeriod)[1];
def PL = low(period = aggregationPeriod)[1];
def PC = close(period = aggregationPeriod)[1];
plot R3;
plot R3M;
plot R2;
plot R2M;
plot R1;
plot R1M;
plot HH;
plot PP;
plot LL;
plot S1M;
plot S1;
plot S2M;
plot S2;
plot S3M;
plot S3;
HH = PH;
LL = PL;
PP = (PH + PL + PC) / 3;
R1 = 2 * PP - PL;
R1M = (R1 - PP) / 2 + PP;
R2 = PP + (PH - PL);
R2M = (R2 - R1) / 2 + R1;
R3 = 2 * PP + (PH - 2 * PL);
R3M = (R3 - R2) / 2 + R2;
S1 = 2 * PP - PH;
S1M = (PP - S1) / 2 + S1;
S2 = PP - (PH - PL);
S2M = (S1 - S2) / 2 + S2;
S3 = 2 * PP - (2 * PH - PL);
S3M = (S2 - S3) / 2 + S3;
R3.SetDefaultColor(GetColor(5));
R3M.SetDefaultColor(GetColor(5));
R2.SetDefaultColor(GetColor(5));
R2M.SetDefaultColor(GetColor(5));
R1.SetDefaultColor(GetColor(5));
R1M.SetDefaultColor(GetColor(5));
HH.SetDefaultColor(GetColor(4));
PP.SetDefaultColor(GetColor(0));
LL.SetDefaultColor(GetColor(1));
S1.SetDefaultColor(GetColor(6));
S1M.SetDefaultColor(GetColor(6));
S2.SetDefaultColor(GetColor(6));
S2M.SetDefaultColor(GetColor(6));
S3.SetDefaultColor(GetColor(6));
S3M.SetDefaultColor(GetColor(6));
R3.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
R3M.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
R2.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
R2M.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
R1.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
R1M.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
HH.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
PP.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
LL.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
S1.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
S1M.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
S2.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
S2M.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
S3.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
S3M.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
R3M.SetStyle(Curve.SHORT_DASH);
R2M.SetStyle(Curve.SHORT_DASH);
R1M.SetStyle(Curve.SHORT_DASH);
HH.SetStyle(Curve.MEDIUM_DASH);
LL.SetStyle(Curve.MEDIUM_DASH);
S1M.SetStyle(Curve.SHORT_DASH);
S2M.SetStyle(Curve.SHORT_DASH);
S3M.SetStyle(Curve.SHORT_DASH);
R3M.Hide();
R2M.Hide();
R1M.Hide();
HH.Hide();
LL.Hide();
S1M.Hide();
S2M.Hide();
S3M.Hide();
Last edited: