DislikedCyber1,
Thank you very much for your quick reply. However that is not what I am looking for. The link you provided leads to a trailing EA, where I need a script for manual aplication. I dont think I can put it any clearer than in my previous post.
All the best,
JKIgnored
Even though it's an EA it also functions as a script. A script fires once and if the condition it was looking for is true it executes and then is removed from the chart. An EA monitors for the condition it's looking for until you remove it and will execute its given task as many times as the condition is found to be true.
I've made slight modifications to it and renamed it so there's no confusion that its function is not to trail but to set the stop loss X pips above/below last high/low.
You must test it out on your demo account first before you put on a live account I will not take responsibility if it messes up your orders.
Now having said that I have tested it and here's what you need to be aware of even though you're putting it on one chart of a particular symbol it will move stop losses for all orders on that chart but in addition it will also move all stop losses for that symbol on other charts. You would need to have a magic number for each different symbols chart you have open.
It would need additional modifications to make that work. And as a side note the script you posted also does not have that capability.
It will only work on Buy or Sell orders.
It will not move a SL if the last low minus X pips is greater than the current price in case of a Buy order and vice versa for Sell order.
Attached File(s)
FXPT_SetSLLastHiLo.mq4
3 KB
|
407 downloads