This might get you started.
start=Param("days_back",21,5,1000,1);
bi = BarIndex();
Plot( IIf( bi < LastValue( bi ) - start, Null, EMA( C, 21 ) ), "EMA", colorRed
);
Plot(C,"",colorBlack,styleCandle);
----- Original Message -----
From: googool123123
To: [email protected]
Sent: Sunday, May 16, 2010 9:51 AM
Subject: [amibroker] How can I start plotting from a fixed number of days ago?
Hi,
Is it possible to start plotting from a fixed number of days ago?
for example, if I have a code like this
start = DateNum() < startdate
to be more specific my code has startdat as parameter like this
startdate = ParamDate("Starting Date ", "2004-01-01");
but I want to have it fixed on a time window, say, 11 days ago
is it possible to code start date so that it always is 11 days ago?
Many thanks in advance?