Help Needed Making Perfect Trailing Stop EA - page 2

 

Working Well

I am almost finished with this Stop loss. Almost everything is working correctly.

1. Modify all trades

2. Modify only trades in profit

3. Modify all trades on a specific chart

4. Modify profiting trades on a specific chart

5. Close all trades on this account for specified profit.

Still required...

If someone can help, I need some code or a function to scan all existing trades on an account and remove all existing stop losses. This is needed for option 5. We need to remove existing stop losses.

Once I have this it is all complete and I will upload for everyone to use.

 

When you modify the order, set the SL to 0.

 

Expert Completed

Thanks to everyone who helped out with the coding. The new trailing Stop expert has been completed and is working perfectly.

Features:

*** Modify trailing stop loss on all open trades on the current account

*** Modify trailing stop loss on all profiting open trades on the current account

*** Modify trailing stop loss on all trades on the attached chart

*** Modify trailing stop loss on all profiting trades on the attached chart

***Close all trades and take specified profit when entire account is in profit

I'd love to hear your feedback.

Steve

Files:
 

Great

nice work sbwent, i'll try it and let you know how it performs.

 
sbwent:
Thanks to everyone who helped out with the coding. The new trailing Stop expert has been completed and is working perfectly.

Features:

*** Modify trailing stop loss on all open trades on the current account

*** Modify trailing stop loss on all profiting open trades on the current account

*** Modify trailing stop loss on all trades on the attached chart

*** Modify trailing stop loss on all profiting trades on the attached chart

***Close all trades and take specified profit when entire account is in profit

I'd love to hear your feedback.

Steve

steve,

is it possible that i only use the profittarget? while i use other EA..

cause the profittarget is a great idea.. will it still work even if i set the the allpositions to false?

i will test this on monday..

 

Profit Target...

antone:
steve,

is it possible that i only use the profittarget? while i use other EA..

cause the profittarget is a great idea.. will it still work even if i set the the allpositions to false?

i will test this on monday..

Yes, you can still use the ProfitTarget with other EA's. However you can ony have one EA on a chart, so you would have to add it to a different chart to your other EA. It works on the entire account when active so other settings are irrelevant.

 
sbwent:
Yes, you can still use the ProfitTarget with other EA's. However you can ony have one EA on a chart, so you would have to add it to a different chart to your other EA. It works on the entire account when active so other settings are irrelevant.

ok.. so i'll just have to set ithe allpositions to false.. i think your system is great.. i will test the take profit..

 
sbwent:
Yes, you can still use the ProfitTarget with other EA's. However you can ony have one EA on a chart, so you would have to add it to a different chart to your other EA. It works on the entire account when active so other settings are irrelevant.

Hello sbwent,

Your EA is perfect to use with a very simple strategy. The only thing you need to add to it is a magic number option. If set to "0" manage all positions if you enter a magic diferent than "0" manage only that positions.

It is perfect to use with another realy simple EA tho use with GBPJPY only, that enter a trade when your accountfreemargin is higher than 10% (or another value) of your account balance.

If you notice the chart of gbpjpy you can see a very strong uptrend since some time. you can make money everyday with it. If you want to code the magic number options on your EA I will make another EA to enter the trades.

Many thanks for your work

 

ADD on!

is it possible to add a SL based on ADR for any pair? and Trailing stop lose that is also based on certain % of the ADR? for the EA.. partial take profit also..

i could use a program like this.. if you can add it, it would be of great help.. thank you

 

Good Idea

kokas:
Hello sbwent,

Your EA is perfect to use with a very simple strategy. The only thing you need to add to it is a magic number option. If set to "0" manage all positions if you enter a magic diferent than "0" manage only that positions.

It is perfect to use with another realy simple EA tho use with GBPJPY only, that enter a trade when your accountfreemargin is higher than 10% (or another value) of your account balance.

If you notice the chart of gbpjpy you can see a very strong uptrend since some time. you can make money everyday with it. If you want to code the magic number options on your EA I will make another EA to enter the trades.

Many thanks for your work

Are you able to add the Magic number and the Ea to enter trades? I love your thinking.

Reason: