MQL4 Programming - Page 7
Page 7 of 509 FirstFirst ... 56789 LastLast
Results 61 to 70 of 87

Thread: MQL4 Programming

  1. #61
    Quote Originally Posted by ;
    quote You should probably place a first code (because the is your decompiled one) - the likelihood that somebody actually checks it are near zero
    Thanks Mladen to your comment.
    Here are both:https://forexintuitive.com/attachmen...7664907788.mq4https://forexintuitive.com/attachmen...9365537336.ex4

  2. #62
    Programming like dashboard? No demand auto trading. Just for monitoring and alert.
    I'll pm u @.

  3. #63
    Quote Originally Posted by ;
    quote Thanks Mladen for your comment. Here are:filefile
    Illegal decompiled file ...

  4. #64
    Quote Originally Posted by ;
    quote Thank You Mladen to your comment. Here are:filefile
    Regrettably but that's decompiled too ;(

  5. #65
    I have shed a message for u pak. .
    Will u travel to Kuala Lumpur when we supply the flight accomodation for two 3 days?

  6. #66
    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;



  7. #67
    Quote Originally Posted by ;
    Hello, can I ask a question? Me has been confused . Thank you! When doing back evaluation in Visual mode, instead of automatically proceeding, we can show the bar one by one by pressing F12 key. What I want to do is that by pressing one key, for example S key (the key code is 0x53), then F12 will be sent into MT4 five occasions. The code is as below. The outcome is, when in evaluation, bars will be shown by pressing S key as F12 was entered only one, or even two come each moment out! I wonder why it does not...
    What exactly does F12 do on the MT4?

    Assuming you delegated a XYZ() function to F12 button.
    Therefore when you press S, you must call XYZ() method 5x

  8. #68
    Quote Originally Posted by ;
    Hi, can I ask a question? It has been confused me . Thank you! When doing back test in Visual mode, rather than automatically proceeding, we can show the pub one by one by pressing F12 key. What I want to do is that by simply pressing one key, for example S key (the main code is 0x53), then F12 will soon be transmitted to MT4 five occasions. The code is as below. The result is, even when in test, bars will be shown by pressing S key as F12 was entered just one, or two, in three bars come out every time! I wonder why it does not...
    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;
    With the code over when you click on S it will call click print and A A 5x

  9. #69
    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??

  10. #70
    Quote Originally Posted by ;
    Thanks for your fast response! Gt;What exactly does F12 do on the MT4? When doing back evaluation F12 moves the chart forwards by 1 candlestick at one time. This is below described by the url. Https://www.fxdayjob.com/manual-backtesting-in-mt4 gt;With the code above when you click S it will call click A and publish A 5x However, this does not apply to F12. Pressing S key will reveal 2 bars, or just one, at most three bars come out at a time, not 5x as I wrote yesterday! Maybe this is MT4 back test ??'s bug picture
    The issue is most likely the MT4 does not allow OnChartEvent() running on the Backtest.
    That mean it will not allow input from your peripheral i.e. mouse click or keyboard click through OnChartEvent()

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners more information