Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1271
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
Never used it, but I think we should check transaction type TRADE_TRANSACTION_ORDER_UPDATE
It is obvious. What should I check next?
This is obvious. What should I check next?
action in MqlTradeRequest?
TRADE_ACTION_MODIFY
action in MqlTradeRequest?
TRADE_ACTION_MODIFY
no, it does not
trans.order_state==ORDER_STATE_REQUEST_MODIFY
that doesn't work eitherthat doesn't work either.
Dude, kudos and respect to you! You're trying something. Most people ask and then only whine that it was not explained to them. )))
This is obvious. What's next to check?
Obviously, compare the price "yesterday" and "today". Roughly speaking, what it was and what it is now. If it has changed, then that's what it is.
Obviously, compare the price "yesterday" and "today". Roughly speaking, what it was and what it is now. If it's changed, then that's what it is.
So, should I store yesterday's price somewhere? I can't get it in OnTradeTransaction, can I?
So I have to store yesterday's price somewhere? I can't get it in OnTradeTransaction, can I?
Only when placing an order. Transaction type TRADE_TRANSACTION_ORDER_ADD
And then it has to be stored until it is changed.
You to
Only when an order is placed. Transaction type TRADE_TRANSACTION_ORDER_ADD
And then it has to be stored until changed.
How do you even imagine this? I store all orders and their open prices in some kind of array or list. Every time I update(TRADE_TRANSACTION_ORDER_UPDATE) I have to run through the list to find the order with the needed ticket? Isn't there an elegant solution?
Are you to...
How do you even conceive of this? I store all orders and their open prices in some array or list. Every time I update it(TRADE_TRANSACTION_ORDER_UPDATE) I have to run through the list to find an order with the needed ticket? Isn't there some elegant solution?
It depends on the purpose of catching the update. How about to simply reload the array?