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

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

EA orders pending orders 8 replies

Change "Open Order TP(target)" if other pending order triggered 175 replies

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

Close other pending order when one is triggered 0 replies

Orders & Pending Orders Script 0 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 3
Attachments: EA that cancels non-triggered pending orders
Exit Attachments
Tags: EA that cancels non-triggered pending orders
Cancel

EA that cancels non-triggered pending orders

  • Post #1
  • Quote
  • First Post: Jun 7, 2012 9:26am Jun 7, 2012 9:26am
  •  dns_di
  • | Joined Jun 2011 | Status: Member | 97 Posts
Hi,

Can anyone help me code it? I have EA that put breakeven stop automaticly, I need a code to add to this EA that will remove non-triggered pending order (only remove) when 2 pending stop orders set and one is triggered another should be eliminated automaticly by this ea.

I find some EA on this forum OCO, it should have the needed code, can you help me to extract it, and modify my ordermodifysteper?

I hope to get some help from you guys!
Attached File(s)
File Type: mq4 OCO.mq4   6 KB | 273 downloads
File Type: mq4 OrderModifyStepper_V2.mq4   6 KB | 286 downloads
  • Post #2
  • Quote
  • Jun 7, 2012 6:06pm Jun 7, 2012 6:06pm
  •  K_Minos
  • | Joined Dec 2010 | Status: Member | 151 Posts
Quoting dns_di
Disliked
Hi,

Can anyone help me code it? I have EA that put breakeven stop automaticly, I need a code to add to this EA that will remove non-triggered pending order (only remove) when 2 pending stop orders set and one is triggered another should be eliminated automaticly by this ea.

I find some EA on this forum OCO, it should have the needed code, can you help me to extract it, and modify my ordermodifysteper?

I hope to get some help from you guys!
Ignored
Check this one, it is found here in FF I don't remember the thread anymore. It does break even and trailing stop
Attached File(s)
File Type: ex4 OCO_Justin_V1.1.ex4   8 KB | 305 downloads
 
 
  • Post #3
  • Quote
  • Edited Jun 8, 2012 12:03am Jun 7, 2012 10:27pm | Edited Jun 8, 2012 12:03am
  •  dns_di
  • | Joined Jun 2011 | Status: Member | 97 Posts
Quoting K_Minos
Disliked
Check this one, it is found here in FF I don't remember the thread anymore. It does break even and trailing stop
Ignored
Thanks bro, that is not really what I need, I need the one that can send pending order on the server not put it on your machine. I trade news, so I need as fast execution as I can get. Apart from putting pending orders on the server it really does what I need.

I know that OCO that I posted contains the code to cancel non triggered pending order, I have no clue which part is that, if only someone can tell me...

The point is I have a script that puts 2 pending stop orders, and I need EA to cancel non-triggered one.
 
 
  • Post #4
  • Quote
  • Last Post: Jun 8, 2012 2:45am Jun 8, 2012 2:45am
  •  futurespec
  • Joined May 2011 | Status: If you think I'm mad, I must be mad | 1,058 Posts
Try something like...

for(int i = 0; i < OrdersTotal(); i++)
{
if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES) == false)
break;
OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
if(OrderSymbol() == Symbol() && OrderType() > 1 )
{
OrderDelete(i);
}
}


Should delete ALL pending orders for that pair so needs placing after the place where your order is sent.
If you think I'm mad, I must be mad
 
 
  • Platform Tech
  • /
  • EA that cancels non-triggered pending orders
  • 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