ShowOnlyLastPeriod for monthly hi low question

P

paw

New member
2019 Donor
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);
 
P

paw

New member
2019 Donor
when i asked on thinkscript lounge they told me this to help:
"When you mean 'show only last period'; you may be thinking off If IsNaN(close[-1] and !IsNaN(close) to figure out when the expansion area starts and your current period ends."
 
BenTen

BenTen

Administrative
Staff
VIP
Just so we're on the same page, you want to display only last month's high and low rather than all the monthly highs and lows, correct?
 
P

paw

New member
2019 Donor
actually it shouldnt be a problem ill just trim my timeframe down thanks for the help!
 

Similar threads

Top