read parameters from common tab(Important)

 

Hi there

I want to read "only  long, only short, long & short" from Expert Advisors Properties\common tab and comment on the chart, but I don't know which function is doing this action. please guide me.

thanks 

 
Mohammad Reza Mohammadi:

Hi there

I want to read "only  long, only short, long & short" from Expert Advisors Properties\common tab and comment on the chart, but I don't know which function is doing this action. please guide me.

thanks 

You mean you want to trade only sell or buy position or sell buy position??
 
Mohammad Reza Mohammadi:

Hi there

I want to read "only  long, only short, long & short" from Expert Advisors Properties\common tab and comment on the chart, but I don't know which function is doing this action. please guide me.

thanks 

ENUM_SYMBOL_TRADE_MODE

Identifier

Description

SYMBOL_TRADE_MODE_DISABLED

Trade is disabled for the symbol

SYMBOL_TRADE_MODE_LONGONLY

Allowed only long positions

SYMBOL_TRADE_MODE_SHORTONLY

Allowed only short positions

SYMBOL_TRADE_MODE_CLOSEONLY

Allowed only position close operations

SYMBOL_TRADE_MODE_FULL

No trade restrictions

 

 
Khurram Mustafa:
You mean you want to trade only sell or buy position or sell buy position??
For example I selected only long from that path to take buy positions. I want to show my selection on the chart. for this action I must read it then comment it on the chart.
 
Mehmet Bastem:

ENUM_SYMBOL_TRADE_MODE

Identifier

Description

SYMBOL_TRADE_MODE_DISABLED

Trade is disabled for the symbol

SYMBOL_TRADE_MODE_LONGONLY

Allowed only long positions

SYMBOL_TRADE_MODE_SHORTONLY

Allowed only short positions

SYMBOL_TRADE_MODE_CLOSEONLY

Allowed only position close operations

SYMBOL_TRADE_MODE_FULL

No trade restrictions

 

thank you but I know these parameters but I don't know how can read them from Common Tab. can you tell me which function can read that selection?
 
Comment(SymbolInfoInteger(Symbol(),SYMBOL_TRADE_MODE));
 
Mohammad Reza Mohammadi:
For example I selected only long from that path to take buy positions. I want to show my selection on the chart. for this action I must read it then comment it on the chart.

1- you can program as by bool function  

2- Comment() use when you are opening  buy

 
Marco vd Heijden:
thank you, but this code only returns "2". 
 

where it is the 

"common" tab?

 
@Migdal DRAGAN #: where it is the "common" tab?

The originally question was about MT4 and it referred to this ...