Download MetaTrader 5
To add comments, please log in or register
Register as a seller and start making profit!
johhny6
130
johhny6 2012.02.11 07:41 

After submitting a buy-limit, or sell-limit order, the documentation suggests you can check the number of open buy/sell orders (including limit orders).

However using either the below approaches.

SymbolInfoInteger(_Symbol,SYMBOL_SESSION_SELL_ORDERS)

CSymbolInfo symbol; symbol.SessionSellOrders();


For example, to only have 1 open SellLimit order....

if (o_symbol.SessionSellOrders()>=1)) print "sell order open already";

if (SymbolInfoInteger(_Symbol,SYMBOL_SESSION_SELL_ORDERS)>=1) print "sell order open already";


After submitting a not yet dealt (but submitted) trade such as:

trade.SellLimit(1,price,_Symbol,SL,TP,ORDER_TIME_SPECIFIED,(TimeCurrent()+14400,"no-comment");
            

Likewise with Buy orders..
Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Order Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Trade Constants / Order Properties - Documentation on MQL5
johhny6
130
johhny6 2012.03.02 07:28  

I've confirmed this doesn't appear to work properly.

This does seem to be new functionality, any advice on this?


I had assumed that SymbolInfoInteger(SYMBOL_SESSION_BUY_ORDERS) would tell you how many buy orders you have open, but it does not do this.


see: https://www.mql5.com/en/docs/constants/environment_state/MarketInfoConstants

Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Symbol Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Environment State / Symbol Properties - Documentation on MQL5
/
To add comments, please log in or register