How to edit code to make SL/TP based on % of entry price
1 replies
kong_28
9 years ago #113312
Hi Mark,
I would like to adjust code for meta trader to make SL/TP based on % of entry price. Is it possible to add or replace
some code from the original SQ template ? If so, please help me for that code as following condition :
Stop-loss price = Entry price x (1+S/100)
I will use your code to edit my EA manually.
Thanks,
Sarids
Mark Fric
9 years ago #128818
Hello,
yes, this seems to be correct computation.
You can edit it in the function openOrderWithErrorHandling() – there the EA places the order and then its SL and PT.
You can use MQL function OrderOpenPrice() to get the actual entry price.
Mark
StrategyQuant architect
Viewing 1 replies (of 1 total)