If_Then_order

Custom MT4 expert advisors published here.

Moderator: admin

If_Then_order

Postby Apprentice » Thu Feb 07, 2019 5:11 pm

Based on request.
viewtopic.php?f=27&t=67324
If Then Order Statement.png


If_Then_order.mq4
(16.76 KiB) Downloaded 41 times
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 20594
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: If_Then_order

Postby Fx4mt.com » Fri Feb 08, 2019 8:55 pm

Thank you! Can you elaborate on the Magic Number?

Much appreciated! Very excited to try this out. Very grateful.
Fx4mt.com
 
Posts: 35
Joined: Tue Jan 15, 2013 1:19 pm

Re: If_Then_order

Postby Apprentice » Sat Feb 09, 2019 4:43 am

https://docs.mql4.com/trading/ordersend
Order magic number. May be used as user defined identifier.

The unique ID can come in handy if you have a more then one active strategy.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 20594
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: If_Then_order

Postby rudyyy » Sun Feb 10, 2019 6:06 am

oh. my. gosh.

I've been wanting something like this for months and I just happen to stumble upon this site THREE DAYS after you post this?!?!

THANK YOU!
rudyyy
 
Posts: 2
Joined: Sun Feb 10, 2019 6:04 am

Re: If_Then_order

Postby rudyyy » Tue Feb 12, 2019 5:55 am

Hi Apprentice,

I was testing this out today and noticed a few times that a trade would not trigger. Is there a min distance that a price trigger needs to be from current price when the EA is activated? Obviously outside the spread, but even a few pips away it was still giving me issues. Im not sure what caused certain orders to activate and others not.

Any feedback or tips would be appreciated
rudyyy
 
Posts: 2
Joined: Sun Feb 10, 2019 6:04 am

Re: If_Then_order

Postby Apprentice » Thu Feb 14, 2019 6:06 am

Can you provide a trading log? EA will print the reason why the order was not created.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 20594
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Return to MT4 Expert Advisors

Who is online

Users browsing this forum: Google [Bot] and 5 guests