PureBytes Links
Trading Reference Links
|
Thank you for your help...this is pretty close to what I want to do, but instead of writing history for each bar of one ticker, I basically want to print "Ticker, Date, Close, Support, Resistance". I almost want to replicate what is shown in the exploration results. For example:
ChartNo = 1000;
support1 = Study("SU",ChartNo);
support2 = Study("S2",ChartNo);
resistance1 = Study("RE",ChartNo);
resistance2 = Study("R2",ChartNo);
Filter = C > 0;
AddColumn(Close,"Close");
AddColumn(support1,"Support1");
AddColumn(support2,"Support2");
AddColumn(resistance1,"Resistance1");
AddColumn(resistance2,"Resistance2");
When I hit explore on a given watchlist or sector or whatever, for n=1, what prints in the exploration results is exactly what I want written to a csv file. So one file with multiple tickers and the fields for each ticker. Thanks again.
--- In amibroker@xxxxxxxxxxxxxxx, Steve Wong <swstevewong38@xxx> wrote:
>
> <? 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@xxx>
> 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/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|