工作已完成
指定
EA Operation
Upon EA starting (the EA attached to a graph), a series of Processes are launched with a certain pips gap between them. Meaning, Process 1 is launched immediately, Process 2 is launched after the price made a PipsGap movement to either direction (upwards or downwards), Process 3 will be launched after the price made another PipsGap movement to either direction, and so on and so forth. After the first trade in a Process is initiated, there may be a sequence of follow-up trades within this Process. So a Process is the series of trades from the first one until the Process is closed due to Process Take Profit, or Process Stop Loss.
Each Process is described by an [Process Type n] sub section in the EA parameters which details the Process parameters. There should be up to 32 sub sections for up to 32 Process Types.
Among these parameters are Process TP and Process SL measured in US Dollars, OrderType, which may be Buy or Sell and more (the full list of the trade parameters appears in the next paragraph
Each Process Type sub section will include also a switch parameter called Active. This parameter may be Yes or No to determine if this Process Type n is currently active or not. As a result, the number of active Trade Types in a certain run of the EA equals to the number of Process Types where Active=Yes.
The first trade in a Process is opened in a price level which we’ll call L1.
For Process Type 1, L1 is the price level when the EA starts. For the follow-up Processes, L1 is dependent on the price distance between each 2 consecutive Processes as dictated by The PipsGap parameter which appears among the parameters of each Process Type n.
For each Process the behavior is as follows:
As mentioned, the first trade is opened at price level L1. (The Trade Type and volume for this 1st trade are described in the Process Type parameters). There is another price level L2 that is D (Distance) pips from L1 in the losing direction from the trade that was opened in L1 (if the trade in L1 is Buy then L2 is bellow L1, if the trade in L1 is Sell then L2 is D pips above L1).
If the price movement for the trade in L1 goes in the winning direction, and the accumulated profit during this Process hits ProcessTakeProfit, than this Process is closed. Now, if ProcessAutoRestart=1 then another process from this Process Type is immediately launched and a new L1 is set.
If the price movement for the trade in L1 goes in the losing direction and hits L2, then a new trade is opened in this price level. This trade is opposite to the trade in L1 (if the trade in L1 was Buy than in L2 it will be Sell). The volume of this 2nd trade is provided in VT2 (Volume Trade 2) parameter, which is among the Trade Type parameters.
Now, the same logic continues. If the price movement for the L2 trade goes in the winning direction, and the accumulated profit for this Process hits ProcessTakeProfit, then the Process is closed (and a new one is immediately opened should ProcessAutuRestart=1.). If the price movement for L2 trade goes in the losing direction and hits L1, then a new trade is opened at L1, in the same direction like the previous L1 trade, and with a volume equals to VT3. This VT3 trade is added to the previous trade/s in this L1 level
If during the Process, the accumulated loss of this Process hits ProcessStopLoss, than this process is closed (and a new one is immediately opened should ProcessAutuRestart=1.)
From this point and on, the Process continues in the same logic, until it’s closed.
There are 2 more parameters called GlobalTP and GlobalSL. If from the moment process Type 1 (Process 1) was initiated, the accumulated profit (or loss) of all the currently active processes hits GlobalTP (or GlobalSL), then all processes are closed immediately. Should GlobalAutoRestart=1, then the EA restarts from Process Type 1 and on.
To rephrase: a series of trades that were “born” from a certain Initial Trade is called a Process.
A process is finished in one of the following 2 instances:
1. The accumulated profit/loss of this process (starting VT1, VT2, etc.), reaches a ProcessTP or ProcessSL.
2. The accumulated profit/loss of all processes that are currently active reaches GlobalTP or GlobalSL. In this case all trades in the EA are terminated immediately.
For this calculation closed processes that belong to this run of the EA and were finished because of ProcessTP/SL need also to be taken into account.
This is actually how the EA is finished. Now, the EA will be re-initiated if GlobalAutoRestart=1.
There are 2 AutoRestart parameters, one in the Process level, and one in the EA general level. If ProcessAutoRestart=1 in the Process Type parameters, then after a Process is terminated due to ProcessTP or ProcessSL, another Process will be immediately launched with the same parameters.
If GlobalAutoRestart=1 in the General parameters in the EA level, then EA will be re-launched and all Process Types will be initiated (much like in the EA start)
General parameters
Will appear in a separate General sub section within the EA parameters.
1. GlobalTP – as described above. Measured in US Dollars.
2. GlobalSL – as described above. Measured in US Dollars.
3. GlobalAutoRestart – 1 or 0 as described above
Process Type parameters
As mentioned, there will be up to 32 identical sub sections to include the various Process Types and their related parameters.
These parameters, for each Process Type, will appear in a separate sub-section that will include:
1. A Process Type header with a serial number, all within brackets. For the 1st Trade Type it will look like this: [Process Type 1]
2. Active – a switch parameter than can have the values Yes or No. If Yes, this Process Type is active in the coming run of the EA.
3. OrderType (Buy/Sell) of the first trade in the Process
4. VV (Volume Vector) in lots (starting 0.01 lot). It will look like this
VV= VT1, VT2, VT3, VT4 …VTN (there will be numbers instead of letters of course...). It means that the first trade, to be opened in L1 will have a volume VT1, the second trade to be opened in L2 will have the volume VT2, the 3rd trade to be opened in L1 will have the volume VT3, and so on and so Forth.
The number of VTs is not limited, but if the Process reached the last value in the VV, VTN, and the process hasn’t been closed yet, it starts all over again from VT1.
5. ProcessTP – Process take profit. Measured in US Dollars.
6. ProcessSL – Process stop loss. Measured in US Dollars.
7. D – price distance between L1 and L2 (in pips)
8. ProcessAutoRestart – 1 or 0 as described above. If 1, the process will be re-initiated immediately after the previous Process for this Trade Type was closed due to SL/TP.
9. PipsGap – a price movement in pips that the price should move in either direction, so the next Process Type will be opened
Comments
1. GlobalSL/TP overrides ProcessSL/TP. Meaning should EA reached the conditions described to hit GlobalSL or GlobalTP, the whole EA will be closed (and immediately re-initiated if GlobalAutoRestart=1), regardless of the individual status of the currently active Processes).
2. The EA should create a detailed log to enable us to accurately track and check its operation.
3. If any questions, please don’t hesitate to ask.
4. Thanks in advance for your reasonable bid and professional and fast delivery.