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

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

MT4 Order Pending Order/Order Modify Issue 1 reply

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

Oanda "Order triggered but could not be completed..." 5 replies

EA that cancels non-triggered pending orders 3 replies

Close other pending order when one is triggered 0 replies

  • Commercial Content
  • /
  • Reply to Thread
  • Subscribe
  • 5
Attachments: Pending order deleted but after triggered by EA, help!
Exit Attachments
Tags: Pending order deleted but after triggered by EA, help!
Cancel

Pending order deleted but after triggered by EA, help!

  • Post #1
  • Quote
  • First Post: Mar 3, 2016 5:22pm Mar 3, 2016 5:22pm
  •  kissadameu
  • | Commercial Member | Joined May 2015 | 69 Posts
Hello Guys!

I have a self-made EA... everything works fine except one thing... there are cases when the EA deletes an order but right after that is triggers and the position is not controlled by the EA ( no sl, no tp, no ts)... do you have any idea what the problem can be?

thanks
Attached Image (click to enlarge)
Click to Enlarge

Name: 12784798_1744246185811483_19178025_n.jpg
Size: 62 KB
Attached Image (click to enlarge)
Click to Enlarge

Name: 12789750_1744246192478149_839138540_o.jpg
Size: 68 KB
Attached Image
Seize your trading!
  • Post #2
  • Quote
  • Mar 4, 2016 2:30am Mar 4, 2016 2:30am
  •  MaxDoom
  • | Commercial Member | Joined Feb 2010 | 13,255 Posts
Quoting kissadameu
Disliked
Hello Guys! I have a self-made EA... everything works fine except one thing... there are cases when the EA deletes an order but right after that is triggers and the position is not controlled by the EA ( no sl, no tp, no ts)... do you have any idea what the problem can be? thanks {image}{image}{image}
Ignored
it says that it failed to delete the pending order, so you need to check the success/failure of the action within your code and take the desired action afterwards.
 
 
  • Post #3
  • Quote
  • Mar 4, 2016 2:39am Mar 4, 2016 2:39am
  •  kissadameu
  • | Commercial Member | Joined May 2015 | 69 Posts
Quoting MaxDoom
Disliked
{quote} it says that it failed to delete the pending order, so you need to check the success/failure of the action within your code and take the desired action afterwards.
Ignored
Yes, but after it says this the order opens... and i have checked everything but didn't find the thing i'm looking for :/
Seize your trading!
 
 
  • Post #4
  • Quote
  • Mar 4, 2016 2:58am Mar 4, 2016 2:58am
  •  Atihun
  • | Joined Feb 2012 | Status: Member | 923 Posts
Quoting kissadameu
Disliked
{quote} Yes, but after it says this the order opens... and i have checked everything but didn't find the thing i'm looking for :/
Ignored

maybe you are deleting after the code is executed?oh saw the other screenshot. it says invalid parameters. can you post a screenshot of the ordermodify part
follow the flow
 
 
  • Post #5
  • Quote
  • Mar 4, 2016 3:10am Mar 4, 2016 3:10am
  •  kissadameu
  • | Commercial Member | Joined May 2015 | 69 Posts
Quoting Atihun
Disliked
{quote} maybe you are deleting after the code is executed?oh saw the other screenshot. it says invalid parameters. can you post a screenshot of the ordermodify part
Ignored
here it is:
Attached Image (click to enlarge)
Click to Enlarge

Name: Képkivágás.JPG
Size: 33 KB
Seize your trading!
 
 
  • Post #6
  • Quote
  • Mar 4, 2016 3:18am Mar 4, 2016 3:18am
  •  Atihun
  • | Joined Feb 2012 | Status: Member | 923 Posts
Quoting kissadameu
Disliked
{quote} here it is:{image}
Ignored
Attached Image (click to enlarge)
Click to Enlarge

Name: a.JPG
Size: 151 KB
follow the flow
 
 
  • Post #7
  • Quote
  • Mar 4, 2016 3:21am Mar 4, 2016 3:21am
  •  kissadameu
  • | Commercial Member | Joined May 2015 | 69 Posts
Quoting Atihun
Disliked
{quote} {image}
Ignored
Under your green frame you can see that it was trying to delete it... and it happens like 5 out of 10... and when it happens there is no SL no TP and TS is not working only if set by hand.... it thinks that it deleted the pending but not it triggered and then it can't see it
Seize your trading!
 
 
  • Post #8
  • Quote
  • Mar 4, 2016 3:28am Mar 4, 2016 3:28am
  •  Atihun
  • | Joined Feb 2012 | Status: Member | 923 Posts
Quoting kissadameu
Disliked
{quote} Under your green frame you can see that it was trying to delete it... and it happens like 5 out of 10... and when it happens there is no SL no TP and TS is not working only if set by hand.... it thinks that it deleted the pending but not it triggered and then it can't see it
Ignored
3.order deletes
2.order placed confirmation
1.order placing

but in one case

4.trying to delete open order(not a stop order anymore) which gives you invalid param
3.order opens
2.order placed confirmation
1.order placing

if you look at the timestamp you can see at 20:31:53 504 you have 2 actions. the first one is opening the second one is trying to delete the pending which is already opened. basicly it means sometimes you are too slow to delete before its opened.
follow the flow
 
 
  • Post #9
  • Quote
  • Mar 4, 2016 3:34am Mar 4, 2016 3:34am
  •  kissadameu
  • | Commercial Member | Joined May 2015 | 69 Posts
Quoting Atihun
Disliked
{quote} 3.order deletes 2.order placed confirmation 1.order placing but in one case 4.trying to delete open order(not a stop order anymore) which gives you invalid param 3.order opens 2.order placed confirmation 1.order placing if you look at the timestamp you can see at 20:31:53 504 you have 2 actions. the first one is opening the second one is trying to delete the pending which is already opened. basicly it means sometimes you are too slow to delete before its opened.
Ignored
I see what you mean but I still can't solve this HUGE problem of mine... do you have any idea how to override it?
Seize your trading!
 
 
  • Post #10
  • Quote
  • Mar 4, 2016 3:39am Mar 4, 2016 3:39am
  •  Atihun
  • | Joined Feb 2012 | Status: Member | 923 Posts
Quoting kissadameu
Disliked
{quote} I see what you mean but I still can't solve this HUGE problem of mine... do you have any idea how to override it?
Ignored
if by huge problem you mean the order has no sl tp ...
do ordermodify after you get the error of invalid param. some brokers dont allow to place sl and tp when you hit market. this could be why.

can you go to new order on mt4 and place a manual trade at market with sl?
follow the flow
 
 
  • Post #11
  • Quote
  • Mar 4, 2016 3:44am Mar 4, 2016 3:44am
  •  kissadameu
  • | Commercial Member | Joined May 2015 | 69 Posts
Quoting Atihun
Disliked
{quote} if by huge problem you mean the order has no sl tp ... do ordermodify after you get the error of invalid param. some brokers dont allow to place sl and tp when you hit market. this could be why. can you go to new order on mt4 and place a manual trade at market with sl?
Ignored
The broker allows placing SL and TP with the order... I did it by hand, by EA... this is my first EA that does this problem... and i've looked up everything on the internet but no solutin so far...
Seize your trading!
 
 
  • Post #12
  • Quote
  • Mar 4, 2016 3:52am Mar 4, 2016 3:52am
  •  Atihun
  • | Joined Feb 2012 | Status: Member | 923 Posts
Quoting kissadameu
Disliked
{quote} The broker allows placing SL and TP with the order... I did it by hand, by EA... this is my first EA that does this problem... and i've looked up everything on the internet but no solutin so far...
Ignored
well you can go through the open orders and modify them.
or
you can wait till you get the error where the pending order cant be deleted because its already open, save the ticket and do ordermodify.
follow the flow
 
 
  • Post #13
  • Quote
  • Mar 4, 2016 3:56am Mar 4, 2016 3:56am
  •  kissadameu
  • | Commercial Member | Joined May 2015 | 69 Posts
Quoting Atihun
Disliked
{quote} well you can go through the open orders and modify them. or you can wait till you get the error where the pending order cant be deleted because its already open, save the ticket and do ordermodify.
Ignored
what do you mean? Can you complete the code to work properly?
Seize your trading!
 
 
  • Post #14
  • Quote
  • Mar 4, 2016 4:02am Mar 4, 2016 4:02am
  •  Atihun
  • | Joined Feb 2012 | Status: Member | 923 Posts
Quoting kissadameu
Disliked
{quote} what do you mean? Can you complete the code to work properly?
Ignored
im not sure what you are trying to do anyway. do you want the order to be not executed or do you want the order to be executed but managed afterwards?
it isnt really a problem if it gets executed without a sl tp... because you can modify and add a sl tp ts when its already open just in case.
i dont have the time to look through your code.
follow the flow
 
 
  • Post #15
  • Quote
  • Mar 4, 2016 4:06am Mar 4, 2016 4:06am
  •  kissadameu
  • | Commercial Member | Joined May 2015 | 69 Posts
Quoting Atihun
Disliked
{quote} im not sure what you are trying to do anyway. do you want the order to be not executed or do you want the order to be executed but managed afterwards? it isnt really a problem if it gets executed without a sl tp... because you can modify and add a sl tp ts when its already open just in case. i dont have the time to look through your code.
Ignored
well, what I want is that if the EA wants to delete a pending order, then delete it not open it, but if opens it then manage it.
Seize your trading!
 
 
  • Post #16
  • Quote
  • Mar 4, 2016 4:17am Mar 4, 2016 4:17am
  •  Atihun
  • | Joined Feb 2012 | Status: Member | 923 Posts
Quoting kissadameu
Disliked
{quote} well, what I want is that if the EA wants to delete a pending order, then delete it not open it, but if opens it then manage it.
Ignored
yeah then you need to code a few lines.
1. execution/confirmation

2. OrderDelete()....{
deleting succes --> you are done
}else{>>deleting failed>>get last error; Ordermodify(ticket..sl,tp,....)
}}
follow the flow
 
 
  • Post #17
  • Quote
  • Mar 7, 2016 11:50am Mar 7, 2016 11:50am
  •  kissadameu
  • | Commercial Member | Joined May 2015 | 69 Posts
Quoting Atihun
Disliked
{quote} yeah then you need to code a few lines. 1. execution/confirmation 2. OrderDelete()....{ deleting succes --> you are done }else{>>deleting failed>>get last error; Ordermodify(ticket..sl,tp,....) }}
Ignored
hey Atihun... it's not working either... the code has already have it... :/
Seize your trading!
 
 
  • Post #18
  • Quote
  • Last Post: Mar 7, 2016 11:51am Mar 7, 2016 11:51am
  •  kissadameu
  • | Commercial Member | Joined May 2015 | 69 Posts
except fot the GetLastError part
Seize your trading!
 
 
  • Commercial Content
  • /
  • Pending order deleted but after triggered by EA, help!
  • 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