Hello,
Does anyone have a script to close say 25% or 50% of a position. This would be really helpful.
Thanks
Does anyone have a script to close say 25% or 50% of a position. This would be really helpful.
Thanks
Hey,Have you seen this script? It can be easily modified to close 50% or 25% instead of the current 1/3 of a position.
The line number 44:Hey,
I have never modified scripts before. Wich line do I have to change in order to put a different percent to close?
double halflots = NormalizeDouble(LOTS / 3.0, vp);
LOTS / 4.0
for 25% close or LOTS / 2.0
for 50% close, or you can change it to percentage like LOTS * 0.27
for 27% close.It partially closes all positions but only for the current trading symbol. You can make it work on all symbols by replacing this line of code:thanks, but just only 1 position can be closed by partial by this script. can u made it for all position ?
if((l_type == OP_BUY || l_type == OP_SELL) && OrderSymbol() == Symbol())
if(l_type == OP_BUY || l_type == OP_SELL)
It will partially close all open orders.Hi there, so this script closes for example 50% of the position that I have selected or all positions on Mt4 that are currently opened?
It will partially close all open orders.
You can quite easily modify the attached script to only partially close those trades that match a given Magic number or even ticket number.Hi, thanks.
is there an script which closes partially the position I select on the terminal? If yes where can i find it? Tries to look everywhere but so far no sucess.