Техническое задание
close-function
The existing function in the EA (useBasketprofitpct) counts all closed position (closed by a EA function and stoploss and takeprofit). If the Profit of the closed positions + the floating profit of all positions reache a xx% from the balance, the function useBasketprofitpct closes all positions and restart counting.
I want:
the same function but splitet into the buy and the sell positions plus adding
the the highest-open-long-position and the lowest-open-short-position. And
close if the setted profit get reached, the all-open-buy-positions and the
lowest-open-short-position or all open-sell-positions and the
highest-open-buy-position.
New in the EA:
extern useBasketprofitpct_Low_high=true; //new function
extern basketprofitpct_Low_high=2; //new function
Buy-Positions:
- count-profit-closed-buy-position
- count-profit-open-buy-posistions
- count-profit-of-the-lowest-open-sell-position
- if (profit-closed-buy-positions + profit-open-buy-posistions +
profit-of-the-lowest-open-sell-posistion >=(is bigger then…) basketprofitpct_low_high*0.01*AccountBalance()
then close all open
buy-posistions and the lowest-open-sell-position
Sell-Positions:
- count-profit-closed-sell-position
- count-profit-open-sell-posistions
- count-profit-of-the-highest-open-buy-position
- if (profit-closed-sell-positions + profit-open-sell-posistions +
profit-of-the-highest-open-buy-posistion >=(is bigger then…) basketprofitpct_low_high*0.01*AccountBalance()
then close all open
sell-posistions and the highest-open-buy-position