¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

DATA MINING


 

How can I extract the data of an indicator to a .csv file


 
Edited

Hello, sorry but this functionality is not implemented yet.

If you are a programmer, you can try something like that:

' export_indicator_data code block (just the idea)
' you should declare the sub and add this code to a sub ; then call it with a qbutton onclick or in a qmenuitem
' this sub should export separate indicator canvas buffers

' in QChartist.bas at line 287 you should add : DIM Grid_sep_indi AS QSTRINGGRID
' at line 3162 ( before canvas.separateindicator1.Cell(j , i+1)="" ) you should add : Grid_sep_indi.cell(j,i+1)=canvas.separateindicator1.Cell(j , i+1)
' at line 3163 ( before canvas.separateindicator1.Cell(j , i+1)="" ) you should add : Grid_sep_indi.cell(j,i+2)=canvas.separateindicator1.Cell(j , i+2)
' at line 9513 add :
MenuItem(menui).Caption = "Export indicator CSV"
MenuItem(menui).OnClick = export_indicator_data
FileMenu.AddItems(MenuItem(menui))
menui ++

declare sub export_indicator_data

sub export_indicator_data

defint i,j,csvi

DIM datecsv AS STRING
DIM timecsv AS STRING
DIM opencsv AS STRING
DIM highcsv AS STRING
DIM lowcsv AS STRING
DIM closecsv AS STRING
DIM volumecsv AS STRING
DIM csvFile AS QFILESTREAM
dim savedialogfilename as string

' j=2 Export first indicator's buffer

FOR j = 2 TO drawidseparatecanvas STEP 2 ' next indicator's buffer is j + 2

if Grid_sep_indi.Cell(j , 2)<>"" then

?? ?savedialogfilename=homepath+"\csv\exported_indicator"+str$(j/2)+".csv"

?? ?csvFile.open(savedialogfilename , 65535) '65535 = fmCreate

?? ?csvi=1

?? ???? FOR i = 0 TO barsdisplayed2-2 + val(generalsettingsfuturebarsedit.text)??????????????
?? ???????? datecsv = Grid.Cell(rowgridoffset + 1 , chartbars(displayedfile)-barsdisplayed2+2 - val(generalsettingsfuturebarsedit.text)+i)
?? ???????? timecsv = Grid.Cell(rowgridoffset + 2 , chartbars(displayedfile)-barsdisplayed2+2 - val(generalsettingsfuturebarsedit.text)+i)???????
?? ???????? opencsv = Grid_sep_indi.Cell(j , i + 2)
?? ???????? highcsv = Grid_sep_indi.Cell(j , i + 2)
?? ???????? lowcsv = Grid_sep_indi.Cell(j , i + 2)
?? ???????? closecsv = Grid_sep_indi.Cell(j , i + 2)
?? ???????? volumecsv = "1"
?? ???????? IF axistypecomboitemindex = 1 THEN
?? ???????????? IF VAL(canvas.separateindicator1.Cell(j , i+2)) > 0 THEN
?? ???????????????? opencsv = log10(VAL(Grid_sep_indi.Cell(j , i+2)))
?? ???????????????? highcsv = log10(VAL(Grid_sep_indi.Cell(j , i+2)))
?? ???????????????? lowcsv = log10(VAL(Grid_sep_indi.Cell(j , i+2)))
?? ???????????????? closecsv = log10(VAL(Grid_sep_indi.Cell(j , i+2)))
?? ???????????? END IF
?? ???????? END IF
?? ???????? csvFile.WriteLine(datecsv + "," + timecsv + "," + opencsv + "," + highcsv + "," + lowcsv + "," + closecsv + "," + volumecsv)
?? ???????? csvi++
?? ???? NEXT i

?? ?csvFile.close

end if
?? ?
NEXT j

showmessage "Done"

end sub

I will add the functionality in the next build, i just need to find more time to implement it.
It probably do not work yet and needs to be debugged to work.

Hope this helps


 

ago little that i began to study mql4 not i have the knowledge sufficient for to implement this code in the software of the contrary with much taste the would do. i have a collection of good indicators that the i have selected for features and functions specific, in tendencies all the indicators is behaving well but in rank always is need filters but the solution more ideal for create strategies is with the extraction of data that cuantifiquen the results and the that i want do is draw data of market and of indicators for then with a software of mining of data (fast miner) create a tree of decisions and other techniques of analysis of data for evaluate the greater% and performance of the better indicators. but investigating on qchartist i saw that have a tool of scanning. have some documentation that describe the time of algorithm that uses the scanner for the analysis of data


 

though I tried to install it but couldn't. How should I organize the folders to install it correctly


 

I really don't know how it is possible that this software is so hidden on the web because from my point of view it has great potential (improveable) for data analysis and creating quantitative algorithmic trading systems


 
Edited

Me too i don't know how it is possible...

Exporting separate indicators buffers to csv files is now working.
I will integrate this new feature in build 193