What should be added for additional support of universal mathematical calculations in MQL5 and MQL5 Cloud Network? - page 6
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
Here's the thing, Renat.
MT5 clearly understands when a stop loss is activated and when a take profit is activated. // This can be seen from order comments and is clear from the platform handling itself.
This is why we have the request (constantly). - We would like the appropriate flag to appear in OnTradeTransaction when activating an SL or TP.
But if this is impossible (even theoretically) due to lack of proper binding architecture, we'd better just say that the platform architecture does not allow us to put a flag in the order being sent to this action to confirm whether it was a SL or TP.
Although for you there is no such word as "nothing is impossible". You are metaquotes :)
In other words, looking at the transaction structure https://www.mql5.com/ru/docs/constants/structures/mqltradetransaction
I would add a TRADE_ACTION field
the reasons for placing the order, respectivelySL triggered
TP triggered
Exit a position by Stop Out
and others, if there are any // though this may be all we need
There is a point here, Renat.
MT5 clearly understands when Stop Loss is activated and when Take Profit is activated. // This can be seen in the order comments and is clear from the platform itself.
That's the thing: he doesn't understand and shouldn't understand.
Everything goes through execution queues, orders are split into simple BUY/SELL, with gateways to liquidity providers and exchanges. There is no telling how it will be executed (including partial) in reality. And if we suddenly proclaim that we guarantee stop flags, papaklass will tomorrow accuse us in righteous anger that "it didn't work for me!".
That's the thing: in reality it doesn't and shouldn't.
Everything runs in queues of execution, the orders are split into simple BUY/SELL, and through the gateways to liquidity providers and exchanges.
Yes, it is splitting.
But this splitting action requires quite a specific action - to activate Stop Loss/StackProfit. And these actions are processed by MT's server , not by the client terminal.
Even if the activation of stops does not take place in MT, the result is still the creation of a real order or event for MT5.
I realise that I can't get into the bowels of the MT5 server, but you just make sure once again. Is it possible to notify about the action, on the basis of which the order is placed.
Once the server (or gateway) activates a stoploop/stackprofit/stopout, etc., the response is to place an order anyway. // Nothing happens without an order!
And here, on this order and put the appropriate flag - the reason for placing this order or event.
Maybe a new structure should have been introduced, just for TradeTransaction?
It's not that new :) it's very complete.
There are only two fields missing
- position identifier
- reason for placing an order
Yes, it splits.
But the action for this splitting is quite specific - to activate stoploop/stackprofit. And this action is processed by MT server , not by client terminal.
The answer is simple - there is no guarantee of 100% flagging.
Because there are many sources and initiators of triggering, and it is not the only trading server.
The answer is simple - there is no guarantee of 100% flagging.
For there are so many sources and triggers, and this is by no means the only trade server.
Is the activation of a stop loss really handled by several trade servers?
It seemed to me that only one trading server is sufficient for this purpose.
Or in MT there may be trades without an order if the stop loss is handled by the gateway?For the activation, an order is created and the platform is notified of its creation. // by an external gateway
then it is poured. and the trades appear.
It is understandable that the order may not be filled, and the remainder will be withdrawn.
But at the moment of this order creation we can add to the transaction a flag saying that it is a stop loss order.
The most important thing is the event itself that this is an order for a stop loss.
But you know better, I won't argue. it's a very subtle point.
papaklass:
And who's doing all the talking?
Definitely you.
You're trying to troll. What's the point?
Behave yourself.
We, for our part, are thinking about independent communication between agents without a terminal. For example, one of the agents can generate initial data and send it to the others by fordcast.
Without the involvement of the terminal, this is good.
Who will generate the data for this "one of the agents"? Will a script or an indicator be able to do it?
What is the communication between agents for, enlighten the unsophisticated if you can.
Already wrote a script to test the mathematical calculations capabilities, but some functions are missing)