Thread: Trade Assistant
View Single Post
  #9 (permalink)  
Old 03-10-2008, 12:33 PM
Dave137 Dave137 is offline
Senior Member
 
Join Date: Oct 2007
Posts: 197
Dave137 is on a distinguished road
Smile Problem with the Trade Assistant

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);
  } 
Reply With Quote