Scripts no longer working
Results 1 to 2 of 2

Thread: Scripts no longer working

  1. #1
    jTgCg31
    Guest
    I have been out of Currency Market trading for a while trying to focus on futures trading. Now that I'm on cruise control for stocks , I wanted to return to Currency Market. I'm using ATC Broker's demo account and MT4. But I noticed that my scripts (ie, buy, sell, BE and etc) don't work properly. Once I attempt to compile metaeditor being used by the scripts, I am now getting errors like return value of'OrderModify' should be assessed. What's changed which left my scripts obsolete? Where do I go to find out how to repair my scripts to allow them to work again? Thanks for any help.

  2. #2
    MQL4 had a major overhaul beginning construct 600 which shifted things like naming conventions and generally made things more strict.

    Messages about checking return values will be warnings (yellow triangles) not mistakes (red circles).

    You're getting this message because OrderModify() is a bool role - when it works, it yields true. If it fails, it returns false.

    So that the compiler is saying, don't you want to understand whether your OrderModify worked? .

    Code like this will just run the function, but you'll have no idea if it workedout.
    Inserted Code OrderModify(OrderTicket(),OrderOpenPrice(),Normali zeDouble(Bid-Point*TrailingStop,Digits),OrderTakeProfit(),0,Blu e);
    Code like this may check the return value, and also generate a message when it failed. This may suppress the compiler warning yield value of'OrderModify' ought to be checked.
    Inserted Code if(! OrderModify(OrderTicket(),OrderOpenPrice(),Normali zeDouble(Bid-Point*TrailingStop,Digits),OrderTakeProfit(),0,Blu e)) Print(Error in OrderModify. Error code=,GetLastError());
    if you would like, post up your scripts and we could work through the issues.

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.