Download MetaTrader 5

Check if no open trades

To add comments, please log in or register
All activity of the MQL5.community members is displayed on a single page!
baldonius
16
baldonius 2014.05.31 17:43 

I want to edit my Expert Advisor to give a short message on the chart if there are no trades open currently.

I know it's something like:

if( Some condition ) Comment( "There aren't any trades open now." );

What condition do I need to put there?
Amir Yacoby
1195
Amir Yacoby 2014.05.31 18:47  
baldonius:

I want to edit my Expert Advisor to give a short message on the chart if there are no trades open currently.

I know it's something like:

if( Some condition ) Comment( "There aren't any trades open now." );

What condition do I need to put there?
Iif(PositionsTotal()==0) ...
baldonius
16
baldonius 2014.05.31 18:57  
amir_avatar:
Iif(PositionsTotal()==0) ...
Thank you.
To add comments, please log in or register