
11-23-2006, 12:33 PM
|
 |
Senior Member
|
|
Join Date: Sep 2006
Posts: 633
|
|
Quote:
|
Originally Posted by Wackena
pluto,
I was reading the Globin code and have a question. In the Turbo_JVEL part of the code, is the last part below correct. I see you have when trendtype=2 and trendtype=3, both trendtext="Weak Downtrend/Ranging".
When trendtype=3, should trendtext="Strong Uptrend";
Code:
UpTrendVal = iCustom(Symbol(), PERIOD_D1, "Turbo_JVEL",10,-100,0,0);
DnTrendVal = iCustom(Symbol(), PERIOD_D1, "Turbo_JVEL",10,-100,1,0);
TrendVal = (UpTrendVal + DnTrendVal);
if(TrendVal <= -0.1)
{
trendtype = 1;
TrendTxt = "Strong Downtrend";
}
if(TrendVal > -0.1 && TrendVal < 0)
{
trendtype = 2;
TrendTxt = "Weak Downtrend/Ranging";
}
if(TrendVal > 0 && TrendVal < 0.1)
{
trendtype = 2;
TrendTxt = "Weak Uptrend/Ranging";
}
if(TrendVal >= 0.1)
{
trendtype = 3;
TrendTxt = "Weak Downtrend/Ranging";
}
Wackena
|
Yes, good catch there. It should've said "Strong Uptrend".
I've attached a revised EA with the fix. 
|