Avalanche - page 73

 
No... you're right of course :) I didn't mean to offend... What do you mean?

I just mean that the function is quite specific... Actually it is probably the only one in mql which operates not one but two orders... And it is a pity - there are no specific error codes for such a specific subject... It would make life much easier...


Well, you get the idea :)

 
The Expert Advisor opens 2 types of deals: main - entry by stoch on n4 and additional (short) deals - in the direction of the main channel inside n4 and if it exists... All deals are opened when equity is above the balance...
Files:
 
sllawa3 писал(а) >>
The Expert Advisor opens 2 types of trades: main - entry at stoch.on n4 and additional (short) - in the direction of the main inside the channel n4 and if it is present... All trades are opened when equity is above the balance...


Does it have something to do with the avalanche principle?
 
khorosh >>:


Это как-то связано с принципом лавина?

YES... trades in the amount of available funds with profits from previous openings and their continued growth

 
In a critical situation (insufficient funds for placing another order) when the price is between the outer limit of the channel and breakeven level, you can close all positive orders and place one pending order (of the same volume as the sum of the closed ones) as close to the price as possible. If the price moves in the direction of losing orders, one should rearrange the pending order following the price, narrowing the possible channel. This allows you to free up funds, in the worst case only slightly expanding the channel.
 
JonKatana писал(а) >>
In a critical situation (insufficient funds for placing another order) when the price is between the outer border of the channel and breakeven level, all winning orders can be closed, and one pending order (with the same volume as the sum of the closed ones) can be placed as close to the price as possible. If the price moves in the direction of losing orders, one should rearrange the pending order following the price, narrowing the possible channel. This allows you to free up funds, in the worst case only slightly expanding the channel.


It is not clear whether the channel is narrowing or widening?

 
JonKatana писал(а) >>

В MetaTrader 5 те же типы ордеров (Buy, Sell, Buy Stop, Sell Stop, Buy Limit, Sell Limit), что и в MetaTrader 4. "Лавина" работать будет точно так же. В MT5 добавлены два новых типа ордеров - Buy Stop Limit и Sell Stop Limit, но они для "Лавины" не требуются.


В справке МТ 5:
Позиция
Позиция — это рыночное обязательство, количество купленных или проданных контрактов по финансовому инструменту. Длинная позиция (Long) — купленный в расчете на повышение цены финансовый инструмент, короткая (Short) — обязательство на его поставку в расчете на снижение цены в будущем. На одном счете по каждому финансовому инструменту может существовать только одна позиция.

Как-же будет работать "Лавина",если встречные позиции будут постоянно закрываться на возможных разворотах ?


Please explain. How will Avalanche work if the counter positions are constantly closing on possible reversals?
 
hjlujghglu >>:


Объясните пожалуйста. Как-же будет работать "Лавина",если встречные позиции будут постоянно закрываться на возможных разворотах ?

Svinozavr has already answered above. The answer is contained in the quote you quoted from the MT5 help: "A position is a market commitment, the number of contracts bought or sold on a financial instrument."

That is, one active order is one position, two active orders is one position, 10 active orders is one position, 100 active orders is one position. Zero orders - no position on a given instrument.

 
khorosh >>:


Не понятно сужается канал или расширяется?

First, by closing the profitable orders and placing an equivalent pending order a little further away than it was before - there is no channel at all. After all, the pending order has not yet been triggered. If the price moves in the direction of negative orders, reducing the loss - a possible channel is narrowed, because you move the pending order after the price. But the channel is still missing - it will appear if the price reverses and activates the pending order.

If price immediately goes in the direction of the pending order and activates it, the channel will be a bit wider than the initial one, since you have set the order a bit further from the opposite border of the channel. But you have already taken profit by the total volume of plus orders! The channel just got a little wider.

 
lexandros 31.03.2010 07:56

JonKatana wrote:>>
I already wrote - to do this, you need to close overlapped orders (one command) and put a trawl on the remaining profitable order (second command) after you start making a profit. It can be vice versa. Instead of closing 5-6 orders (5-6 commands). And what if there are 10 of them? I am not writing anything just for fun - read carefully.


I am reading carefully :)
You are not quite aware of the internal processes that take place when you give trade orders.
So... When you give an order "To close overlapped orders" - you have the illusion that this is one command ... It is not... It's you pushing the button once. And some things are just hidden from your eye.
In fact, it is only one command for two orders. If there are e.g. 4 orders, that's at least 2 trade orders.
OrderCloseBy(order1,order2)
OrderCloseBy(order3,order4)

This is just an example for ideal conditions with equal volumes of all orders. If the volumes are not equal, there will probably be more orders.
So, in real trading, for each and every order there are likely to be three things.
Just a pause - i.e. server does not execute the order for a very long time. (for various reasons, from bad connection to problems with brokerage company server, and much more).
Re-quoting is when you send an order at the price that is in your terminal and there are different quotes on the server and the broker refuses to execute the order because the prices in the order do not correspond to the current quotes and exceed the difference specified in the sleepage parameter. Although this situation does not concern blocked orders, since it does not really matter which price the order is closed at... the final result will not change. This is true for the brokerage company... But the price at which the blocked orders are closed is crucial in respect to the avalanche.
The third variant is if the slip is big enough - for example, we set 10 points to avoid requoting. Then it is very likely that the orders will be closed not at those prices at which you have given this order. This is called slippage. In the same way... it's not really important to close orders at what price they should close at, and it hardly applies here... but it's exactly in relation to the avalanche that it is critical...

If a slammed order closes in a wrong place, 10 or 20 points up or down. What will happen to the avalanche? The lots have closed (maybe), but the largest order that you rely on has probably remained in the red.
And this happens very often on the real market. Trust me. And better yet, try trading on the real market yourself to be sure.
And the higher the lot - the higher the probability of what I've described.
These things are known to everyone who trades with real money. And they always take these things into account when developing any strategy. But you probably don't know that.



I don't know what to do with it. I've been working for 2 weeks.