View Single Post
  #11 (permalink)  
Old 11-23-2006, 11:25 AM
Wackena's Avatar
Wackena Wackena is offline
Senior Member
 
Join Date: May 2006
Posts: 216
Wackena is on a distinguished road
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
Reply With Quote