Check if no open trades

 

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?
 
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) ...
 
amir_avatar:
Iif(PositionsTotal()==0) ...
Thank you.
Reason: