hello i was wondering if someone could help me make this indicator a ShowOnlyLastPeriod. I looked at other thinkscripts to try and figure it out but i am not very good at coding and have minimal experience. any help is much appreciated!
input ShowOnlyLastPeriod = Yes;
plot mthHi = high(period = AggregationPeriod.MONTH)[1];
plot mthLo = low(period = "MONTH")[1];
mthHi.SetPaintingStrategy (PaintingStrategy.HORIZONTAL);
mthHi.SetDefaultColor(Color.GREEN);
mthLo.SetPaintingStrategy (PaintingStrategy.HORIZONTAL);
mthLo.SetDefaultColor(Color.RED);
input ShowOnlyLastPeriod = Yes;
plot mthHi = high(period = AggregationPeriod.MONTH)[1];
plot mthLo = low(period = "MONTH")[1];
mthHi.SetPaintingStrategy (PaintingStrategy.HORIZONTAL);
mthHi.SetDefaultColor(Color.GREEN);
mthLo.SetPaintingStrategy (PaintingStrategy.HORIZONTAL);
mthLo.SetDefaultColor(Color.RED);