Not logged in
Viewing 6 posts - 1 through 6 (of 6 total)

Forums>AlgoWizard / EA Wizard>Make my EA>Not able to generate an expert advisor

  • #234947 |
    Participant
    3 Posts

    Hi,
    i was trying to generate this EA that should move along with the market.

    (shortly , it opens a long trade and , if it hit the TP , it opens a long position, if it hit the SL , it opens a short position, continuing like a chain)

    But i don’t know why the program says that i can’t generate the EA with this error.

    May i know what the problem is ?

    I want to fix this.
    Thanks.

    P.S. I attached the file .sqw too.

    #234954
    tomas262
    Administrator
    1821 Posts

    Hello,

    on the second tab you are trying to place a market order magic = 1000 but the same happens on the first tab. You cannot setup rules like this in EA Wizard. The other order has to have a different magic number like 1001 or any other number

    #234958
    Participant
    3 Posts

    ok,  can i use the number zero as magic number in OrderClosedThisMinute() to indicate all the Sell/Buy orders ?

    #234960
    tomas262
    Administrator
    1821 Posts

    You can use Open P/L with magic = 0. It will return PL for all orders. To distinguish buy/sell only sum PL a MQL4 custom function would have to be used in EA Wizard. Let me know if any questions

    #234961
    Participant
    3 Posts

    i can’t use it in my strategy , i need to know if a closed order was in profit or not .

    #234992
    tomas262
    Administrator
    1821 Posts

    Hello,

    this could work for closed P/L of last long trade for example. Let me know

    Attachments:
    You must be logged in to view attached files.
Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.