Display Date

J

Jays

New member
Hello All,

I am new to think script and would like to assign the date of the month high and low to a variable.

input ShowOnlyLastPeriod = Yes;
plot MonHigh = high(period = AggregationPeriod.MONTH)[1];
plot MonLow = low(period = "MONTH")[1];
plot MonthHigh = (high(period="MONTH")[1]);

I understand that there is no GetDate function in Thinkscript but how can I get the date of the high or low price assigned to a variable?
Def GetHighDt = GetDate(MonHigh);
Def GetLowDt = GetDate(MonLow);

I would like to use the date variables for other calculations.

Thanks
Jay
 
BenTen

BenTen

Administrative
Staff
VIP
Do you want to plot a line across the chart indicating the previous month's high and low?
 
J

Jays

New member
No. I want to get the total days between the previous month high and low. This variable will be used for further calculations.

Also, If it can be displayed on top of the chart (AddChartBubble) will be helpful.

Thanks
Jay
 
A

alphasandstorm

New member
I would also like to do this. Is is possible? I'd like to get the date of the last high...
 

Similar threads

Top