extract data from chart

Have a QScript to share, or need help with programming? Post your comment here.
Post Reply
rlygangesh
Posts: 39
Joined: Sun Oct 02, 2016 3:40 pm
Location: Mumbai, India
Contact:

extract data from chart

Post by rlygangesh » Tue Jun 27, 2017 4:16 pm

Hi all
as we know that we can extract indicator value in excel from wave 59 using output indicator to ASCII.
but can be extract astro/cycle data(eg planatary harmonic index) with same way?

if yes than please help
rlygangesh@gmail.com

User avatar
earik
Site Admin
Posts: 477
Joined: Mon Dec 01, 2014 12:41 pm
Contact:

Re: extract data from chart

Post by earik » Tue Jun 27, 2017 7:19 pm

You can write a script to do that, since QScript has access to all the ephemeris data using the astro(...) function. You can use that in conjunction with file_write(...) to output whatever you need to a text file. It would look something like this:

Code: Select all

input:filename("c:\my_astro_data.txt");

if (barnum == barsback) {
   file_delete(filename); # clear the file if it already exists
}

# get the moons position - see qscript help for instructions on this function
moon = astro(year, month, day, time, astro_moon, true, astro_long, true);

# write the data for this bar to the file
file_write(filename,year," ",month," ",day," ",time," ",moon);

# plot a line on the chart so you can see when the indicator is finished
plot1 = close;
Hope that helps!

Regards,

Earik

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest