Experts: TradeProtector-1.1 - Automatic Stop Loss and proprotional Trailing Stop (updated version) - page 3

 

I have a feature request. Please could you add a feature that enables the EA to control all currency pairs. Currently this EA works with the attached currency pair (e.g. EUR/USD only), but could you add such an selectable option that turns the pair specific control off in such a way that it manages all the different executed currency pairs. No need to attach mutiple EA's into the different currency pairs. I just put this EA into one chart and all the different currency pairs will be managed in the same manner (I don't want set different SL settings to different currency pairs).

It's very important and useful feature that one EA will manage all the different currency pairs.

 
Dear Marek, I've now started using this on the 5 min chart as it was intended I think. I am taking trades 10 pips above or below the 20EMA inclusive of the spread. The SL is generally set 10pips below/above the 20EMA. The first profit objective is therefore 20pips to get a 1:1 risk reward. At this point, half the position is closed and the profits allowed to run. Thus I wonder if Trade_protector can be coded such that it closes half the position and then the remaining open trade can be set with the DPropSLratio to whatever the user wants? So as an example: GBPJPY crosses the 20ema long. The spread is 4 so at 20ema plus 6pips enter the trade long. SL is set at 20pips. TP (1) is 20pips. At this point the SL is moved to break even. Ideally, the SL is following the EMA plus/minus 20 pips but holds position if the 20 ema starts to move against the trend to limit losses to 20pips. The second profit target is then reached when there is a small retracement that takes out the DPropSLratio. I'm not sure if its already in the code or whether (in the event that the initial 20pips is not reached before the price suddenly reverses) that both the 1st and 2nd profit targets could be taken out at a small profit say 10pips? Hope this is clear and thanks for any reply. I hope everyone has a prosperous new year, kind regards


 
marcool:
sliffy:

how can i change the parameters of the running trade?

I am not sure if I understand your question. If you attach this EA to the chart with the same currency pair as the running trade (open position), EA will - at each bar arrival - check prices and compare them to the EA parameters, and if needed, it will adjust S/L of the open position.
So if you have opened position, and then you will attach "TradeProtector" to the chart, it will start processing your position (as long as it has the same currency symbol, as the chart to which EA is attached).

Does it answer your question?

Btw. - After using it for a while I decided to change it a bit: It will apply initial S/L and don't use Trailing Stop until position will reach certain profit. Then it will start to use proportional S/L:


S/L = OpenPrice +/- (CurrentPrice - OpenPrice) * dPropSLRatio

Someone also requested an option, to reverse position at certain point, instead of using S/L - I am going to implement this.


 

Marcool, I have been doing some work with your EA on the M5 chart. I still find it difficult to understand which parameters should have which values to make it work the way I need. I only use the M5, not the M1 and M5 as in your previous example.
If we just look at a buy (long) position:
I set nInitialSL=15 then the SL is 15 pips below the entry price?
I set the ntrailing stop = 5 which means as the price hits opening price +5 pips the SL will move 5 to maintain 15 pips behind the price yes?
nPropSL threshold = 10 so at opening price + 10pips the SL maintains the position it has reached. dPropSLratio is set at 0.50 so the SL will now be at 50% of the pip profit so if it is at entry price + 20 pips, the SL will be at entry + 10 pips yes?
So if nUseEscape is set to 1 then this will be active. If nEscape TP is at 35 the opening price + spread + 35 pips profit, the trade will close yes?
So I dont understand what nEscapeLevel does nor nsleep. Hopefully you can help.
Thanks again

 
As I know EA starts on every "Tick" not at the start of each bar! So how did you mention :" Just have this in mind if you open a position, the initial SL will not be applied until bar on the EA's chart will arrive." Do you mean EA will start on each upcoming bar???? How is it possible??? I checked your code and I did not find any indication. Do I misunderstand something in here?
 

Hi marcool,

your version trade_protector-1.2.mq4

Can you give an example for the this EA step by step. So that everyone one can understand how it works.

And also if( dInitialSL != 0)
dSl = dnAsk - dInitialSL;

I think it is the first SL for any pair. why did you deduct it from dnAsk.

It should be dSl = OrderOpenPrice() - dInitialSL;

can you explain this.

 
hi marcool, hw to change it back to the version operates on all pairs, not just same window??:)
 
its wrong way round! need implement proportional first then fixed
 
Hello, I'm new to Metatrader 4 and to EAs, I've downloaded your ea (this is exactly what I've been looking for), for some reason it's not working. I've downloaded some other scripts and EAs and they do work, but I have a problems making your ea work on my system. Can you please give me any pointers on how to make it work? Thank You, David
 

Can I use this indicator on mobile MT4. If not please suggest some indicator with which I can apply trailing stop on mobile MT4.

Reason: