| 
 PureBytes Links 
Trading Reference Links 
 | 
  
Hi, I refer to TJ's code for S&C article on relative strength. This querry concerns the "startpoint" in second part on plotting baseline relative strength http://www.amibroker.com/members/traders/05-2001.html 
 startpoint = 10; // the start point of comparision will be 10th bar
  this gives the relative strength reading from 10th bar from beginning of data. This is not much use in comparing recent performance. 
I wish to make the startpoint a user defined field. I wish to provide both the following options:  1> "enter start date: ......" (as in plot relative strength from 03/01/09) and  2> "Look back period:......." (as in plot relative strength for the last 30 trading days). 
 This is how i try coding the first option. (needless to say, it doesnt work) ------------------------------------------------------------------------- MaxGraph = 2; // as many as you wish to use BaseDate=ParamDate("Relative Performance from:", "18-5-09"); 
startpoint = BaseDate; //ValueWhen(BaseDate =DateNum(), BarIndex(), 1); // the start point of comparison. if date not specified, default date is used. // here is a base line price = Foreign("S&P CNX NIFTY", "C"); 
baseline = 100 * ( price/ValueWhen( Cum(1) == startpoint, price ) - 1 ); ------------------------------------------------------------------ I also try ---------------------------------------------------------- 
startpoint = ValueWhen(BaseDate =DateNum(), BarIndex(), 1);
// the start point of comparision. if date not specified, default date
is used.
  I appreciate any advice pointing me to the right conceptual resource, as well as help in coding both options right.
  Tx  Kazaan
 
 
  
 
    
    
 
__._,_.___
  
**** IMPORTANT PLEASE READ **** 
This group is for the discussion between users only. 
This is *NOT* technical support channel. 
 
TO GET TECHNICAL SUPPORT send an e-mail directly to  
SUPPORT {at} amibroker.com 
 
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at 
http://www.amibroker.com/feedback/ 
(submissions sent via other channels won't be considered) 
 
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: 
http://www.amibroker.com/devlog/ 
 
  
     
  
 
      
   
__,_._,___
 |