• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 3:47pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 3:47pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

EA search: delete pending orders, max 1 trade at a time 1 reply

Close all pending orders and open orders once they reach profit target 3 replies

script to "close open orders" and "open opposite orders" 3 replies

Is there a script that calculates max dd of open orders? 0 replies

Separating by time of day 1 reply

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
Tags: Separating Count of Max Pending Orders and Max Open Trades
Cancel

Separating Count of Max Pending Orders and Max Open Trades

  • Post #1
  • Quote
  • First Post: Aug 11, 2013 7:24am Aug 11, 2013 7:24am
  •  Pipologist
  • Joined May 2009 | Status: testing/trading/testing/trading... | 1,799 Posts
I use a routine to count max trades but it includes open positions plus pending orders.

Is there a way to separate each to have:

MaxPending = X

MaxOpen = X

Can MT4 code call each separately?

I've only seen count routines that include the count of both.
  • Post #2
  • Quote
  • Aug 11, 2013 7:27am Aug 11, 2013 7:27am
  •  RaptorUK
  • Joined Jan 2008 | Status: Member | 870 Posts
Quoting Pipologist
Disliked
I use a routine to count max trades but it includes open positions plus pending orders. Is there a way to separate each to have: MaxPending = X MaxOpen = X Can MT4 code call each separately? I've only seen count routines that include the count of both.
Ignored
Just check the OrderType() if it is OP_BUY or OP_SELL increment the Open trades count, if it is OP_BUYLIMIT, OP_BUYSTOP, OP_SELLLIMIT or OP_SELLSTOP increment the pending order count.
20 pips a day isn't too much to ask . . .
 
 
  • Post #3
  • Quote
  • Last Post: Aug 11, 2013 11:31am Aug 11, 2013 11:31am
  •  FerruFx
  • Joined May 2007 | Status: MT4/MT5 EAs/Indicators/Alerts coder | 6,423 Posts
if(OrderType()<=OP_SELL) count_trades++;
else count_pendings++;
MT4/MT5 EAs/Indicators/Alerts coder
 
 
  • Platform Tech
  • /
  • Separating Count of Max Pending Orders and Max Open Trades
  • Reply to Thread
0 traders viewing now
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2023