Order scale out help

 

Can somebody please post a sample of code of how you would manage 'scaling out' of Lot sizes in an EA, as I am having trouble with it.

For instance, if I originally opened a BUY at 1.00 whole Lot and after price goes into profit X amount of pips I want to close NOT the entire 1.00 but just a fraction at a time (maybe 0.1).

This is for MT4.

Thanks for your kind help.

FxN

Reason: