Работа завершена
Техническое задание
Modification for MA Level EA
Short Overview
1. Add Single Trailingstopp for predefined number of Trades
2. Add Average Trailingstopp for whole open Position in same
Direction depend if Single Trailingstopp set “true” and depend on which number of Trades. If Single Trailingstopp is set “false” then
directly from first Position.
3. Add “Lock Function” for a Group of Trades. A Locked Group of Trades will defined of “Max Orders in each direction”. Eg. 5 Trades, that mean a
Locked Group of Trades is between 1 until 5 Trades.
4. Modification of Friday Close. More flexibility to able for closing Trades in profit between a predefined Time and add after this Time Point 3 the “Lock
Function”. Eg Friday Close is defined at 5pm and I can give trades time to run in profit for example 2h. After this EA check which trades are
still in loss and he lock this trades over weekend.
5. Show in Mainwindow Daily Profit / Loss from Locked Group from Pair. Lock Order should be market on chart
Trailingstop for each Trades / Average
EA should have the ability to set Trailingstop for single Trades. In My System EA open several Trades until “Max Order” is reached. I should
can define how many Trades EA handle as a single Trade for Trailing each single Trade alone. Eg if I can define “Trailing Single Trades Number”
to 3. EA handle the first 3 Trades as Single Trades. This Function should be set to “true/false”.
EA should have the ability as well to trail whole open Trades as a “Average Trailingstop”. In this case, EA trail all open Trades in same
Direction. For this, EA should know, if I set “Trailingstop for Single Trades” to true, that he only trail whole open Position if the maximum
Number of “Trailing Single Trades Number” is reached. In my example if it gives more then 3 Trades, and Average Traingstop is true EA Trail
only all Trades if it’s more then 3 Trades open in same Direction. If “Singel Trailingstop” is “false”, EA trailed directly all Position in
same Direction.
Lock Function
As soon one Trade is open, EA set at predefine Position at x Pips Distance an opposite Position. I think, it’s better if it’s a Market Order
instead a Stop order. Eg. EA open a short Position at 1.2450, x Pips Distance is 40 pips and opened Position is 0.01Lot. EA set in this Case at
Value 1.2490 a Long Position with same Lotsize 0.01 Lot and if pair run in this Direction, this Position will locked and go in to the “Locked
Group”. If Position still open without the locked Position EA opens again a new Position (this is how EA at the moment work), EA set the new
Distance for the opposite/locked Trade in order the new opened Position. In this case, EA check again how much now the opened Orders are and
set opposite Position with new Lotsize. And this will go as long Trades are open and will not close with trailingstop/TP.
What should EA do if a Group of open Orders are locked?
If there are Positions which are locked this go in the “Locked Group”
pool. EA should know which Positions this are and this Positions should not affect other Positions. So this “locked Group” is blocked from EA
and doesn’t matter if this main trades are in profit, EA should not close this trades from locked Group because this trades are blocked in the
“Locked Group”.
What EA do in locked Group is, split the Position in small Portions. Example if there are 5 Trades open with 0.01 lot each he open 0.05 Lot to lock
this. One Portion is then 0.01 lot from the normal order and 0.01 lot from the lock. He split this 0.05 lot to 0.01 lot each to get same lotsize
like the other orders.
As soon this happen, next normal Trades should have a Multiplier (its Like a Booster). In eg Multiplier of 2 this mean, EA open next trades
with double the lotsize. He should have as well a Maximum Order value which run with this Multiplier. In example Maximum Order Level is
5, that mean, next 5 trades have double Lotsize instead of normal lotsize. After this 5 orders is reached, EA go back to normal Lotsize and run
normal forward.
And now the clou! EA run forward as he should do. New open Position doesn’t affect the “Locked Group”. If there is a “Locked Group” EA check at
this Point if there are Positions, which closed in Profit. If there are Positions which closed in Profit, EA compare this with the “Locked
Group”.
For example, the Locked Group is locked at 20CHF in Loss. New opened positions close in Profit. This profit make 5 CHF. In this Case, EA check
now how much he can close from the “Locked Group” which are same or less in Loss to fill the loss with this 5 CHF profit. He should close for
example if there are 5 short trades with 0.01Lot open and one long Trade with 0.05 Lot. He check how much from both side he can close which give
less or same loss. Example, he detect that 0.01 short and a partial close of 0.01 lot from the 0.05 lot buy give 4.5CHF loss. Then he should close
from the “Locked Group” 0.01lot short and partial 0.01 Lot long. The “new “locked Group” have now in this case only 0.04 short and 0.04 long
open.
For this procedure EA should check whole account profit instead profit of attach pair. In this case, EA is more flexible and can get faster out
of Trades which are in the “Locked Group”.
Very important is, that EA as soon a “Locked group” is formed, EA continue to trade. But following positions should not affect the “Locked
group”. That mean, “Locked Group” can only close with Profit from same or other pairs that are made profit.
Friday Close
Friday close is no longer “close all Positions” at predefined Time!
Now, Friday close have Hour and Minutes to set.
It give
now two Steps for Friday.
First Step have Time in hour and Minutes. Eg. 17h 30 Minutes. If this hour will reached, EA check all open Positions. Gives there positions which
are in Profit, EA close this Positions immediately.
The Second Step have as well Time in hour and Minutes (this is every time later then first Time). This Time is the point, which EA safe all
Positions with the “Locked” Function. This Mean, the second Time is in example 21h 00 Minutes, after this Time, EA check on pair if there are
positions open. If Yes, EA lock this Position with the “Locked Group” Function. In this Case, I am safe over the Weekend and have no fear what
could be happen during the weekend. On the new Week, this “Locked Groups” will be completed like the normal process for the “Locked Group”.
All Functions should be can set “true/false”