Indicators: Positions Info Panel

 

Positions Info Panel:

Indicator in the form of a panel. Displays the resulting direction of the position: resulting lot size and up or down arrow.

AUDUSD

Author: Vladimir Karputov

 

opening time, which finally formed the net position direction (PositionGetInteger(POSITION_TYPE)).

In this case TP and SL will correspond to the last position by opening time, which coincides with the net position direction.

  const double total_volume = PositionSelect(Symbol()) ? ((PositionGetInteger(POSITION_TYPE) == POSITION_TYPE_BUY) ?
                                                          +PositionGetDouble(POSITION_VOLUME) :
                                                          -PositionGetDouble(POSITION_VOLUME)) : 0;
 
Automated-Trading:

Positions Info Panel:

Author: Vladimir Karputov

It would be even better if you could attach CloseALL button to close all these positions...
 
Сергей Криушин:
It would be even better if you could attach a CloseALL button to close all these positions....

Actually, it is an indicator. So it cannot close/open/modify positions by definition. If you need to close/open/modify positions, it is best to do it with a script. That is, the indicator visually track the net position, and in case of need to throw a script on the chart of the desired symbol and it will close all positions on this symbol.

Added:

some crooked logic of work comes out - the script should be thrown on the chart of the necessary symbol :(.

 
Hello again,

I was wondering how to activate this indicator.

After I found it in my CodeBase in Metatrader5, I use Download and then i try to add it with the Insert menu, but I cannot find it there?

Can you please help me! 
Thanks in advance

Kliment
 
Kliment Kalchev :
Hello again,

I was wondering how to activate this indicator.

After I found it in my CodeBase in Metatrader5, I use Download and then i try to add it with the Insert menu, but I cannot find it there?

Can you please help me! 
Thanks in advance

Kliment

Indicator Positions_Info_Panel.mq5 and the included file Positions_Info_Panel_Dialog.mqh MUST be placed in ONE folder.

This can be seen in the description:


 
Yes when I download them they go there automatically :


How I access the indicator after this....
 
Kliment Kalchev :
Yes when I download them they go there automatically :


How I access the indicator after this....

Now double-click on the indicator - it opens in the MetaEditor editor. It remains to compile it in the MetaEditor editor (F7 key).

 
Vladimir Karputov:

Now double-click on the indicator - it opens in the MetaEditor editor. It remains to compile it in the MetaEditor editor (F7 key).

Ok I've done it.  one of them gives me 6 errors : 



And the file is in this folder exactly - from the first error (can't open :C:\path)
 
Kliment Kalchev :
Ok I've done it.  one of them gives me 6 errors : 

I do not see the error (this is the first column). I can not read.

 
I've managed to make it... its just that it searches for this : Positions Info Panel Dialog ... and the actual file there is like this Positions_Info_Panel_Dialog
Once you delete the "_" and leave it open it compiles perfect and runs smoothly. Thank you so much!