Lavoro terminato
Specifiche
I have a Change in EA which is closing all orders in System if percent of Equity is reached.
Right now, EA does close all open Orders in Market and Pending if Xpercent (StartPercentClose) of equity is reached.
I want now that if market Price is in a Range, E-should close orders on another Percent level and out of that Range EA should close at normal PercentClose – Function should be set active or inactive – If inactive EA should work as he does right now.
If profit percent is in a Range, EA should use actual (StartPercentClose) xpercent - this I want to do definite new.
Out of the range, EA should use x percent – existing percent
So when EA start to calculate new and at this moment market price is 1.2020 (basis price for calculating should be always shown in chart, and will be updated always after new closing)
Range pips are defined to 40 pips - EA should use xpercent (will be definated new example 6%) in this range from 1.2060 and down to 1.1980 EA is using defined Percent for closing.
In this range, EA should close only when xpercent are reached.
Out of the range EA should use normal Percent and should close direct out of the range if new percent is reached or is already reached close all positions.
In chart should be also shown, which percent closing current is active.
Also, to fix:
Also ther must be made a change about closing the orders. If Percent is reached, EA does close first the Market orders in the System and than the pending orders. But sometimes an Pending Order is still executed.
So it has to be sure or EA has to check, that if Percent is reached, at this time all market orders and pending orders in the System are closed for sure. Also if an old pending order was executed after orders in Marekt were closed.
EA I will send after selection