EAはミリ秒ごとにアップデートするのではなく、ティックごとにアップデートするのですか?
4件の返信
皆様、こんにちは,
How do I get an EA to run each mili-second and not only when the EA gets a tick??
よろしくお願いいたします
ジョン
0
1st option is: http://www.forexmt4.com/Windows%20programs/MSFX-MT4TickSender-Setup.exe
2nd option is:
create a script file put the following code inside & compile
it send sa fake tick every 100 ms to the chart and all its indicators and EA until this script be removed..
#import “user32.dll”
int PostMessageA(int hWnd,int Msg,int wParam,int lParam);
int RegisterWindowMessageA(string lpString);
#importint start(){
int hwnd=WindowHandle(Symbol(), Period());
int msg = RegisterWindowMessageA(“MetaTrader4_Internal_Message”);
while(!IsStopped()){
PostMessageA(hwnd, msg, 2, 1);
Sleep(100); //1000=1sec..
}
}
幸運を祈ります
0
カリス
Thanks for the reply
Is it not possible to do it inside EA Wizard using some sort of timer function?
よろしくお願いいたします
ジョン
0
The best option for you is to make a separate MT4 and make a default TEMPLATE with that script already inside it,
so that you wont need to always drag & drop this script to the chart after you dropped the EA inside that chart.
just open a random chart > Templates > Save Template > save it as Default > Replace that new Template with the Older “Default” Template.
Its better not to touch the Wiz’s source code for this…, not worth it.
You would want to modify the already existing script with this code in order to see that the script is already attached on the chart when you plan to make a default template with it,
#import “user32.dll”
int PostMessageA(int hWnd,int Msg,int wParam,int lParam);
int RegisterWindowMessageA(string lpString);
#importint start(){
Text(“#Fake Ticker Script is attached.”,”fake_tick_obj”,7,”Arial Bold”,2,3,2,White);
int hwnd=WindowHandle(Symbol(), Period());
int msg = RegisterWindowMessageA(“MetaTrader4_Internal_Message”);
while(!IsStopped()){
PostMessageA(hwnd, msg, 2, 1);
Sleep(100); //1000=1sec..
}
}void Text(string text,string identity,int textsize,string textfont,int x,int y,int z,color c)
{
ObjectDelete(identity);
ObjectCreate(identity,OBJ_LABEL,0,0,0);
ObjectSet(identity,OBJPROP_XDISTANCE,x);
ObjectSet(identity,OBJPROP_YDISTANCE,y);
ObjectSet(identity,OBJPROP_CORNER,z);
ObjectSetText(identity,text,textsize,textfont,c);
}int deinit() {
ObjectDelete(“fake_tick_obj”);
return(0);
}
this will show you a msg at the bottom left corner of the chart that the script is running, so that you know..,
good luck with what you trying to do 🙂
0
カリス
Many thanks again
よろしくお願いいたします
ジョン
0
4件の返信を表示中 - 1 - 4件目 (全4件中)