2014年1月3日 星期五

20140104 MT4 讓離線圖自動更新.

http://forum.mql4.com/12970
Execute EA without waiting for a tick?
有人這樣寫的
EA starts on tick.
Script starts without a tick.
直接使用script是不用透過tick來處發產生資料

http://forum.mql4.com/25152

http://www.metatrader4.com/forum/2227
官方回答

//+------------------------------------------------------------------+
#property copyright "Copyright © 2006, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"
#include <WinUser32.mqh>

//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
int start()
  {
//----
   int MT4InternalMsg = RegisterWindowMessageA("MetaTrader4_Internal_Message");
   int hWnd = WindowHandle(Symbol(),Period());
   PostMessageA(hWnd,MT4InternalMsg,2,1);
//----
   return(0);
  }

沒有留言:

張貼留言