Moving TP & SL
18 replies
こんにちは、,
I am trying to do this:
if OpenProfit(magicBuy) > Variable1 then
Move SL to CurrentPrice – Variable1 and
MoveTP to min(currentPrice+TP + Variable2,CurrentPrice+MaxTP) (ie. if maxTp is reached I close the order)
.
How is this accomplished?
I attach a sample SQW for your consideration…
Please consider that MagicNumbers are variables as the EA could run on different Pairs.
Thanks a lot,
Claudius
0
I could be wrong but I see magicNoSell with small “m” in the beginning which could be the cause of the error message.
0
M is capital in the attached. Same error. Plus the change of MagicNo is not accepted in the second one. Please see attached…
ありがとう
0
こんにちは,
tried to change magic number from Buy to Sell and got it without any problems. You just have to click through inside the condition into the deepest member using “…” button.
Also edited in Adjust SL “Market position is Long” into “Market position is Short”
See attached
0