kidhudi,
i think i understand what you are asking for, but if you are wanting to use this line in an ea, in the long run, the easiest way i know, and one of my favorites to detect a trend is using the iclose function.
example variables
double /*name of your scond variable*/ = iClose(NULL, 2, 1);[/php]
the "0" in the first one, and the "2" in the second one represent the number of bars you look back to determine the trend.
the "1" in both of them say that we don't pay attention to the current bar, and start looking back from the last complete bar. i always have this at at least 1 because the current bar keeps moving, it may screw up your strategy.
example logics
[php]if (/*whatever you may want for your logics*/ && /*name of variable 1 {+,-} name of variable 2 {,=} 0)i have put brackets {} where you have options, whether to make it an uptrend, or and downtrend.
if i haven't answered your question, it might help me better understand if you attatch a picture so i can SEE what it is that u want, exactly.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
i was wondering if one of you guys could make it so the indicator would alert me if i have levels set when touched. man i am horrible at discribing what i need. if i set a level and the i-trend line touches it it would give me a pop-up. i hope someone here can help.
much appreciated.( i hope i spelled that right) :P