Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 10-11-2009, 11:58 AM   #1

Join Date: May 2009
Location: lisbon
Posts: 4
Ignore this user

Thanks: 1
Thanked 0 Times in 0 Posts

Exclamation [Help]Convert MQ4 to Easy Language

Hi,

Is a script to export metatrader data to csv files, what i want is export tickbytick easy language data to a csv file - there was no credit on file.

Can somebody help me convert this script to easy language please :

string gs_76 = "";
string gs_84 = "";

int init() {
gs_84 = Symbol();
return (0);
}

int deinit() {
return (0);
}

int start() {
double l_ask_0 = MarketInfo(Symbol(), MODE_ASK);
double l_bid_8 = MarketInfo(Symbol(), MODE_BID);
double ld_16 = l_bid_8 + (l_ask_0 - l_bid_8) / 2.0;
log("" + ld_16);
return (0);
}

void log(string as_0) {
int li_8 = TimeLocal();
li_8 -= 18000;
string ls_12 = "";
ls_12 = "" + TimeYear(li_8);
ls_12 = ls_12 + "-" + TimeMonth(li_8);
ls_12 = ls_12 + "-" + TimeDay(li_8);
int l_file_20 = FileOpen(gs_76 + "\\" + "log__" + StringSubstr(gs_84, 0, 6) + "_" + ls_12 + ".csv", FILE_CSV|FILE_WRITE|FILE_ READ, ';');
if (l_file_20 > 0) {
FileSeek(l_file_20, 0, SEEK_END);
FileWrite(l_file_20, ls_12 + " " + TimeHour(li_8) + ":" + TimeMinute(li_8) + ":" + TimeSeconds(li_8), as_0);
FileClose(l_file_20);
}
}


Thanks in advance

eggzactly

Last edited by eggzactly; 10-11-2009 at 12:52 PM.
eggzactly is offline  
Reply With Quote
Old 10-11-2009, 12:36 PM   #2

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,474 Times in 912 Posts

Re: [Help]Convert MQ4 to Easy Language

Quote:
Originally Posted by eggzactly »
Hi,

Can somebody help me convert this script to easy language please :
...


see this post:
http://www.traderslaboratory.com/for...html#post77631
__________________



Only an idiot would reply to a stupid post
Tams is offline  
Reply With Quote

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lookback Easy Language Help lonew0lf Coding Forum 1 10-07-2009 04:37 AM
Easy Language Help JKLM Automated Trading 7 02-10-2009 11:17 PM
Easy Language - Question ephi144 Coding Forum 1 01-25-2009 10:15 PM
Help with Easy Language BrianA Coding Forum 29 01-13-2009 03:32 PM
Easy Language Strategy Help Marc33139 Automated Trading 3 07-28-2008 11:35 AM

All times are GMT -4. The time now is 01:58 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.