TheSnowGuru / PyTrader-python-mt4-mt5-trading-api-connector-drag-n-drop

Open Source Trading Strategies & End-to-End solution connecting Metatrader4 & Metatrader5 💹 with Python with a simple drag and drop EA. Fully tested bug free & efficient solution for live & paper trading⭐ Full Documentation ready. Lightweight, efficient and stable implementation 🔥
https://discord.gg/wRMUNP8ERa
653 stars 11 forks source link

setting trailing stop #22

Closed bhralzz closed 1 month ago

bhralzz commented 2 years ago

Hi, is it possible to set trailing stop while sending order via mt5? if no, is there another mechanism doing that automatically using Metatrader itself? thanks

Branly76 commented 2 years ago

Hi,

You can set the SL as a trailing, but it means you have to regularly retrieve the open positions and check distance market price and SL.

This is the way you can do. But it needs some code. I think I have somewhere the code for this.

But there is now not an auto trailing stop. I'm not sure if it will be possible to do this by code, only once. I will check if possible.

BR

bhralzz commented 2 years ago

Thanks for your kindly reply, waiting to hear from you.

bhralzz commented 2 years ago

Hi,

You can set the SL as a trailing, but it means you have to regularly retrieve the open positions and check distance market price and SL.

This is the way you can do. But it needs some code. I think I have somewhere the code for this.

But there is now not an auto trailing stop. I'm not sure if it will be possible to do this by code, only once. I will check if possible.

BR

Did you checked that? trailing stop code?