| PureBytes Links Trading Reference Links | 
Andy Dunn wrote:
> 
> Could someone please tell me how to code the following paintbar study
> 
> color a bar X days in the past
> 
Here's one that calculates calendar days...
Inputs: Lookback(15);
Value1 = DateToJulian(LastCalcDate);
Value2 = Value1 - Lookback;
If Date = JulianToDate(Value2) then
Plot1(High,"Lookback");
Plot2(Low,"Lookback");
Of course it won't plot if the day is a weekend or holiday. 
Perhaps, someone will provide a modification that uses
barnumbers (trading days).
Ron Archer
archer@xxxxxxx
 |