Not able to generate an expert advisor
5 replies
Fabio Saraceno
5 years ago #234947
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.
tomas262
5 years ago #234954
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
Fabio Saraceno
5 years ago #234958
ok, can i use the number zero as magic number in OrderClosedThisMinute() to indicate all the Sell/Buy orders ?
tomas262
5 years ago #234960
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
Fabio Saraceno
5 years ago #234961
i can’t use it in my strategy , i need to know if a closed order was in profit or not .
tomas262
5 years ago #234992
Viewing 5 replies - 1 through 5 (of 5 total)