![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I have everything converted to a single net position, which has a TP set at an external parameter distance.
In other words, in your version, it is as follows:
- bystop is triggered, buy opens 0.01 with a certain TP.
- if the price moved against us and reached the opposite side of the channel, it opens a sell order at 0.08,
- then OrderCloseBy is triggered and out of two locked positions, one Sell 0.07 is left,
- if the position reaches the opposite side of the channel, it is again reversed: buy 0.64 has triggered,
- OrderCloseBy is triggered immediately, and one buy of the two locked positions remains 0.57
The algorithm is the same but it saves on margin and spread.
In general the net approach rules - locks cannot be used.
1. Not with this strategy... Its strength is in lots, that's a fact.
2. IMHO coof is big, I think you can be limited to a double overweight of one of the directions. You have almost tenfold...
1. The drawdown is certainly a big one. I wonder why it is not shown in green. Probably, equity drawdown within one trade is not shown by the tester - either due to dense trades or due to some other reasons.
2. The modeling quality is not high, though maximal for minutes. Try to check it on 5-minutes.
As far as I can see, almost all losing trades are short. Maybe there is some explanation of this fact?
4. Profitability with this number of trades can be recognized as quite good (2.02). But the recovery factor (total profit/maximum drawdown) is about 2.33 for a couple of years. Not so much.
But in any case it is something like something practical - just what is missing in the speculations of the topicstarter.
Залог - это залог и не более того. Это не прибыль и не убыток, это средства, которыми Вы не можете распорядиться.
Если Вам вернули залог, то Вы не стали ни богаче, ни беднее, но в Вашем распоряжении стало больше средств. Но если, к примеру, Вам вернули залог, т.к. Вы закрыли ордер (или несколько ордеров) BUY и Вы вновь открываете BUY, то Вы - идиот, т.к. Вы подарили спред своему ДЦ.
The question was how to get out of a situation where there was not enough available funds to open an order of the required volume. To exit without draining the deposit. I wrote - how.
What you are writing about is called "repositioning". In Avalanche, the Buy and Sell orders are not opened, only the pending Buy Stop and Sell Stop are placed. And if the price activates them or not, the chance is 50/50. The margin and profit earned when the price rebounds slightly outside the channel is already on your account. In a desperate situation (small deposit, no free money for placing another order), will you sit and wait for a complete loss of the deposit? I give you a 50% chance to get out without (or with a small) loss. Do you prefer to do nothing? Then there is no reason to start trading forex.
For a brokerage company with 100% compensation for differently directed orders, the loss to be compensated does not exceed a refundable deposit up to a bandwidth of approximately 25 points (EURUSD, 1:500 leverage). But everything changes dramatically when the leverage changes. For example, with 1:100 leverage for EURUSD the safe bandwidth increases to approximately 130 pips.
For sever29's task it would look as follows: closing a loss of 4 lots of 1167 x 40 = 46680 roubles. Returnable margin of 4 lots: 157553 rubles. The result: on the account after closing the orders is 157553 - 46680 = 110873 roubles plus free funds (70000 in the problem).
Preparation:
1) Choosing the multiplication factor of the orders. You can start with the classic method - doubling, or you can use more progressive method - with decreasing coefficients (5 - 4 - 3 - 2...) - it allows you to exit the "Avalanche" faster, but requires more capital.
2) Select the number of reversals to be sustained. Optimally - around 5. On this basis, calculate the volume of the initial lot.
3) Calculate the channel width. For this purpose let's set the standard indicator "Average True Range" with the period of 90 (quarter) in the "Day" chart. We divide the number displayed in the indicator by 3 - this is the channel width we are looking for. (For example, for EURUSD, the indicator shows 135. Divide by 3 - the width of the band is 45 pips).
Trade:
1) We open an initial volume order of Buy or Sell at random. Then open a pending order of the opposite direction of the Buy Stop or Sell Stop type, with an increased volume (initial volume, multiplied by a coefficient).
2) If we have guessed the direction - fix profit and try again. If we have not guessed and the price activates the insurance order of increased volume - on the level of the first order, we set a pending order (for the upper border of Buy Stop type, for the lower - Sell Stop) of such a volume, so that the multiple of the already open order on this border is kept relative to the total volume of orders on the opposite border of the channel. For example: 1/2, (1+3)/2, 4/(2+6), (4+12)/8...
3) If the price has moved out of the band, but has not passed the Breakeven distance from its outer boundary, you can "reset" - close all profitable orders and replace them with a single pending order of equivalent volume, setting it slightly further from the opposite boundary. If the price moves in the opposite direction - a pending order can be moved after it, narrowing the channel. If the price continues to move in the same direction and activates a new order, the corridor will only widen slightly.
Exit:
1) Once the price has passed the breakeven distance from the outer edge of the channel (w = z / (y - 1), where z is the channel width in pips, y is the multiplication factor) you will begin to profit. If there are a large number of orders, you may issue the command "Close overlapped orders". All compensated orders will be closed, and only one profitable order will remain with a volume equal to the difference of order volumes on opposite border of the channel. For your convenience, you can put a Trailing Stop on it and collect a profit.
2) When the price makes a penultimate reversal (for example, with the 5 that you have chosen, this will be the fourth reversal), we place the last pending order of the necessary volume, and if the price activates it, we close all orders of both directions at once. In this case, you will lose a part of your money, equal to the corridor width, which is closed with a smaller volume from the oppositely directed orders, but you will get back all of the deposits from all orders in both directions. In CAs with compensation of pledges of oppositely directed orders the pledge of the larger (multiplied by the coefficient) volume will be returned.
В задаче стоял вопрос - как выйти из ситуации, когда свободных средств не хватает для открытия ордера нужного объема. Выйти без слива депозита. Я написал - как.
То, о чем пишете вы, называется "переставка". В "Лавине" ордера Buy и Sell не открываются - выставляются только отложенные Buy Stop и Sell Stop. А активирует их цена или нет - шансы 50/50. А залоги и прибыль, полученная при небольшом выходе цены за границу канала, уже у вас на счету. В безвыходной ситуации (маленький депозит, на выставление очередного ордера свободных средств нет) вы будете сидеть и ждать полного слива депозита? Я же даю шанс 50% выйти без (или с небольшими) потерями. Вы предпочитаете ничего не делать? Тогда незачем и начинать торговлю на форексе.
I realise I'm communicating with a tree, but nevertheless I'll repeat it for those standing nearby:
For your BUY_STOP to open, are you suggesting to close orders which are close to breakeven?
1. If this is a BUY order, it will be closed at Bid price minus the points you sacrificed (not to reach breakeven, because you have a BUY_STOP at that level which is not enough), while your BUY_STOP will be opened at Ask price, not only higher.
2. If you close ALL orders (you probably mean it when you start writing about losses), ALL deposits will return.
PS. And what is this profit on the account, if in this case, the orders being closed are in the loss zone?
John, I don't understand your position.
1. You state that you want to gift all the poor with weapons to enrich and bankrupt the banks by laying out the theoretical framework here.
2. In stating the basics, you make quite a few lapses in the basics: collateral, its effect on equity, opening/closing positions ...
2. You are familiar with coding, if you wrote the Rabbit indicator.
Hence the logical question: why not check yourself the weapon that you are presenting to the masses? So that the masses are not harmed by it.
It's not hard to check it, even for a coder with no qualifications at all. I did it myself. There is no avalanche-like profit here.
From the history, one can find parameters and sectors where one MIGHT have made a profit.
The more we learn, the more probable it is to use the drawings and the more probable it is to use the right approach.
Moreover, the TS is 100% formalizable.
Я понимаю, что общаюсь с деревом, но тем не менеее повторю для тех кто стоит рядом:
Чтобы открылся Ваш BUY_STOP, Вы предлагаете закрыть приблизившиеся к безубытку ордера?
I realise I'm talking to a tree, but nevertheless I'll repeat it
for those standing around:Zhvanetsky wrote: "Going personal acts like throwing a handful of sand in the eye - one gets furious and goes blind". This, and other trolling techniques such as attributing your words to your opponent, insults, changing facts, unproven words presented as an axiom, pitting everyone against one another ("as everyone knows", "it's obvious to everyone"), etc., only works on those who are unaware of these techniques. I know them all - so the persistence of the trolls, for a thousand-odd posts unsuccessfully trying to get me off balance, instead of discussing the topic directly, is incomprehensible. Think about the purpose of all these people - why are they on the topic if they have no interest in it?
2. При изложении допускаете немало промахов в основах: залоги, их влияние на эквити, открытие/закрытие позиций ...
ИМХО гораздо убедительнее продемонстрировать свою ТС в тестере чем на словах, которые ещё и не всем понятны.
There are several people in the thread who have repeatedly demonstrated the results of testing Avalanche on history. On several currency pairs. With different trading methods (with and without periodic withdrawals). The results are very convincing.
Of course, I can write an Expert Advisor, but why? I have repeatedly written that the Avalanche can only be traded manually. And I've written why - any Expert Advisor can be easily stopped and then all your capital will go down the drain. For a human, even an impudent slippage in the position of a pending order and its non-opening or canceling does not mean anything - the EA will simply open a direct order immediately or place the pending one a bit further. Besides, even if the terminal is blocked by an IP address, it can still be accessed through a proxy, through a mobile terminal, or through a special server. Will the Expert Advisor be able to do it? No. There is also a possibility to block the client's account - but DC can go to court for this and they use it in very rare cases - the risk is too big for them.