Last thursday

mastermind007

Well-Known Member
#2
Code:
function IsSelectedDateLastThursday()
{
	DaysinMonth = IIf((Month()==9 OR Month()==4 OR Month()==6 OR Month()==11), 30, IIf(Month()==2, 28 + (Year()%4 == 0 AND Year()%100!=0), 31));

	return (DaysinMonth - Day() < 7) AND (DayOfWeek() == 4);
}
PlotShapes(IsSelectedDateLastThursday() * shapeCircle,colorRed,0,L, -24);
 

KelvinHand

Well-Known Member
#4
Thank u very much sir but i want to plot the ohlc of last thursday. Sorry for the trouble thanks in adv
Code:
_SECTION_BEGIN("Expiry Day");

function IsExpiryDay(dow)
{// -- by mastermind007 - origin IsSelectedDateLastThursday()
	DaysinMonth = IIf((Month()==9 OR Month()==4 OR Month()==6 OR Month()==11), 30, IIf(Month()==2, 28 + (Year()%4 == 0 AND Year()%100!=0), 31));
	return (DaysinMonth - Day() < 7) AND (DayOfWeek() == dow);
}

LastDay = ParamList("Last Day of the Month", "Mon|Tue|Wed|Thu|Fri", 3);
ColorExpiry = ParamColor("Expiry Color", colorYellow);

switch (LastDay)
{
   case "Mon": dow=1; break;
   case "Tue": dow=2; break;
   case "Wed": dow=3; break;
   case "Thu": dow=4; break;
   case "Fri": dow=5; break;
}

Color = IIf(IsExpiryDay(dow), ColorExpiry, 
        IIf(C>O,colorGreen, 
        IIf(C<O, colorRed, colorWhite) ));
Plot( C, "Close", Color , styleNoTitle | styleThick | GetPriceStyle() );
_SECTION_END();
 

jsb2012

Active Member
#6
SOMETHING LIKE THIS??? JUST SUGGESTING. U KNOW THE BEST

DayH = TimeFrameGetPrice("H", inWeekly, -1); DayH = LastValue (DayH,1);// yesterdays high
DayL = TimeFrameGetPrice("L", inWeekly, -1); DayL = LastValue (DayL,1); // yesterdays low
DayC = TimeFrameGetPrice("C", inWeekly, -1); DayC = LastValue (DayC,1); // yesterdays CLOSE
 

Similar threads

Trade in Rs 20, No more % brokerage

Name:Phone:
Email:City:
State:
Are you a day trader?