PokrovMT5: I wrote it, the result is the same, 10013, I removed stop and TP, it doesn't help. Return removed, compiler complains with value(res.retcode)
How do you make the scale on the chart some multiples and integers? I can't do without a calculator when I'm trying to calculate a pattern or place stops.
And how do you calculate cell differences, do you also keep a calculator nearby or is there a secret setting in MT5?
How to make the scale on a graph with some multiples and integers? My brain boils when I'm trying to visually calculate some kind of pattern or place stops, I can't do without a calculator.
And how do you calculate cell differences, do you also keep a calculator nearby or is there a secret setting in MT5?
There is no secret setting. There are only five possible solutions:
1.Do it yourself.
2.Search the kodobase from what's available.
3. order it from one of the traders.
Buy it on the Market.
5.Wait and hope for the μl to be made in the terminal.
The right situation on the market came and the Expert Advisor started buying and buying!!! At least I managed to react in time. Can you tell me what is wrong in the code? I thought it should buy only one lot and immediately set a Stop Loss and Take Profit. As soon as he bought something, the variable Bye_opened should become true and it should not allow him to make a subsequent trade until the stops are triggered. Also, how do I know the price of the last trade to put stops on it?
But it looks like I did something wrong. Please point out my mistake.
//--- Do we have positions opened already?bool Buy_opened=false; // variable to hold the result of Buy opened positionbool Sell_opened=false; // variables to hold the result of Sell opened positionif(PositionSelect(_Symbol)==true) // we have an opened position
{
if(PositionGetInteger(POSITION_TYPE)==POSITION_TYPE_BUY)
{
Buy_opened=true; //It is a Buy
}
elseif(PositionGetInteger(POSITION_TYPE)==POSITION_TYPE_SELL)
{
Sell_opened=true; // It is a Sell
}
}
//+------------------------------------------------------------------+//| СОВЕРШАЕМ СДЕЛКУ |//+------------------------------------------------------------------+if(last_tick.last < BBLow[2] && Buy_opened == false)
{
int znak = last_tick.last - BBLow[2];
//--- 1. Создать запросMqlTradeRequest Trade_reqst={0}; // Инициализация структуры торгового запроса
Trade_reqst.action=TRADE_ACTION_DEAL; // Тип: немедленное совершение сделки
Trade_reqst.symbol=_Symbol; // Инструмент: текущий
Trade_reqst.volume=Lot; // Объём: 1 лот
Trade_reqst.price=SymbolInfoDouble(_Symbol,SYMBOL_ASK)-TakeProfit*_Point; // Цена исполнения
Trade_reqst.type=ORDER_TYPE_BUY; // Тип ордера: на продажу
Trade_reqst.type_filling=ORDER_FILLING_RETURN; // Политика исполнения
Trade_reqst.sl=last_tick.last - StopLoss * _Point; // Stop Loss
Trade_reqst.tp=SymbolInfoDouble(_Symbol,SYMBOL_ASK) + TakeProfit * _Point; // Take Profit// Trade_reqst.tp=Trade_reqst.price + TakeProfit * 2 * _Point; // Take Profit//--- 2. Отправить торговый приказMqlTradeResult Trade_reslt={0}; // Инициализация структуры результата торгового запросаOrderSend(Trade_reqst,Trade_reslt); // Отправка торгового запроса на сервер//--- выведем в лог ответ сервера //Print(__FUNCTION__," - : - ",Trade_reslt.comment);if(Trade_reslt.retcode==10016) Print("Ответ: ",Trade_reslt.bid,Trade_reslt.ask,Trade_reslt.price);
In the strategy tester the command MarketInfo(Symbol(),MODE_TICKVALUE) = 0 ( !) This happens in situations when, for example, the instrument is EURUSD and the balance currency is RUR .... and in other combinations. My understanding is that the balance currency must be the same as the name of the second currency in the currency pair. Otherwise, it returns zero value (in the strategy tester), which makes it impossible to perform tests with the desired combinations. How to solve this problem?
for the purchase of
put this script in the scripts folder, open this script in a unitor, compile it
When the exchange opens, drag this script onto the chart
that's what it says, the last extremum
How do you make the scale on the chart some multiples and integers? I can't do without a calculator when I'm trying to calculate a pattern or place stops.
And how do you calculate cell differences, do you also keep a calculator nearby or is there a secret setting in MT5?
How to make the scale on a graph with some multiples and integers? My brain boils when I'm trying to visually calculate some kind of pattern or place stops, I can't do without a calculator.
And how do you calculate cell differences, do you also keep a calculator nearby or is there a secret setting in MT5?
There is no secret setting. There are only five possible solutions:
1.Do it yourself.
2.Search the kodobase from what's available.
3. order it from one of the traders.
Buy it on the Market.
5.Wait and hope for the μl to be made in the terminal.
Cheers! Today I launched my first EA in MT5!
The right situation on the market came and the Expert Advisor started buying and buying!!! At least I managed to react in time. Can you tell me what is wrong in the code? I thought it should buy only one lot and immediately set a Stop Loss and Take Profit. As soon as he bought something, the variable Bye_opened should become true and it should not allow him to make a subsequent trade until the stops are triggered. Also, how do I know the price of the last trade to put stops on it?
But it looks like I did something wrong. Please point out my mistake.
MT4 737 is up for review.
What's the history on MetaQuotes-Demo and how long ago?
D1 is almost like in the good old days, from May 72, but weeks from 95, months from 93, hours in general from 12.