Partial close script

Ckart 1

Trader
Sep 17, 2018
9
1
24
San Francisco, CA
www.youtube.com
That is exactly what I was looking for!

It will save a lot of time not having to go through all the steps with meta trader doing it the difficult way.

Thank you very much.
 

milesZ

Trader
Dec 3, 2021
1
0
6
21
Have you seen this script? It can be easily modified to close 50% or 25% instead of the current 1/3 of a position.
Hey,

I have never modified scripts before. Wich line do I have to change in order to put a different percent to close?
 

Enivid

Administrator
Staff member
Nov 30, 2008
17,245
1,074
144
Odessa
www.earnforex.com
Hey,

I have never modified scripts before. Wich line do I have to change in order to put a different percent to close?
The line number 44:
MQL4:
double halflots = NormalizeDouble(LOTS / 3.0, vp);
This makes it close 1/3 of a position. You can either keep it as a part and change to 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.
 
  • 👍
Reactions: milesZ