Automatic stop loss order setting

 

Hi,

 

I want to configure my MT5 such that with each new long/short order a stop loss is automatically set that is 2*ATR(20) [indicator average true range for 20 days] below/above my order.

 

How can I implement this automatic S/L setting?

 

Thank you.

 

Regards,
Chirs 

 
zubr:

Hi,

 

I want to configure my MT5 such that with each new long/short order a stop loss is automatically set that is 2*ATR(20) [indicator average true range for 20 days] below/above my order.

 

How can I implement this automatic S/L setting?

 

Thank you.

 

Regards,
Chirs 

You have to use a script or EA. If you can't code it, see the codebase or the market.
 
angevoyageur:
You have to use a script or EA. If you can't code it, see the codebase or the market.

Thank you for your hint. 

 

I now find in the codebase the script "SetBuyStopOrder" which is what I was looking for. So I downloaded it in MetaTrader 5 and can now see the script under Scripts=>Downloads=>setbuystoporder.

 

But how do I run the script now? I can click on the script with the right mouse button and say "Attach to Chart". But after script setting the inputs in the pop-uped window and confirm with "OK" nothing seems to happen. Also when I start a new order (F9) I can't see that the scipt is working and automatically set the volume, stop loss ... depending on the defined Money Management setting.

 

Therefore, how do I activate the script?

 

 Thank you. 

 
zubr:

Thank you for your hint. 

I now find in the codebase the script "SetBuyStopOrder" which is what I was looking for. So I downloaded it in MetaTrader 5 and can now see the script under Scripts=>Downloads=>setbuystoporder.

But how do I run the script now? I can click on the script with the right mouse button and say "Attach to Chart". But after script setting the inputs in the pop-uped window and confirm with "OK" nothing seems to happen. Also when I start a new order (F9) I can't see that the scipt is working and automatically set the volume, stop loss ... depending on the defined Money Management setting.

Try it again when the Markets are open ?
 
RaptorUK:
Try it again when the Markets are open ?

Now the market is open but I still could not figure out how to activate the script.

When I click with the right mouse button into the chart and choose "Trading"=>"New Order" then I always see the same setting for "Volume" which does not correspond to the Money Management value set in the script.

 So it seems to me that the script is not activated. What am I doing wrong?

Reason: