Take Profit with defined lot size - script - not EA

Black Art

Trader
Mar 2, 2021
12
1
6
43
Hello Traders!

I was wondering - is there a script that will work similar to MT4's TP but instead closing entire position will close only a part ?
For example at X price - close 0.04 lots out of 0.10 = 0.06 still open.
At the moment I'm using EA call OneClick Trader which has this option built-in but I don't want use this type of EAs any longer...
 

Enivid

Administrator
Staff member
Nov 30, 2008
16,042
817
144
Odessa
www.earnforex.com
A script is a type of program in MetaTrader that runs just once. You double-click it or drag it to the chart, it executes, and that's it - it won't remain attached to the chart monitoring anything. If you need a program that monitors a position and the closes it partially, then only EA can do that (because indicators can only monitor but not close/modify trades).
 

Black Art

Trader
Mar 2, 2021
12
1
6
43
Thank you for your wisdom and guidance.
Maybe at least there is an EA that will do the job but won't require to open a new position via that EA ?
What I mean by that is - I open a new position via MT4 but proper TP is set and manageable via recommended EA.
Do you know any ?
 

Black Art

Trader
Mar 2, 2021
12
1
6
43
thank you for your recommendation!
This is a great tool that I didn't know about before and it does what I want.
However, is there any chance for seting up a few Take Profits on the same trade?
For example: at X1 price/ or PIPS profit - TP1 = 40% closure, at X2 price/ or PIPS profit - TP2 = 20% closure etc.
I believe option of 3 levels would do.
 

Black Art

Trader
Mar 2, 2021
12
1
6
43
This can be done only approximately by using non-resetting profit conditions and partial close actions.
so basically what you're saying is that the algorithm will close exact same percentage of the open position every time the conditions are met, is this correct?
And the percentage value cannot be modified for second closure in this case, yes ?
 

Enivid

Administrator
Staff member
Nov 30, 2008
16,042
817
144
Odessa
www.earnforex.com
so basically what you're saying is that the algorithm will close exact same percentage of the open position every time the conditions are met, is this correct?
And the percentage value cannot be modified for second closure in this case, yes ?
It will be closing the exact same percentage of the remaining position size. E.g., if you set it to 30% and have 1 lot in the beginning, it will close 0.3 on first trigger, 0.21 on second (0.7 * 30%), 0.15 on third (0.49 * 30%) and so on.