Thanks Mladen to your comment.Originally Posted by ;
Here are both:https://forexintuitive.com/attachmen...7664907788.mq4https://forexintuitive.com/attachmen...9365537336.ex4
![]() |
![]() |
Thanks Mladen to your comment.Originally Posted by ;
Here are both:https://forexintuitive.com/attachmen...7664907788.mq4https://forexintuitive.com/attachmen...9365537336.ex4
Programming like dashboard? No demand auto trading. Just for monitoring and alert.
I'll pm u @.
I have shed a message for u pak. .
Will u travel to Kuala Lumpur when we supply the flight accomodation for two 3 days?
Hello, can I ask a question?
It has been perplexed me for a long moment.
Thank you!
When doing back evaluation in Visual mode, instead of automatically proceeding, we can manually demone the pub by one by pressing F12 key.
What I need to do is that by pressing a single key, for example S key (the main code is 0x53), then F12 will soon be sent into MT4 five times.
The code is as below. The result is, even when in back evaluation, pressing S key will show bars just as F12 was entered, but only one, or two come out each moment!
I wonder why it doesn't show 5 pubs...
Do you have some good solutions?
Thank you in advance!
#import user32.dll
emptiness keybd_event(int bVk, int bScan, int dwFlags,int dwExtraInfo);
#import
#define KEYEVENTF_KEYUP 0x0002 //-- key is published (not pressed)
emptiness OnChartEvent(const int id, // Occasion identifier
const long lparam, // Occasion parameter of extended kind
const dual dparam, // Occasion parameter of dual kind
const series sparam) // Occasion parameter of series type
if (id == CHARTEVENT_KEYDOWN)
switch(int(lparam))
case 0x53: // 'S'
keybd_event(0x7B, 0, 0, 0); // F12 1th
keybd_event(0x7B, 0, KEYEVENTF_KEYUP , 0);
keybd_event(0x7B, 0, 0, 0); // F12 2nd
keybd_event(0x7B, 0, KEYEVENTF_KEYUP , 0);
keybd_event(0x7B, 0, 0, 0); // F12 3rd
keybd_event(0x7B, 0, KEYEVENTF_KEYUP , 0);
keybd_event(0x7B, 0, 0, 0); // F12 4th
keybd_event(0x7B, 0, KEYEVENTF_KEYUP , 0);
keybd_event(0x7B, 0, 0, 0); // F12 5th
keybd_event(0x7B, 0, KEYEVENTF_KEYUP , 0);
break;
default:
break;
What exactly does F12 do on the MT4?Originally Posted by ;
Assuming you delegated a XYZ() function to F12 button.
Therefore when you press S, you must call XYZ() method 5x
Inserted Code #import user32.dll emptiness keybd_event(int bVk, int bScan, int dwFlags,int dwExtraInfo); int SendInput(int nInputs,int pInputs,int cbSize); string GetLastError(); #import #define KEYEVENTF_KEYUP 0x0002 //-- key is published (not pressed) emptiness OnChartEvent(const int id, // Event identifier const long lparam, // Event parameter of long kind const dual dparam, // Event parameter of dual kind const string sparam) // Event parameter of string kind if (id == CHARTEVENT_KEYDOWN) switch(int(lparam)) case 0x53: // 'S' keybd_event(0x41, 0, 0, 0); keybd_event(0x41, 0, KEYEVENTF_KEYUP , 0); keybd_event(0x41, 0, 0, 0); keybd_event(0x41, 0, KEYEVENTF_KEYUP , 0); keybd_event(0x41, 0, 0, 0); keybd_event(0x41, 0, KEYEVENTF_KEYUP , 0); keybd_event(0x41, 0, 0, 0); keybd_event(0x41, 0, KEYEVENTF_KEYUP , 0); keybd_event(0x41, 0, 0, 0); keybd_event(0x41, 0, KEYEVENTF_KEYUP , 0); split; case 0x08://Backspace Alert(Delete); split; case 0x41://'a' Print(A); break;Originally Posted by ;
With the code over when you click on S it will call click print and A A 5x
Thanks for your fast response!
Gt;What does F12 perform on the MT4?
When doing back test manually, F12 moves the chart forward by 1 candlestick at one time.
The link under clarifies this.
Https://www.fxdayjob.com/manual-backtesting-in-mt4
gt;With the code above once you click S it'll call click A and print A 5x
However, this doesn't apply to F12. Pressing S key will reveal two pubs just one, at most three pubs come out at a time, maybe not 5x as I wrote yesterday!
Maybe this is the bug of MT4 back test??
![]()
The issue is most likely the MT4 does not allow OnChartEvent() running on the Backtest.Originally Posted by ;
That mean it will not allow input from your peripheral i.e. mouse click or keyboard click through OnChartEvent()