
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Does anyone use OnTradeTransaction, to determine if an order has been placed?
In the strategy tester, when one trade and 2 orders are sent within 3 ticks, TRADE_TRANSACTION_REQUEST only comes 1, on the last order sent.
Are you looking at tester's logs or agent's logs? Can you write to Service Desk and provide details?
I looked at the logs in agent, and there too big a piece of log should be printed. I've just sketched an approximate code, I'm too lazy to deal with Service Desk. I ran it on RoboForex since 2011.10.10 where one of three TRADE_TRANSACTION_REQUEST appears, and on Metakvot two of three. Apparently it depends on how often the ticks appear.
2012.08.22 09:43:15 Terminal SIGTrader 5 x64 build 687 started
I looked at the logs in agent, and there too big a piece of log should be printed. I've just sketched an approximate code, I'm too lazy to deal with servicedesk. I ran it on RoboForex since 2011.10.10 where one of three TRADE_TRANSACTION_REQUEST appears, and two of three appear on Metakvot. Apparently, it depends on frequency of ticks.
2012.08.22 09:43:15 Terminal SIGTrader 5 x64 build 687 started
In idea,OnTradeTransaction doesn't depend on ticks at all - it is the trade event handler.
And it handles its own turn, the queue of trade events.
OnTradeTransaction is supposedly not at all tick-dependent, it is a trade event handler.
And it processes its turn, a queue of trade events.
In this example, it depends on the ticks to set orders, on each tick a new order is set.
I wonder if lack of TRADE_TRANSACTION_REQUEST has been repeated by the developers, or we can't do it without Service Desk?
In this example, the speed of order placement depends on the ticks, a new order is placed on every tick.
I wonder if lack of TRADE_TRANSACTION_REQUEST was repeated by developers, or can't do it without Service Desk?
Probably can't do without SD, the function is new and bugs are possible. Need to look into it in detail.
SZY I'm whipping up an article on how to use this function, but I have not encountered such a situation.
ZZZY I only tested it on Alpari and MQ servers,
If you give me the correct server name, I will try to check it.
Probably not without a CD, the function is new and there may be bugs. I need to look into it in detail.
I am making an article on the use of this function, but this situation has never occurred to me.
ZZZY I checked only on Alpari and MQ servers,
Please give me the correct server name, I will try to check it.
RoboForex-MetaTrader 5
MetaQuotes-Demo
EURUSD is the currency, but it is mentioned in the logs above.
I have attached a file with the date 10.10.10. I have checked it again and it shows only 1 last TRADE_TRANSACTION_REQUES on RoboForex.
RoboForex-MetaTrader 5
MetaQuotes-Demo
EURUSD is the currency, but it is mentioned in the logs above.
The file attached above shows a start on the 10th of the month, hence the beginning of the test was 2011.10.10. I checked it once again, only 1 last TRADE_TRANSACTION_REQUES is consistently received by RoboForex.
The bug is not reproducing.
Both on MQ and RoboForex, in realtime and in the tester all TRADE_TRANSACTION_REQUEST are coming normally.
The system is x86, I can't check on x64 at the moment.
By comparing the 2 logs, we can see that if OnTradeTransaction has not been processed before a new order is placed, TRADE_TRANSACTION_REQUEST is dropped.
Here is 1 of 3
GM 0 Trade 03:35:28 2011.10.10 02:00:00 instant sell 1.00 EURUSD at 1.3385 (1.3385 / 1.3387 / 1.3385)
OL 0 Trades 03:35:28 2011.10.10 02:00:00 deal #2 sell 1.00 EURUSD at 1.3385 done (based on order #2)
JQ 0 Trade 03:35:28 2011.10.10 02:00:00 deal performed [#2 sell 1.00 EURUSD at 1.3385]
RJ 0 Trade 03:35:28 2011.10.10 02:00:00 order performed sell 1.00 at 1.3385 [#2 sell 1.00 EURUSD at 1.3385] <== 1
MH 0 test5 (EURUSD,M30) 03:35:28 2011.10.10 02:00:00 TRADE_ACTION_DEAL Установлен 1 ордер
HE 0 Trade 03:35:28 2011.10.10 02:00:00 buy limit 1.50 EURUSD at 1.3234 (1.3384 / 1.3386 / 1.3384) <== 2
MP 0 test5 (EURUSD,M30) 03:35:28 2011.10.10 02:00:00 TRADE_ACTION_PENDING Установлен 2 ордер
QN 0 Trade 03:35:28 2011.10.10 02:00:00 buy limit 1.50 EURUSD at 1.3285 (1.3385 / 1.3387 / 1.3385) <== 3
MM 0 test5 (EURUSD,M30) 03:35:28 2011.10.10 02:00:00 TRADE_ACTION_PENDING Установлен 2 ордер
HI 0 test5 (EURUSD,M30) 03:35:28 2011.10.10 02:00:00 ///////////////////// trans.type==6----- n=0
GE 0 test5 (EURUSD,M30) 03:35:28 2011.10.10 02:00:00 ****************************************************************************
GD 0 test5 (EURUSD,M30) 03:35:28 2011.10.10 02:00:00 ///////////////////// trans.type==2----- n=1
CF 0 test5 (EURUSD,M30) 03:35:28 2011.10.10 02:00:00 ****************************************************************************
MF 0 test5 (EURUSD,M30) 03:35:28 2011.10.10 02:00:00 ///////////////////// trans.type==3----- n=2
OS 0 test5 (EURUSD,M30) 03:35:28 2011.10.10 02:00:00 ****************************************************************************
OQ 0 test5 (EURUSD,M30) 03:35:28 2011.10.10 02:00:00 ///////////////////// trans.type==0----- n=3
KL 0 test5 (EURUSD,M30) 03:35:28 2011.10.10 02:00:00 ****************************************************************************
JL 0 test5 (EURUSD,M30) 03:35:28 2011.10.10 02:00:00 ///////////////////// trans.type==0----- n=4
GN 0 test5 (EURUSD,M30) 03:35:28 2011.10.10 02:00:00 ****************************************************************************
EO 0 test5 (EURUSD,M30) 03:35:28 2011.10.10 02:00:00 ///////////////////// trans.type==0----- n=5
CK 0 test5 (EURUSD,M30) 03:35:28 2011.10.10 02:00:00 ****************************************************************************
PI 0 test5 (EURUSD,M30) 03:35:28 2011.10.10 02:00:00 ///////////////////// trans.type==0----- n=6
OD 0 test5 (EURUSD,M30) 03:35:28 2011.10.10 02:00:00 ****************************************************************************
LG 0 test5 (EURUSD,M30) 03:35:28 2011.10.10 02:00:00 ///////////////////// trans.type==10----- n=7
OJ 0 test5 (EURUSD,M30) 03:35:28 2011.10.10 02:00:00 EnumToString(type)=TRADE_TRANSACTION_REQUEST
QN 0 test5 (EURUSD,M30) 03:35:28 2011.10.10 02:00:00 ------------trans===
TRADE_TRANSACTION_REQUEST
here 2 of 3
CL 0 Trade 03:36:07 2011.10.10 02:00:00 instant sell 1.00 EURUSD at 1.33989 (1.33989 / 1.34003 / 1.33989)
NP 0 Trades 03:36:07 2011.10.10 02:00:00 deal #2 sell 1.00 EURUSD at 1.33989 done (based on order #2)
QR 0 Trade 03:36:07 2011.10.10 02:00:00 deal performed [#2 sell 1.00 EURUSD at 1.33989]
DJ 0 Trade 03:36:07 2011.10.10 02:00:00 order performed sell 1.00 at 1.33989 [#2 sell 1.00 EURUSD at 1.33989] <== 1
RK 0 test5 (EURUSD,H1) 03:36:07 2011.10.10 02:00:00 TRADE_ACTION_DEAL 1 order executed
QE 0 Trade 03:36:07 2011.10.10 02:00:00 buy limit 1.50 EURUSD at 1.32490 (1.33990 / 1.34004 / 1.33990) <== 2
LS 0 test5 (EURUSD,H1) 03:36:07 2011.10.10 02:00:00 TRADE_ACTION_PENDING 2nd order set
GP 0 test5 (EURUSD,H1) 03:36:07 2011.10.10 02:00:00 ///////////////////// trans.type==6----- n=0
JM 0 test5 (EURUSD,H1) 03:36:07 2011.10.10 02:00:00 ****************************************************************************
DM 0 test5 (EURUSD,H1) 03:36:07 2011.10.10 02:00:00 ///////////////////// trans.type==2----- n=1
JH 0 test5 (EURUSD,H1) 03:36:07 2011.10.10 02:00:00 ****************************************************************************
FJ 0 test5 (EURUSD,H1) 03:36:07 2011.10.10 02:00:00 ///////////////////// trans.type==3----- n=2
JG 0 test5 (EURUSD,H1) 03:36:07 2011.10.10 02:00:00 ****************************************************************************
DG 0 test5 (EURUSD,H1) 03:36:07 2011.10.10 02:00:00 ///////////////////// trans.type==0----- n=3
JR 0 test5 (EURUSD,H1) 03:36:07 2011.10.10 02:00:00 ****************************************************************************
ID 0 test5 (EURUSD,H1) 03:36:07 2011.10.10 02:00:00 ///////////////////// trans.type==0----- n=4
JQ 0 test5 (EURUSD,H1) 03:36:07 2011.10.10 02:00:00 ****************************************************************************
IR 0 test5 (EURUSD,H1) 03:36:07 2011.10.10 02:00:00 ///////////////////// trans.type==10----- n=5
RP 0 test5 (EURUSD,H1) 03:36:07 2011.10.10 02:00:00 EnumToString(type)=TRADE_TRANSACTION_REQUEST
RG 0 test5 (EURUSD,H1) 03:36:07 2011.10.10 02:00:00 ------------trans===
TRADE_TRANSACTION_REQUEST
...
FD 0 test5 (EURUSD,H1) 03:36:07 2011.10.10 02:00:00 ****************************************************************************
OG 0 trade 03:36:07 2011.10.10 02:00:01 buy limit 1.50 EURUSD at 1.32992 (1.33992 / 1.34006 / 1.33992) <== 3
QQ 0 test5 (EURUSD,H1) 03:36:07 2011.10.10 02:00:01 TRADE_ACTION_PENDING 2nd order set
RQ 0 test5 (EURUSD,H1) 03:36:07 2011.10.10 02:00:01 ///////////////////// trans.type==0----- n=6
OO 0 test5 (EURUSD,H1) 03:36:07 2011.10.10 02:00:01 ****************************************************************************
RM 0 test5 (EURUSD,H1) 03:36:07 2011.10.10 02:00:01 ///////////////////// trans.type==10----- n=7
CF 0 test5 (EURUSD,H1) 03:36:07 2011.10.10 02:00:01 EnumToString(type)=TRADE_TRANSACTION_REQUEST
CJ 0 test5 (EURUSD,H1) 03:36:07 2011.10.10 02:00:01 ------------trans===
TRADE_TRANSACTION_REQUEST
...
The bug is not working.
Both on MQ and RoboForex, in realtime and in the tester all TRADE_TRANSACTION_REQUEST come normally.
The system is x86, I can't check it on x64 at the moment.
Tried it on an old laptop, it worked sequentially: setting orders - response - setting orders - response - setting orders - response
I think it should work if we send 2 orders during 1 tick.OnTradeTransaction will not work in time then.
I tweaked the file a bit.
Good afternoon.
I have created a unit to count beats on envelopes lines, it seems to count everything correctly, but the log is missing some entries - for example the log has count[Number] =3 and the next count[Number] =5. I can see that the counting is correct but the log is missing for some reasoncount [Number] =4. Sometimes the log has all the entries. I don't understand why it happens. If you see errors in the code, may you correct the code?
Also, sometimes running tester throws error " OnTick critical error " but on next start it starts testing. What could be the problem?