Download MetaTrader 5
To add comments, please log in or register
Does your signal already have a lot of of subscribers? It's time to think about the paid subscription!
Sherif Hasan
7222
Sherif Hasan 2015.09.03 14:59 
My EA placed order at the price of 135.00 on EURJPY. as per conditions EA must close 50% of lot when price reaches 20+pips profit, when EA tried close the order spread difference become 2.5 pips to 50+ pips. so EA closed the order with loss of -33pips(Ask Buy Difference in spread).

How to avoid such a market. broker says its due to news impact spread inclresed.

i like to filter with code when close the order ea must check/filter the spread or etc...

please advice me to add some filter for my EA to avoid such a expereince!


Carl Schreiber
5937
Carl Schreiber 2015.09.03 18:51  

Your broker is just in the middle between you and some banks (being the 'market') and they stop providing prices for the news time.

Just try to avoid news times - there are tools that can do that. You just have to google.

Sherif Hasan
7222
Sherif Hasan 2015.09.03 19:53  
gooly:

Your broker is just in the middle between you and some banks (being the 'market') and they stop providing prices for the news time.

Just try to avoid news times - there are tools that can do that. You just have to google.

Thanks for your reply gooly.

yes. i understood it. is this will happen such huge difference.

in fact partial order must be closed @ 134.77 , but order closed @ 135.33, its huge difference around 58 pips.

how to avoid this type orders closed. as you said news time we can avoid trades. but this trade opened  6 hrs before news time.

i need a solution by coding to avoid these probloms.

i have no such a issue with when other broker has fixed spread. currently i changed my account with ECN broker and variable spread.

i really appreciate your support/ideas!

whroeder1
13600
whroeder1 2015.09.03 21:00  

So the trade opened 6 hrs before, irrelevant.

You wanted to close when the trade was 20 pips in profits. You didn't compare the OrderClosePrice() to the OrderOpenPrice() to see if it was.

Zirkon
123
Zirkon 2015.09.03 21:07  
sheriffonline:

Thanks for your reply gooly.

yes. i understood it. is this will happen such huge difference.

in fact partial order must be closed @ 134.77 , but order closed @ 135.33, its huge difference around 58 pips.

how to avoid this type orders closed. as you said news time we can avoid trades. but this trade opened  6 hrs before news time.

...
Add a news filter as Gooly said. If you knew there was a news around 14:00, don't try to trade (open or close) X minutes before and/or after.
Sherif Hasan
7222
Sherif Hasan 2015.09.04 03:06  
WHRoeder:

So the trade opened 6 hrs before, irrelevant.

You wanted to close when the trade was 20 pips in profits. You didn't compare the OrderClosePrice() to the OrderOpenPrice() to see if it was.

There You are WHRoeder!. i agree with your clue.

yes. i must recheck the order while closing it.

Once again thank you all.

/
To add comments, please log in or register