Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1053

 
Artyom Trishkin:
It's good that they made it this way. There is an access to all history of changes of any position. In Quaternary everything is in the order. And an order is only an execution order. In five, on the other hand, it is an order-deal-position.

I haven't read it all yet, I'm waiting to finish it, so I can either figure it out and use it or...

the library in the "LIBRARY FOR EASY AND EASY METATRADER PROGRAMME CONSTRUCTION" series

could give a solution to this question? - how to get number of pips on your last trade ?

 
Igor Makanu:

I haven't read it all yet, I'm waiting to finish it, so I can either figure it out and use it or...

the library in the "LIBRARY FOR EASY AND EASY METATRADER PROGRAMME CONSTRUCTION" series

could give a solution to this question? - how do i get the pips of my last trade ?

Yes, of course.
 
Artyom Trishkin:
Yes, of course.

that's great!

Thank you!

 
Igor Makanu:

I haven't read it all yet, I'm waiting to finish it, so I can either figure it out and use it or...

the library in the "LIBRARY FOR EASY AND EASY METATRADER PROGRAMME CONSTRUCTION" series

could give a solution to this question? - how to get number of pips on your last trade ?

There are no pips in a trade :)

A trade has these properties: price, volume, entry type, trade type.

In order to get pips, you need to find at least two trades in the history: one INPUT and one OUTPUT and only then you can get pips.

ENUM_DEAL_ENTRY-direction of trade - entry into the market, exit from the market or reversal

ENUM_DEAL_ENTRY

Identifier

Description

DEAL_ENTRY_IN

Entry into market

DEAL_ENTRY_INOUT

Market exit

 
Igor Makanu:

that's great!

Thank you!

Not just the last one. Anything at all.
And any property can be taken out of her. Everything that has happened to her during her lifetime.
 
Vladimir Karputov:

There are no points in a trade :)

A trade has the following properties: price, volume, entry type, trade type.

In order to get points, you must find at least two trades in the history: one Entry, the other Exit and only then you can get points.

ENUM_DEAL_ENTRY-direction of trade - entry into the market, exit from the market or reversal

ENUM_DEAL_ENTRY

Identifier

Description

DEAL_ENTRY_IN

Entry into market

DEAL_ENTRY_INOUT

Market exit

We are talking about a closed position. So the man said "deal" - no big deal. The context makes it clear what he's talking about.
 
Vladimir Karputov:

There are no points in the ACT :)

but they are needed for statistical calculations and for users' wishes!

How long have you been trading or communicating with users? I hope you've heard the TOR from a user? Here we go in, here we take 50 pips with the old ones, here we take a stop loss of 30 pips....

And then you draw a profit in pips for the day, the week....


here we come back to the same rake, about which we started talking for hours, the@fxsaber library is not good, but standard CTrade does not provide a ready-made service, here's a pencil and paint - just draw it yourself......

i don't know if it's enough - the topic is about re-inventing the wheel, i reiterate that MT4 takes 30 minutes to write, MT5 takes months to prepare, it's a very user-friendly platform

 
Igor Makanu:

*** Here we go in, here we take 50 pips old, here we take 30 pips stoploss.... ***

This is implemented by controlling the profitability of the POSITION while it is still in the market. While there is a POSITION, it has an opening price and current price. While the position is open it is possible to receive in one line both position profit in money and position profit in points, pips...


Igor Makanu:

*** and then also draw the profit in pips for the day, week.... ***

And this is done by simply querying the trading history from date1 to date 2 and adding up the profit in money for all trades.


So it's even very simple.

 
Vladimir Karputov:

This is done by simply sending a request to the trading history from date1 to date 2 and adding up the profit in money for all trades.

Remember, the question was specific: how to find out the profit of the last closed order of a trade order in pips.

 
Igor Makanu:

remember, the question was specific: how to find out the profit of the last closed order of a trade order in pips

https://www.mql5.com/en/forum/218100

Reason: