Errors, bugs, questions - page 1789

 
Vitalie Postolache:
This is the window where the tabs for trades, history, news, etc. are located. The English word is "Toolbox".
Thank you, I didn't know, I have done it. Now, I can't see the status of the last positions. It's a shame, is it really impossible to make the last line just not go down?
 
Yousufkhodja Sultonov:
Thanks, didn't know, implemented it. Now, I can't see the status of the latest items. Shame, can't I programmatically make it so that the last line just doesn't go down?

It is possible, exactly programmatically. Write an indicator that displays this line on all the charts, for example.

The developers could make this information duplicate in the status bar, or in the window title bar, but they're probably not interested in that.

 
What's wrong?
AccountInfoString(ACCOUNT_SERVER) = MetaQuotes-Demo

OrderSend(NULL,OP_BUYLIMIT,1,SymbolInfoDouble(Symbol(),SYMBOL_ASK)-100*_Point,100,0,0,My Order)
Request.action = TRADE_ACTION_PENDING (5)
Request.magic = 0
Request.order = 0
Request.symbol = Si-3.17
Request.volume = 1.0
Request.price = 59647.0
Request.stoplimit = 0.0
Request.sl = 0.0
Request.tp = 0.0
Request.deviation = 100
Request.type = ORDER_TYPE_BUY_LIMIT (2)
Request.type_filling = ORDER_FILLING_RETURN (2)
Request.type_time = ORDER_TIME_GTC (0)
Request.expiration = 1970.01.01 00:00:00

Request.comment = My Order
Request.position = 0
Request.position_by = 0
Result.retcode = 10022
Result.deal = 0
Result.order = 0
Result.volume = 0.0
Result.price = 0.0
Result.bid = 0.0
Result.ask = 0.0
Result.comment = Invalid expiration
Result.request_id = 0
Result.retcode_external = 0
 
fxsaber:
What is the error?
ORDER_TIME_GTC on the symbol is not supported
 
A100:
ORDER_TIME_GTC on the symbol is not supported
Thank you!
 

Serious bug, as it concerns trading itself.

FIBOGroup-MT5 Server, demo, base currency USD, Netting, build 1525.

First, a screenshot of "Orders, Deals".

A position was opened by 1 lot and closed (not reversed!) by 1.5 lots.

The fact that it is one position is confirmed by the screen "Positions".

I highlighted in red that there was also an error with swap calculation (position lived 1 second) and some huge loss.

The log looks like this

2017.02.09 08:39:14.285 Trades  '1013175': exchange buy 1.00 EURUSD at market
2017.02.09 08:39:15.352 Trades  '1013175': deal #1542796 buy 1.00 EURUSD at 1.06763 done (based on order #2246162)
2017.02.09 08:39:15.354 Trades  '1013175': order #2246162 buy 1.00 / 1.00 EURUSD at 1.06763 done in 1069.212 ms
2017.02.09 08:39:15.354 Trades  '1013175': failed modify #2156238 buy 1.50 EURUSD sl: 0.00000, tp: 0.00000 -> sl: 1.06990, tp: 1.07190 [Invalid stops]
2017.02.09 08:39:15.355 Trades  '1013175': exchange sell 1.50 EURUSD at market, close #2156238 buy 1.50 EURUSD 1.07090333
2017.02.09 08:39:16.421 Trades  '1013175': deal #1542797 sell 1.50 EURUSD at 1.06761 done (based on order #2246163)
2017.02.09 08:39:16.422 Trades  '1013175': order #2246163 sell 1.50 / 1.50 EURUSD at 1.06761 done in 1066.734 ms

PositionGetDouble(POSITION_VOLUME) returned 1.5 lots, instead of 1.0. Invalid stops error occurred, although SYMBOL_TRADE_STOPS_LEVEL == 0.

I should probably add that the position was closed with Request.position = PositionTicket. That is, this parameter was not zero.

All in all, a BASE that directly concerns money!

 

Forum on trading, automated trading systems and testing trading strategies

FORTS. Questions on execution

fxsaber, 2017.02.09 08:56

Do I understand correctly that in this case OrderSend returned true almost instantly, but 65 seconds observed(ENUM_ORDER_STATE)::OrderGetInteger(ORDER_STATE) == ORDER_STATE_STARTED?

By the way, why when I place a pending order via OrderSend, it returns true immediately when the order state is ORDER_STATE_STARTED, instead of waiting for ORDER_STATE_PLACED?

It's not asynchronous OrderSendAsync.

 
fxsaber:

By the way, why does it return true immediately when the order state becomes ORDER_STATE_STARTED instead of waiting for ORDER_STATE_PLACED when placing a pending order via OrderSend?

It's not asynchronous OrderSendAsync.

Probably because it is the result of successful execution of OrderSend and not the result of successful order setting?
 
Artyom Trishkin:
Probably because it is the result of a successful OrderSend and not the result of a successful order setting?
ORDER_STATE_STARTED is the result of a successful OrderCheck.
 
fxsaber:
ORDER_STATE_STARTED is the result of a successful OrderCheck.
And when an order is already placed, something is returned?