| Registered User Joined: 11/15/2007
 Posts: 8
 
 | can you plot trendlines on realcode some how. what i am trying to do its scan for stocks breaking up through or down through a certain trendline so i can capture breakouts as they happen. any suggestions? | 
	
	|  
  Worden Trainer
 
 Joined: 10/7/2004
 Posts: 65,138
 
 | I think I would need to know more about what you want to do to answer your question. 
 Is it a drawn trendline? I do not know of a way to use a drawn trendline as a Drag and Drop variable in RealCode.
 
 Are you attempting to create a trendline alogorithmically for each symbol somehow? If so, we would need a detailed and objective description to help you do so.
 
 -Bruce
 Personal Criteria Formulas
 TC2000 Support Articles
 | 
	
	| Registered User Joined: 11/15/2007
 Posts: 8
 
 | when i evaluate a chart i often use the RS vs S&P. OBV, RSI, MACD Hist as my indicators. when i do so , i draw trendlines on the price and all of the indicators to find potential breakouts. i was hoping there would be a way to make a scan for breakouts of these trendlines. somewhat like that of a triple top breakout, but for the indicators i mentioned above. im not sure how i could word it in realcode, but im sure it can be done somehow since a trend line can be explained in an equation. maybe..haha | 
	
	|  
  Worden Trainer
 
 Joined: 10/7/2004
 Posts: 65,138
 
 | If you provide an objective and detailed description of how the trendline is defined (the equation), we can help you write the RealCode. What we can't do is define how you would draw the trendline for you. 
 -Bruce
 Personal Criteria Formulas
 TC2000 Support Articles
 | 
	
	| Registered User Joined: 11/15/2007
 Posts: 8
 
 | hmm....ill have to try and find that...im not that smart..hahha... 
 | 
	
	| Registered User Joined: 11/15/2007
 Posts: 8
 
 | here is a formula i have found for another popular product...can you do anything with this? 
 
 Up/Down Trend Lines:    {ExtFml("Trend.Line",  DataArray, MinTouchPoints, %Tolerance, Type)}
 { User inputs }
 MinT:=Input("Minimum Touch Points",1,100,3);
 PerT:=Input("Penetrating Tolerance %",0,100,2);
 
 { Trendlines }
 Up:=ExtFml("Trend.Line",C,MinT,PerT,U);
 Down:=ExtFml("Trend.Line",C,MinT,PerT,D);
 
 { Plot on price chart }
 Up;Down
   Trendline breakout signals:
 {ExtFml("Trend.Signals",   DataArray, MinTouchPoints, %Tolerance) }
 
 { User inputs }
 MinT:=Input("Minimum Touch Points",1,100,3);
 PerT:=Input("Penetrating Tolerance %",0,100,2);
 plot:=Input("Signals:  [1]Clean,  [2]All,  [3]Trade binary",1,3,1);
 delay:=Input("Entry and Exit delay",0,5,0);
 
 { All trendline breakout signals }
 all:=ExtFml("Trend.Signals",C,MinT,PerT);
 
 { Entry/Exit signals }
 entry:=all=1;
 exit:=all=-1;
 
 { Clean signals }
 init:=Cum(IsDefined(entry+exit))=1;
 bin:=ValueWhen(1,entry-exit<>0 OR init,entry);
 long:=bin AND (Alert(bin=0,2) OR init);
 short:=bin=0 AND (Alert(bin,2) OR init);
 signals:=long-short;
 
 { Plot signals in own window }
 Ref(If(plot=1,signals,
 If(plot=2,all,bin)),-delay
 | 
	
	| Registered User Joined: 10/18/2006
 Posts: 8
 
 | Is it possible to draw trend lines in the 2nd and 3rd window (below the price), say in BOP or TSV? I have Gold Service. Thanks
 Pawan
 | 
	
	|  
  Worden Trainer
 
 Joined: 10/1/2004
 Posts: 18,819
 
 | In TeleChart, no.  In Blocks, yes. 
 - Craig
 Here to Help!
 |