Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1139

 
Vlad Svetlov:

Hello, dear friends! I have a couple of humble questions for you)

1. How to output the volume of Buy, Sell and Buy+Sell positions in an Expert Advisor in an easier way?

For example: My Expert Advisor displays the amount of positions in Buy, Sell and Buy+Sell. I solved it with fighting) But I can't output volumes... For example: 3 buy positions opened by 0.1+0.3+0.5 lots = 0. 9 lots in total, 2 sell positions opened by 0.6+0.1 lots = 0.7 lots.

And all this in total: 0.9-0.7=0.2 lots. Buy=0.9 lot, Sell=0.7 lot, BuySell=0.2 lot...

So you can get volumes like this...

2. The Expert Advisor displays "profit" by positions. How to make the background change depending on the result? For example: Profit - background is blue, loss - red...

P.S. I am not a programmer, so do not push strongly)))) I do not have any info, I am not too much knowledge about it.) My EA is on MT5.

I want to know how to use it in trading, and I already know how to use it in real trading.

1. You can just take the absolute value of the volume difference

double summ = fabs(лоты_Buy - лоты_Sell);
Before calling the EditCreate function, check the profit value against zero, and depending on the result, set the appropriate colour.
 
Alexey Viktorov:

1. You can simply take the absolute value of the volume difference

2. Before calling EditCreate function, check profit value against zero and depending on result set appropriate colour.With background colour change ra

The background colour change is sorted out, done...

And with the volumes of positions - it's complicated, everything is complicated))) In order to sum up, you must first derive those lot_Buy and lot_Sell. If I knew how to do it...

In the big picture I understand everything, what to compare with what and what to add up. But the code - need help) Or poke the nose where it is told how to do it).

Is there a lot of fuss with the code to output the volumes?

 
Iurii Tokman:

Read the thread title: MQL5

Don't confuse young readers.

 
Vlad Svetlov:

Changing the background colour has been sorted out, I've done it...

But with the volume of positions - it's complicated, everything is complicated))) In order to sum up, you must first display those lot_Buy and lot_Sell. If I knew how to do it...

In the big picture I understand everything, what to compare with what and what to add up. But the code - need help) Or poke the nose where it is told how to do it).

To display the volumes, a lot of trouble with the code?

Well, here's almost all done.

Vlad Svetlov:

Hello Ladies! I have a couple of modest questions to you)

1. How to output the volumes of Buy, Sell, and Buy+Sell positions in an Expert Advisor in an easier way?

For example: My Expert Advisor displays the amount of positions in Buy, Sell and Buy+Sell. I solved it with fighting) But I can't output volumes... For example: 3 buy positions opened by 0.1+0.3+0.5 lots = 0. 9 lots in total, 2 sell positions opened by 0.6+0.1 lots = 0.7 lots.

And all this in total: 0.9-0.7=0.2 lots. Buy=0.9 lot, Sell=0.7 lot, BuySell=0.2 lot...

So you can get volumes like this...

2. The Expert Advisor displays "profit" by positions. How to make the background change depending on the result? For example: Profit - background is blue, loss - red...

P.S. I am not a programmer, so do not push strongly)))) I do not have any info, I am not too much knowledge about it.) My EA is on MT5.

I want to be able to use it as an Expert Advisor in the future.

Next to that, calculate the volumes of the positions too.

 
Vladimir Karputov:

Read the thread title: MQL5

Don't confuse young readers.

Just woke up, sorry....

 

That's it, my questions are resolved and closed... Thank you all

 

In the new build of MT5 there is this:

%

Who knows what it means?

 
Anzhela Sityaeva:

In the new build of MT5 there is this:


Who knows what it means?

AnnouncementNew version of the MetaTrader 5 platform build 2170: Visibility in MQL5, global update of the Strategy Tester and built-in hosting:

Terminal: The "Crosshair" tool now shows the distance between price levels not only in pips, but also in percent:


 
Vladimir Karputov:

AnnouncementNew version of the MetaTrader 5 platform build 2170: Visibility in MQL5, global update of the Strategy Tester and built-in hosting:

Terminal: The "Crosshair" tool now shows the distance between price levels not only in pips, but also in percent:


Where did you see pips there?

 
Vladimir Karputov:

AnnouncementNew version of the MetaTrader 5 platform build 2170: Visibility in MQL5, global update of the Strategy Tester and built-in hosting:

Terminal: The "Crosshair" tool now shows the distance between price levels not only in pips, but also in percent:


Great! In pips (points), I see, but in % of what is 100%?

Reason: