View Single Post
  #23 (permalink)  
Old 06-30-2006, 09:54 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
Quote:
Originally Posted by Aaragorn
http://www.forex-tsd.com/35141-post14.html

I like the trend bands...but which variable do I use to embed it in the EA?
If you are writing icustom in EA for trend bands indicator so you will have the following lines (see image).

So in icustom you may have the following:

Code:
double dtb_high=iCustom(NULL,0,"Trend Bands v2",period,0,1);
where:

- NULL - EA will work for any currency (otherwise place simbol instead of NULL);

- 0 - EA will work with the chart for any timeframe you attached to (otherwise place PERIOD_M30 for example or any);

- "Trend Bands v2" - exact name of custom indicator;

- period - period in indicator. This indicator is having some settings. In our case it is one only - period. It is 34 by default. You should place the folowing in the beginning of the EA:
Code:
extern int period = 34;
Or place 34 in icustom instead of period and you do not need to place this additional line in this case (extern int period = 34;);

- 0 - it is line 0 (see image).

- 1 - is first bar. Previous bar starting from current one.

If I am wrong so somebody may correct me.
Attached Images
File Type: gif trendbands.gif (26.9 KB, 72 views)
Reply With Quote