granit77: Mikhail Andreyevich, please don't point the finger at the youth. Otherwise they will make a festival out of it. Obscene posts by Sorento and Aleksander are removed. Warning to both of them.
objections regarding dynamically changing corridor are not accepted - the market is a dynamic process, so the corridor changes with the market dynamics
SZZY: I can't guarantee the accuracy of the formula (the figure is 10 bars and Ê=0.30), but the formula for the corridor change is kind of obvious
hmmm, you could add a couple more lines in the table... cumulative loss on orders..... number of outcomes from a series of 10000 bars and total loss :)
If the loss on open orders reaches a certain percentage of the deposit, then all trades will be closed and the Expert Advisor will stop trading ?
Here is a piece of code, as I have it implemented in the netting version of Avalanche. You need to add loss accounting on open orders, i.e. in a loop, counting the total loss on orders in the market...
externint MaxLoss = 90; // Максимально допустимая просадка в процентах от балансаint start() // -----------------------СТАРТ ЭКСПЕРТА---------------
{
// ------------------------------------------------Ищем наш ордер---------------------------------int orderType;
for (int orderIndex = (OrdersTotal() - 1); orderIndex >= 0; orderIndex--)
{
if (!OrderSelect(orderIndex, SELECT_BY_POS))
{
continue;
}
if ((OrderSymbol() != Symbol()) || (OrderMagicNumber() != MagicNumber))
{
continue;
}
orderType = OrderType();
if ((orderType != OP_BUY) && (orderType != OP_SELL))
{
continue;
}
ticket = OrderTicket( ); // Номер ордера
orderLots = OrderLots(); // Lots
orderProfit = OrderProfit() + OrderSwap(); // Profit
Price = OrderOpenPrice(); // Цена открытия рыночного ордера
SL = OrderStopLoss(); // Значение StopLoss ордера
TP = OrderTakeProfit(); // Значение TakeProfit ордераif (ticket>0) // Если позиция открылась
{
while(OrderSelect(ticket,SELECT_BY_TICKET)==false) // Если ордер выбран
{
Sleep(100);
}
double OpenPrice=OrderOpenPrice();
}
// Проверка на предельную просадкуdouble loss = - ((orderProfit * 100.0) / AccountBalance());
if (loss > MaxLoss)
{
Print ("MaxLoss");
CloseAllOrders(MagicNumber);
IsExpertFailed = true;
return (0);
}
}
}
Filter... :) because flips may occur up to 25 times on one pair, in flat... ... then take 26 currencies and virtually do an avalanche there - at the 20th time expose real trades :) - for example...
Mikhail Andreyevich, please don't point the finger at the youth. Otherwise they will make a festival out of it.
Obscene posts by Sorento and Aleksander are removed. Warning to both of them.
Where do you see me using foul language?
;)
Please forgive me generously! If there was...
A Russian man without foul language?
It is in genes.
You should try to fill in the table....
objections regarding dynamically changing corridor are not accepted - the market is a dynamic process, so the corridor changes with the market dynamics
SZZY: I can't guarantee the accuracy of the formula (the figure is 10 bars and Ê=0.30), but the formula for the corridor change is kind of obvious
Just a question ?
How do I write code to
If the loss on open orders reaches a certain percentage of the deposit, then all trades will be closed and the Expert Advisor will stop trading ?
hmmm ? what's my memory :) which word was Uncensored there ? (rhetorical question) ...
we ↓↓↓↓ no more :)
↓↓↓
Cortinko +5
;)
And the Dahl reference was appropriate
Just a question ?
How do I write code to
If the loss on open orders reaches a certain percentage of the deposit, then all trades will be closed and the Expert Advisor will stop trading ?
Here is a piece of code, as I have it implemented in the netting version of Avalanche. You need to add loss accounting on open orders, i.e. in a loop, counting the total loss on orders in the market...
Where do you see me using foul language?
;)
Please forgive me generously! If there was...
A Russian man without foul language?
It's in the genes.
Yeah... it's in the genes :) so the kids wonder how it is... ... It's in the genes, but there's no word.)
>People still can't settle down :)
I'm surprised :)
This issue seems to have become a perennial one....
Everyone is still arguing about whether it works or not...
Is it really not clear?
Some people have it working and some don't!!!!
6 flips adds up to 167 times the volume...
you have to have iron balls to do that,
Can you offer something better ? )