Дубль 2. Проблема с отложенными на билде от 17 ноября.

 
Спасибо за билд от 17 ноября. Гораздо лучше. Но вот:
Не открылся отложенный.
Вот ЛОГ.
17:16 V3.3.2: СРЕЗ. Margin=182800 FreeMargin=151311.68 Balance=418937.44 Equity=334111.68
17:17 V3.3.2: Ticket=404 OrderType=5 OrderOpenPrice=0.7587 OrderTakeProfit=0.7572 Lots=2
17:17 V3.3.2: Ticket=403 OrderType=3 OrderOpenPrice=0.7625 OrderTakeProfit=0.761 Lots=2
17:17 V3.3.2: Ticket=402 OrderType=2 OrderOpenPrice=0.7591 OrderTakeProfit=0.7606 Lots=3.8
17:17 V3.3.2: Ticket=401 OrderType=4 OrderOpenPrice=0.7629 OrderTakeProfit=0.7644 Lots=2
17:17 V3.3.2: Ticket=400 OrderType=1 OrderOpenPrice=0.7606 OrderTakeProfit=0.7591 Lots=2
17:17 V3.3.2: Ticket=398 OrderType=0 OrderOpenPrice=0.761 OrderTakeProfit=0.7625 Lots=2
17:17 V3.3.2: Ticket=393 OrderType=0 OrderOpenPrice=0.7629 OrderTakeProfit=0.7625 Lots=2
17:17 V3.3.2: Buy=2 Sell=1 BuyStopCnt==1 BuyLimitCnt==1 SellStopCnt==1 SellLimitCnt==1 Bid=0.7624
17:17 V3.3.2: Step=2
17:17 V3.3.2: СРЕЗ. Margin=182800 FreeMargin=151371.67 Balance=418937.44 Equity=334171.67
17:17 Tester: take profit #393 at 0.7625 (0.7625 / 0.7629)
17:17 Tester: take profit #398 at 0.7625 (0.7625 / 0.7629)
17:17 Tester: order #403, sell 2.00 AUDUSD is opened at 0.7625
17:17 V3.3.2: Ticket=404 OrderType=5 OrderOpenPrice=0.7587 OrderTakeProfit=0.7572 Lots=2
17:17 V3.3.2: Ticket=403 OrderType=1 OrderOpenPrice=0.7625 OrderTakeProfit=0.761 Lots=2
17:17 V3.3.2: Ticket=402 OrderType=2 OrderOpenPrice=0.7591 OrderTakeProfit=0.7606 Lots=3.8
17:17 V3.3.2: Ticket=401 OrderType=4 OrderOpenPrice=0.7629 OrderTakeProfit=0.7644 Lots=2
17:17 V3.3.2: Ticket=400 OrderType=1 OrderOpenPrice=0.7606 OrderTakeProfit=0.7591 Lots=2
17:17 V3.3.2: Buy=0 Sell=2 BuyStopCnt==1 BuyLimitCnt==1 SellStopCnt==1 SellLimitCnt==0 Bid=0.7625
17:17 V3.3.2: Step=2

#401 ордер не открылся.
 
является ли цена 0.7629 в ордере 401 расчётной? является ли цена нормализованной?
 
является ли цена 0.7629 в ордере 401 расчётной? является ли цена нормализованной?

Вот функция, которая рассчитывает цену:

//+------------------------------------------------------------------+
//+ Функция рассчитывает цены открытия и ТП для отложенных ордеров. +
//+------------------------------------------------------------------+
double CalcAllPrice(double SellPrice) {

SellWorkPrice = NormalizeDouble(SellPrice,Digits);
BuyWorkPrice = NormalizeDouble(SellWorkPrice+Spred,Digits);
BuyStopPrice = NormalizeDouble(BuyWorkPrice+Grid*Point,Digits);
SellLimitPrice = NormalizeDouble(SellWorkPrice+Grid*Point,Digits);
BuyLimitPrice = NormalizeDouble(BuyWorkPrice-Grid*Point,Digits);
SellStopPrice = NormalizeDouble(SellWorkPrice-Grid*Point,Digits);
BuyStopProfit = NormalizeDouble(BuyStopPrice-Spred+Grid*Point,Digits);
SellLimitProfit = NormalizeDouble(SellLimitPrice+Spred-Grid*Point,Digits);
BuyLimitProfit = NormalizeDouble(BuyLimitPrice-Spred+Grid*Point,Digits);
SellStopProfit = NormalizeDouble(SellStopPrice+Spred-Grid*Point,Digits);
}
 
а спред не меньше 4-х?
Вы бы кроме бида аск тоже распечатывали бы
 
а спред не меньше 4-х?
Вы бы кроме бида аск тоже распечатывали бы


Grid - это параметр :
extern int Grid = 19; // Размер сетки.

Так я спред получаю:
//+++++++++++++++++++++++++++++++++++++++++++
// Считаем спред, определяем текущий шаг... +
//+++++++++++++++++++++++++++++++++++++++++++
bool SetFlags(){

Spred = MarketInfo(Symbol(), MODE_SPREAD);
if (Digits == 4) {Spred = Spred / 10000;}
else if (Digits == 2) {Spred = Spred / 100;}
AP = AllPresent();
if (BuyCnt > SellCnt) {Step = BuyCnt;} else {Step = SellCnt;}
Print ("Step=",Step);
Print ("СРЕЗ. Margin=",AccountMargin()," FreeMargin=",AccountFreeMargin()," Balance=",AccountBalance()," Equity=",AccountEquity());
}
Причина обращения: