[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Trendline Data



PureBytes Links

Trading Reference Links

<? Partial Solution ?>
Suppose the trend line's Study ID is "UP" and Chart ID is 1131:
 
TrendLine = Study("UP",1131);
outfilename = "C:\\Temp\\TrendlineData.csv","w");
headerLine = "Datetime, Trend\n";
 
fileHandle = fopen(outfilename);
if (fileHandle) {
   fputs(headerLine);
   bi = BarIndex();
   selectedIndex = SelectedValue(bi) -  bi[0];    // not going to loop from 0, but for a certain selected bar relevant to the trendline's start
   dt = DateTime(); 
   for (i = selectedIndex; i < BarCount; i++) {
       ds = WriteVal(dt[i], formatDateTime) + ",":  // Write the date time string (x)  
       qs  = StrFormat("%.2f\n", TrendLine[i]);   // Write the trend line's data  (y)
       fputs(ds,fileHandle);
       fputs(qs, fileHandle);
   } 
   fclose(fileHandle);
}


From: mholt22 <mholt22@xxxxxxxxx>
To: amibroker@xxxxxxxxxxxxxxx
Sent: Thursday, March 12, 2009 9:12:03 AM
Subject: [amibroker] Trendline Data

Does anyone know if it's possible to export or write trendline data to a text file? Ideally, whenever I draw a trendline on a chart, I would like the data to be written to a text file (or I can batch it EOD) so that I can have another application parse the file to get daily trendline levels for each ticker. Currently, I can run a scan on anything that I tag "RE" or "SU" to get trendline breaks, so that data is stored somewhere, I just don't know if/how I can access it and if there is a way to setup a process that auto writes it to a file. Anyone know how I can set this up? Thanks.




__._,_.___


**** 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/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___