Dear sh
a small contribution to ur strategy. an afl to count the number of days
_SECTION_BEGIN("total days");
SetBarsRequired(1000000,0);
function TotalDays()
{
yy = Year();
dy = DayOfYear();
leapyear = ( yy % 4 ) == 0 AND yy != 2000;
yearlen = IIf( leapyear, 366, 365 );
return yearlen * (yy - yy[ 0 ]) + (dy - dy[0]);
}
td = TotalDays();
dy = DayOfYear();
//Plot( td, "TotalDays", colorRed );
ts15dy=ValueWhen((L<=EMA(C,15) AND H>=EMA(C,15)),td);
ts34dy=ValueWhen((L<=EMA(C,34) AND H>=EMA(C,34)),td);
ts100dy=ValueWhen((L<=EMA(C,100) AND H>=EMA(C,100)),td);
Plot( td-ts15dy, "e-15 test Days", colorBlue );
Plot( td-ts34dy, "e-34 test Days", colorGreen );
Plot( td-ts100dy, "e-100 test Days", colorRed );
_SECTION_END();
hope this will help all. hope u will aprreciate this
vyasa
a small contribution to ur strategy. an afl to count the number of days
_SECTION_BEGIN("total days");
SetBarsRequired(1000000,0);
function TotalDays()
{
yy = Year();
dy = DayOfYear();
leapyear = ( yy % 4 ) == 0 AND yy != 2000;
yearlen = IIf( leapyear, 366, 365 );
return yearlen * (yy - yy[ 0 ]) + (dy - dy[0]);
}
td = TotalDays();
dy = DayOfYear();
//Plot( td, "TotalDays", colorRed );
ts15dy=ValueWhen((L<=EMA(C,15) AND H>=EMA(C,15)),td);
ts34dy=ValueWhen((L<=EMA(C,34) AND H>=EMA(C,34)),td);
ts100dy=ValueWhen((L<=EMA(C,100) AND H>=EMA(C,100)),td);
Plot( td-ts15dy, "e-15 test Days", colorBlue );
Plot( td-ts34dy, "e-34 test Days", colorGreen );
Plot( td-ts100dy, "e-100 test Days", colorRed );
_SECTION_END();
hope this will help all. hope u will aprreciate this
vyasa