The Expert Advisor trades on 2 pairs with a positive correlation. On one, he trades only to buy, on the second only to sell. If the position goes to a loss, then the adviser begins to sort it out by opening deals much smaller in volume than the original one and biting off small pieces on price rollbacks. The opposite transaction, which is in the black, will not be closed until the unprofitable one is resolved or until they reach the specified profit in total.
Clearing (averaging) transactions are opened using a virtual trawl at a distance LevelAverag from the current price and no closer than Step from the previous open position
SYMBOL_1 = “EURUSD”;
SYMBOL_2 = “GBPUSD”;
Step = 50;-minimum step between orders
ProfitClose = 1.00;-profit in the currency at which we bite off the averaging
SumProfitClose = 10.00;-profit in the currency at which we close everything
LevelAverag = 300;-distance to the clearing order in points
LotRUL = 0.01;//the first lot of the clearing (averaging) order
K_Lot = 2.5;//the coefficient of increase of the averaging order
Max_Lot = 100.0;
StartLot = 0.05; -auto trading lot
time-based trading filter
TimeStart = 0,
TimeEnd = 24;
BarsCorrelation=300;
TimeFrames=0;
OpenDeltaPercent = 80;-percentage of the maximum delta at which the first positions are opened
MagicPlus = 0;-addition to the calculated magic
scale = 1.2; -the size of the information window
Font_Size = 10;-font size
[spoiler title=”Read More…”]
[/spoiler]