A friend of mine who is involved with machine learning and Python etc has asked me to teach him my strategy so he can try to automate it. And then improve upon it. Sounds far fetched, but knowing this guy I don't doubt his ability to pull it off.
Anyway step 1 to this whole project is to teach jerrybot how to identify zones the way I would. We want to give it about 1000 examples to learn from. So my idea is to go back through the charts and draw zones using the rectangle tool, then export that object data as a csv file similar to how you would save OHLC data. Once I have the data from all the rectangles I can combine it with the OHLC data to give jerrybot something to look at.
I found this code online for exporting indicator data, so I was wondering if anyone could help me edit it to export object data from rectangles instead?
Code: Select all
void export() {
string file="export_"+Symbol()+"_"+Period()+".csv";
int f=FileOpen(file,FILE_CSV|FILE_WRITE,",");
if(f<1) {
Alert("File opening error");
return(0);
}
for(int i=0;i<Bars;i++) {
FileWrite(f,TimeToStr(Time[i],TIME_DATE|TIME_MINUTES),
Open[i],High[i],Low[i],Close[i]);
}
Alert("Export "+Symbol()+" finished. Exported: "+Bars+" records");
FileFlush(f);
FileClose(f);
}