回復 15# oneman001
//+------------------------------------------------------------------+
//| bbb.mq4 |
//| Copyright ?2011, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2011, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
//+------------------------------------------------------------------+
//| script program start function |
//+------------------------------------------------------------------+
int start()
{
//----
int handle;
datetime orderOpen=OrderOpenTime();
handle=FileOpen("filename.csv", FILE_CSV|FILE_WRITE, ';');
if(handle>0)
{
FileWrite(handle, Open);
FileClose(handle);
}
//----
return(0);
}
//+------------------------------------------------------------------+
我新發現
將這程式碼創建到
智能交易系統裡
就能達到我要的輸出效果
但他卻輸出到
C:\Documents and Settings\TEST\AppData\Local\VirtualStore\Program Files\FxPro - MetaTrader\experts\files
光我要抓這路另就得寫這麼長一段
mt4真的濫到沒辦法改變輸出的路徑
讓他輸出到
R:\
嗎 其實小的對這個可程式的軟體 還不懂
不過找機會學學到是很好
謝謝版大
祝福 FileWrite(handle, TimeToStr(Time, TIME_DATE),Open );
抱歉,忘了 指定 i cellan 發表於 11-5-30 12:32 static/image/common/back.gif
回復 15# oneman001
小弟剛好遇到相同困擾,爬文的時候剛好看到此文,也在 MQL4 文章中提到一個解決方案,有需要的大大可以參考看看 XD
------
If you still need to work outside the directories (defined for safety reasons), you can call the functions of Windows OS. For this purpose, the functions of API represented in kernel32.dll library are widely used.
參考資料 http://articles.mql4.com/720
頁:
1
[2]