Experts: Autostop

 

Autostop:

Automatically sets a pre set take profit and stop loss for you.

Author: Tonny Obare

 

What do you think ????

extern bool MonitorTakeProfit=true;
extern bool MonitorStopLoss=true;

if both is true ......

and what if one is false .......

Test before you publish

Please don't post again new codes not tested yourself

This way new coders learn to make bad working programs...

 
The code is tested and fine.
 
Devries please examine and test the ea before commenting because you always post invalid complaints this is not facebook so please let us do our work.
 
tonny:
Devries please examine and test the ea before commenting because you always post invalid complaints this is not facebook so please let us do our work.


Do it the right way Tonny.....

1 There are situations you don't want to set TP or SL if I choose o for SL or TP error Wrong Stops. Retrying

if I choose MonitorStopLoss = false and MonitorTakeProfit=true it is placing a SL when OrderTakeProfit() == 0

2 It is also modifying trades of other EA's same Symbol trading not checking for magicnumber or if it is a manual trade

3 And ofcours you are not giving the right solution calculating StopMultd for brokers with prefix or suffix on currency

 
As its clearly in the description it only sets stops to orders that dont have a sl/tp or both and its best for those who use common sl or tp on all orders of a pair. On the other issue if say you want it to modify one stop set the other to false and not the stop to 0 because when an order is opened without stops its stops are already 0. About stop monitoring there is nowhere in the code that says if(MonitorStopLoss==true&&MonitorTakeProfit==true) that is your own invention.
 
The issue for setting sl when sl false and tp true and tp not set is a rare possibility that has been noted and shall be sorted ASAP the rest is fine. Thanks for pointing that out :-)
 
tonny:
The issue for setting sl when sl false and tp true and tp not set is a rare possibility that has been noted and shall be sorted ASAP the rest is fine. Thanks for pointing that out :-)


Then also make a selection on magicnumber. (Manual trades have number 0)

to make it better and avoid it mess with trades coming from other EA's.

 
Very helpful EA especially for scalpers like me. Thanks.
 

Hi,

very nice and good for scalp :))

Regards,

Jack

 
Thanks all for good comments and pointing out bugs.
Reason: