Below is the code to write orders to a csv file:
if( LastValue(NewBar_Started) AND
LastValue(Ref(Strategy4_4Hour_Buy,-1)) )
{
mvOrderOIF =
"\n"+
Broker_Symbol+
","+ "BUYSTOPLIMIT" +
","+
(Strategy4_BuyStopEntry) +
"\n";
filepath="C:\\Program
Files\\Amibroker\\AFL\\PADHU\\AT\\MIG_0011_ORDERS.txt";
filehandle=fopen(filepath, "a");
fputs(mvOrderOIF,
filehandle);
fclose(filehandle);
filepath="C:\\Program
Files\\Amibroker\\AFL\\PADHU\\AT\\MIG_0011_ORDERS_LOG.txt";
filehandle=fopen(filepath, "a");
fputs(mvOrderOIFLog,
filehandle);
fclose(filehandle);
fileischanged=1;
};
so that the resulting file looks like
EURUSD,BUYSTOPLIMIT,1.4610
EURUSD,BUYSTOPLIMIT,1.4620
EURUSD,BUYSTOPLIMIT,1.4630
....
....
EURUSD,BUYSTOPLIMIT,1.4710
Thanks,Padhu
__._,_.___
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
__,_._,___