Results 1 to 9 of 9

Thread: MQL4 code help

  1. #1
    Hi there,

    New tonigeriaforextrading FX (just paper trading in the mo) and have to say I'm happy I found this website, exceptional and very informative.

    Recently installed MetaTrader 4 along with getting to grips with it, I would like to overlay a trailing stop loss indior for long short positions just as a visual reference on the charts, is this possible and if so could somebody please post this code.

    Thanks Beforehand

  2. #2
    Been Looking, nothing Discovered
    Could you post a link

  3. #3
    Satman,

    I discovered a trailing stop file for MT4. The file is called, ATR Trailing Stop.mq4. Not sure if it's the exact same stop5.mq4 file that highway3000 suggested as the attached file has a different name.

    Hope this helps.
    https://www.nigeriaforextrading.com/...2650270880.mq4

  4. #4
    1 Attachment(s)
    Quote Originally Posted by ;
    Been searching, nothing found
    Can you post a link
    Here it is.

  5. #5
    Thanks for the links,

    Downloaded both and also have attempted to use the documents without success.

    Have got both documents from the indior window but when I click them to use them only happens.

    What's the procedure to rescue them to MT4 and use them?

    Due

  6. #6
    Ordinarily I double click and get a popup window for placing options. If this does not occur you can try recompiling in the editor: ToolsMetaQuotes Language Editor.

  7. #7

  8. #8
    Hi guys, please I need help to plug in both of these items together...

    I have this EA (mql4), which will be monitoring the account Balance, Equity and Profit. When the established profit or the established loss % is attained the robot closes all open trades.

    I also need the Autotrade in Mt4 to be turned off to protect against the most important EA to start new trades.

    I have a Script for that, but I do not know how to plug it into EA. Can somebody please help me?

    Inserted Code #include lt;WinUser32.mqhgt; extern bool DisableAllEAs = TRUE; emptiness DisableEA() keybd_event(17, 0, 0, 0); keybd_event(69, 0, 0, 0); keybd_event(69, 0, 2, 0); keybd_event(17, 0, 2, 0); int begin() if (DisableAllEAs == TRUE) DisableEA(); return (0);
    Inserted Code //If sett reduction or profit attained close all trades and prevent EA extern double equity_percent_from_balances=0.9; extern int profit_target=200; int begin() if(AccountEquity()lt;(AccountBalance()*equity_perc ent_from_balances)

  9. #9
    Quote Originally Posted by ;
    Hi there,

    New tonigeriaforextrading FX (just paper trading at the mo) and have to say I am happy I found this site, exceptional and very informative.

    Recently installed MetaTrader 4 along with getting to grips with it, I would like to overlay a trailing stop loss indior for long short positions just as a visual reference to the charts, is that possible and if so can somebody please post this code.

    Thanks in advance
    Proceed to metaqoutes or google trailling stop5.mq4

    It's all there.

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.