Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1069

 
Roman Sharanov:

The brackets are missing, how about this?

X = (sum(Li*(Ask+Pip))-sum(Pi*Li))/(2Ask+Pip)

I guess so. He has a double-decker fraction and what is highlighted under the fraction line.

 
Roman Sharanov:

The brackets are missing, how about this?

X = (sum(Li*(Ask+Pip))-sum(Pi*Li))/(2Ask+Pip)

With the first rollover a swap will be charged and the formula will show the temperature in the basement of a 3-storey house.

In calculation = money -> lot -> cost_item

BuyBreakeven  = bid-(_GetP.Buy._AllProfit,2)/( TickValue*_GetP.Buy._Lots )*poi;
SellBreakeven = ask+(_GetP.Sell._AllProfit,2)/(TickValue*_GetP.Sell._Lots)*poi;
 
Vitaly Muzichenko:

With the first rollover a swap will be charged and the formula will show the temperature in the basement of a 3-storey building.

In the calculation = money -> lot -> cost_item

Well I didn't take swaps into account.

I don't quite understand what "In calculation = money -> lot -> cost_item" means.

 
Roman Sharanov:

Well I didn't take swaps into account.

I don't quite understand what "In calculation= money -> lot -> cost_item" means.

Showed the working code

 
Vitaly Muzichenko:

Showed the working code

what is poi?

 
Roman Sharanov:

what is poi?

 double TickValue=SymbolInfoDouble(mSymbol,SYMBOL_TRADE_TICK_VALUE);
 if(TickValue==0) {
   Print("TickValue: ", mSymbol," = ",TickValue); 
   return;
 }
 double ask=SymbolInfoDouble(mSymbol,SYMBOL_ASK);
 double bid=SymbolInfoDouble(mSymbol,SYMBOL_BID);
 double poi=SymbolInfoDouble(mSymbol,SYMBOL_POINT);
 
Vitaly Muzichenko:

Got it, thanks.

 
Alexey Viktorov:

It probably does. It has a double-decker fraction, and what is highlighted under the fraction line.

didn't give the right result....

I wonder why my formula doesn't work, isn't it logical?

 
Igor Makanu:

OK a requote is a requote..., how do I detect requotes in MT5?

Error 4756 : Failed to send trade request

Not good, what is the best way to detect a requote? I don't want to send 10 requests to the server if I get 4756, MT4 usually try to avoid requotes, but MT5 is cooler ;)


i read the search results on the forum, but as far as i understood there is no more efficient way to deal with requotes than sending a couple dozens of trade requests to the server.

https://www.mql5.com/ru/forum/1744/page2#comment_14948


I used to use the class
CTrade m_trade;
and the function
m_trade.Buy.
I used to get these annoying requotes, especially in multicurrency, even on demo server, despite all sorts of dancing with RefreshRates, slippage, the problem did not disappear.

Then I have moved to the
CTrade trade class;
and function
trade.PositionOpen.
I have not seen any requotes anymore. Maybe it can help you too

https://www.mql5.com/ru/code/16350

Мультивалютный ночной скальпер Night Scalper Multi
Мультивалютный ночной скальпер Night Scalper Multi
  • www.mql5.com
Просмотров: 4990 Рейтинг: Опубликован: 2016.09.16 17:24 Обновлен: 2016.11.22 07:32 Мультивалютный ночной скальпер Night Scalper Multi торгует до 12 ночи в узком диапазоне (r), определяемому по индикатору Bollinger Bands. Позиция открывается после часа, указанного в переменной Start, и когда нет открытых по символу позиций. Покупаем, если...
 
erotin:


I used to use class
CTrade m_trade;
and function
m_trade.Buy
.

Then I moved to
CTrade trade class;
and the function
trade.PositionOpen
I haven't seen requotes anymore. Maybe it can help you

https://www.mql5.com/ru/code/16350

Ok, thanks, I will try it

PS: I made some tests, the "requote" error appears differently if I use MT4Orders.mqh library or SB CTrade

Reason: