Все непросто, все совсем просто. При открытии короткой позиции Вы проверяете наличие денег для открытия длинной.
//+-----------------------------------------------------------------------------------------------+//| Функция открывает позицию Sell |//+-----------------------------------------------------------------------------------------------+void OpenSell(void)
{
double volume=CalculateVolume(ORDER_TYPE_SELL);
//volume=CheckVolumeValue(volume);//volume=NormalizeDouble(volume,DigitsLots());
volume=LotCheck(volume,symb);
if(!CheckMoneyForTrade(volume,ORDER_TYPE_BUY))
I have added to the code opening of order without conditions. (This violates the idea of trading, but does not affect the result, as they say, "to the delight of inspectors")
But still no trades. Something is wrong with validation...
Торговля осуществляется посредством отправки с помощью функции OrderSend() приказов на открытие позиций, а также приказов на установку, модификацию и удаление отложенных ордеров. Каждый торговый приказ содержит указание на тип запрашиваемой торговой операции. Торговые операции описаны в перечислении ENUM_TRADE_REQUEST_ACTIONS...
I have added to the code opening of order without conditions. (This violates the idea of trading, but does not affect the result, as they say, "to the delight of inspectors")
But still no trades. Something is wrong with validation...
please help me understand
everything works in the tester...
All telepaths are on holiday. And ordinary people without a code can't help.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
It says: huge log file. Doesn't fit on disk, so testing is interrupted. Use the translator.
I know how it is translated. My logs only outputs opening and closing. How is the testing done there?
The question is closed. Thank you.
EA Doesn't pass validation. no trade action.
I have added to the code opening of order without conditions. (This violates the idea of trading, but does not affect the result, as they say, "to the delight of inspectors")
But still no trades. Something is wrong with validation...
please help me understand
in the Strategy Tester it works...
MT4
EA Doesn't pass validation. no trade action.
I have added to the code opening of order without conditions. (This violates the idea of trading, but does not affect the result, as they say, "to the delight of inspectors")
But still no trades. Something is wrong with validation...
please help me understand
everything works in the tester...All telepaths are on holiday. And ordinary people without a code can't help.
All the telepaths are on holiday. And ordinary people without code can't give you any tips.
if(b == 0)
if(OrderSend(Symbol(), OP_BUY, BuyLot, Ask, iSlippage, 0, 0, "," iMagicNumber, 0, clrGreen) < 0)
Print("OrderSend error #", GetLastError();
if(b == 0)
if(OrderSend(Symbol(), OP_BUY, BuyLot, Ask, iSlippage, 0, 0, ", ", iMagicNumber, 0, clrGreen) < 0)
Print("OrderSend error #", GetLastError());
Bare code without a single check. For such things Market usually beats hands down (doesn't pass Validation).
Bare code without a single validation. For this kind of thing, Market usually slaps its hands down (does not pass Validation).
maybe there is a "correct" template with validation? everyone would add themselves and the question would go away
Is there a "correct" template with checks? Everyone would add one for themselves and the question would go away
And that's what they want to sell :) .