Reply

Not able to generate an expert advisor

5 replies

Fabio Saraceno

Subscriber, bbp_participant, community, 0 replies.

Visit profile

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.

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

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

0

Fabio Saraceno

Subscriber, bbp_participant, community, 0 replies.

Visit profile

5 years ago #234958

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

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

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

0

Fabio Saraceno

Subscriber, bbp_participant, community, 0 replies.

Visit profile

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 .

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

5 years ago #234992

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.

0

Viewing 5 replies - 1 through 5 (of 5 total)