deveraux

Trader
Feb 17, 2017
5
0
12
35
Good day Enivid

I am currently using this EA during news and I find it very helpful. I am trying to figure out the best possible settings for different news releases, where market reacts in a single direction rather than chopping up and down.

Here is my request though. I would like to improve this EA by adding one variable parameter. I am not a programmer and don't know how to code it, that's why I'd like to request you.

The concern is adding a TP1 and TP2. Let me explain briefly. If I have a position of 1 lot, I want to choose to set Take Profit 1 by splitting a position (choosing the lot size - maybe 0.5) as TP1 and let the second portion (0.5lots) run into TP2 which I set in the input settings of the EA. So the parameters would need to have 4 variables (TP1 true/false; TP1 LotSize; TP2 true/false; TP2 LotSize). Through my research in a past couple of months, I find it safer to have the option to lock at least few pips of a smaller value, just to be safer, move SL to BE and trail it further.

Secondly, I am using the version which does not have a spread control in it and I saw this function on the first page of this thread. May I request that in addition to the above TP1 and TP2 (which is more important to me), that the spread control (slippage) could also be added into the attached version. The one which is on page 1 doesn't have some parameters like PipsAway and SL in it.

Pls let me know if more clarification is needed on this. Appreciate in advance your thoughts and possible adjustment.

Thanks,
Paul.
 

Attachments

deveraux

Trader
Feb 17, 2017
5
0
12
35
Thanks for adding a slippage control. With regards to TP1/2 adjustment, can you at least recommend someone who would possibly be willing to do it? Thanks. P.
 

deveraux

Trader
Feb 17, 2017
5
0
12
35
Hi Enivid, just an inquiry. The slippage that you added, can you explain how it works? Is that in points or pips? Because no matter what number I set, it doesn't do anything to my orders, even when spread is widened. I thought the Pending order gets cancelled when spread widens beyond the pre-set number, but nothing happens.

p.s. I've got the TP1/2 done from Mql5 as advised, thanks.
 

Enivid

Administrator
Staff member
Nov 30, 2008
15,983
799
144
Odessa
www.earnforex.com
Slippage parameter when used to open orders in the EAs does not protect against the spread widening it protects against slippage, which prevents the order from executing if the order price is different from the proposed execution price.
 

deveraux

Trader
Feb 17, 2017
5
0
12
35
Yes sure, sorry maybe I've expressed myself wrongly in what I've meant. So here's the question rephrased. My broker claims there's no negative slippage from the broker's side. That should practically solve the issue of the orders opening at the EA pre-determined price and not with any slippage. Yet just to be sure (due to spread widening) and since the slippage is included in the EA, what value should be entered? It makes sense to me that if I want the same execution as pending order, the slippage should be the same value as "Pips Away". Is the slippage in Pips or Points? When I test different settings, it doesn't delete order even when spread out-reaches the pending order.. Thank You.
 

Enivid

Administrator
Staff member
Nov 30, 2008
15,983
799
144
Odessa
www.earnforex.com
Pipsaway is just the distance from the current price to the pending orders' open price levels. Slippage works only to prevent the orders from executing if the current price is different from the one given in OrderSend() function. Both parameters are in broker's points.

As I understand, you want the EA to stop operating and delete all orders if the spread exceeds some given level. Is that right? Currently, there is not setting for that.
 

deveraux

Trader
Feb 17, 2017
5
0
12
35
Yes, that's what I've meant. But as a matter of fact, the slippage itself is self sufficient. Sorry for the confusion.

However, I have 2 major issues with the EA and I think it's a bug or error.

First one is the "PipsAway" issue. In many occasions the EA sets the orders far away from what is set in the parameters. As an example (attached in the screenshot), if I have PipsAway as 30 points from the current price, the EA has set the long position as 208 points and short position as 65 points away (???). The CTCBN is set to 0 so it should not count from any highs or lows. I need the EA to be placing orders properly a pre-defined distance away from the current market price.

Second issue is incorrect settings of SL and TP. The EA is placing the SL and TP in a different levels than pre-determined in the settings. Please have a look at the screenshot which shows one example where SL is wrong.

I'm also attaching the current modified version of the EA which already has TP1/TP2 and MagicNumber incorporated in it.

Appreciate your insights.
Thanks. P.
 

Attachments

Enivid

Administrator
Staff member
Nov 30, 2008
15,983
799
144
Odessa
www.earnforex.com
if I have PipsAway as 30 points from the current price
PipsAway is not "from current price", it is from the latest bar's High and Low. Also Buy's open level has spread added to it.

Second issue is incorrect settings of SL and TP.
On the contrary, SL is based off the current price (current at the order creation time) instead of the High/Low. So, it is almost never Entry price - give SL parameter.
 

JJ1357

Newbie
Aug 5, 2018
11
0
1
Does it not affect whether it is a Buy or a Sale, in the Stop Loss, when the spread increases rapidly in a news item?