View Single Post
  #24 (permalink)  
Old 06-30-2006, 10:23 AM
newdigital newdigital is offline
Administrator
 
Join Date: Sep 2005
Posts: 16,799
Blog Entries: 144
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
As I saw Kalenzo did it in different way.
I mean this one:

Quote:
- 1 - is first bar. Previous bar starting from current one.
He did as following:

Code:
{
   int limit;
   int counted_bars=IndicatorCounted();
   if(counted_bars<0) counted_bars=0;
   if(counted_bars>0) counted_bars--;
   limit=Bars-counted_bars;
And after that:

Code:
double dtb_high1=iCustom(NULL,0,"Trend Bands v2",period,0,i);
double dtb_high2=iCustom(NULL,0,"Trend Bands v2",period,0,i+1);
It is for line 0.

For line 2 (blue one) it may be the following:

Code:
double dtb_low1=iCustom(NULL,0,"Trend Bands v2",period,2,i);
double dtb_low2=iCustom(NULL,0,"Trend Bands v2",period,2,i+1);
So the price should be above or below some lines (double dtb_low1, dtb_low2, double dtb_high1 and double dtb_high2). And there is middle line as well (the same but with 1). It may be double dtb_middle1 and double dtb_middle2 for example.
Reply With Quote