Thread: Trade Assistant
View Single Post
  #10 (permalink)  
Old 03-10-2008, 12:57 PM
nittany1's Avatar
nittany1 nittany1 is offline
Senior Member
 
Join Date: Dec 2006
Location: Sarasota, FL
Posts: 184
nittany1 is on a distinguished road
Quote:
Originally Posted by Dave137 View Post
The RSI is not right. You forgot "period[x]" in your statements (a number 1 has been replaced in the statement by period[x]). I will let you modify and post the corrected indicator program.

Dave

I believe it should be:

PHP Code:
    //--- RSI arrows
    
for(x=0;x<6;x++)
    {
      if ((
iRSI(NULL,period[x],RSIP1,PRICE_TYPICAL,0)) > (iRSI(NULL,1,RSIP2,PRICE_TYPICAL,0)))
        
ObjectSetText("dI"+x+"1",CharToStr(sBuy),fontSize,"Wingdings",Lime);  
      else if
         ((
iRSI(NULL,period[x],RSIP2,PRICE_TYPICAL,0)) > (iRSI(NULL,1,RSIP1,PRICE_TYPICAL,0)))  
        
ObjectSetText("dI"+x+"1",CharToStr(sSell),fontSize,"Wingdings",Red);
      else
      
ObjectSetText("dI"+x+"1",CharToStr(sWait),10,"Wingdings",Khaki);
    }
    
    
//--- RSI text
    
for(x=0;x<6;x++)
    {
      if ((
iRSI(NULL,period[x],RSIP1,PRICE_TYPICAL,0)) > (iRSI(NULL,1,RSIP2,PRICE_TYPICAL,0)))
        
ObjectSetText("tI"+x+"1"," BUY",9,"Arial Bold",Lime);
      else if             
        ((
iRSI(NULL,period[x],RSIP2,PRICE_TYPICAL,0)) > (iRSI(NULL,1,RSIP1,PRICE_TYPICAL,0)))
        
ObjectSetText("tI"+x+"1","SELL",9,"Arial Bold",Red);         
      else
        
ObjectSetText("tI"+x+"1","WAIT",9,"Arial Bold",Khaki); 
    }  
     
  return(
0);
  } 
Wow thanks for catching that for me, I was tired last night afterall, heh. Actually you missed the second half of the correction too. I fixed it and incremented the version number to 1.12.

- nittany1
__________________
You can find me on irc.ircforex.com most of the time... on #forex
Myspace Facebook My Indicators: Trade Assistant Trend Friend ToR CCI Helper
Holder of US Patent 6,774,788

Last edited by nittany1; 03-10-2008 at 01:04 PM.
Reply With Quote