下载MetaTrader 5

拜託幫我看一下~找不到輸出的檔案

要添加评论,请登录注册
peter
7
peter  
我是編譯成indicators
但是attach to a chart之後
在C:\Program Files\FXDD - MetaTrader 4都找不到檔案mydat.csv
有誰拜託幫我下

#property copyright "Copyright ?2007, MetaQuotes Software Corp."
#property link "https://www.metaquotes.net"

#property indicator_chart_window

extern double A;
extern double B;

datetime lasttime=NULL;

//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
A = MarketInfo("EURUSD",MODE_BID);
B = MarketInfo("USDJPY",MODE_BID);
return(0);
}

//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
if ( (lasttime != NULL) && ((Time[0] - lasttime )<60)) return(0);
lasttime = Time[0] ;

int handle=FileOpen("mydat.csv",FILE_CSV|FILE_READ | FILE_WRITE);
if(handle>0)
{
FileSeek(handle, 0, SEEK_END);
//---- add data to the end of file
FileWrite(handle, A,B);

FileClose(handle);
handle=0;
}
return(0);
}
附加的文件:
temp.mq4 2 kb
okwh
1636
okwh  
\experts\files
peter
7
peter  
太感謝了
要添加评论,请登录注册