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

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

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

EA that cancels non-triggered pending orders 3 replies

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

Close other pending order when one is triggered 0 replies

Trailing Open Order triggered EA 0 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 44
Attachments: Change "Open Order TP(target)" if other pending order triggered
Exit Attachments
Tags: Change "Open Order TP(target)" if other pending order triggered
Cancel

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

  • Last Post
  •  
  • 1 23Page 456 9
  • 1 3Page 45 9
  •  
  • Post #61
  • Quote
  • Jul 16, 2013 10:29pm Jul 16, 2013 10:29pm
  •  minute
  • | Joined Jun 2006 | Status: Member | 377 Posts
Quoting 4xPIPAHOLIC
Disliked
Hello Gumrai, I have been using the "add pending and modify open trades" with great success! Amazing EA! Initially I had the same problem of tp not in place but the problem was mine cause first you have to set the tp in the original trade and then enable the ea. One thing Gumrai...the magic letters do not appear in the comment area when the trades are triggered....that is the way it suppose to be?
Ignored

Yep that was the prob. Must set TP in original trade first. Thanks Gumrai and 4xPipaholic
 
 
  • Post #62
  • Quote
  • Jul 16, 2013 10:55pm Jul 16, 2013 10:55pm
  •  minute
  • | Joined Jun 2006 | Status: Member | 377 Posts
Quoting Gumrai
Disliked
Minute, I have tried and tried, but I find it impossible to get the EA to open pending orders unless the original trade is open. It will not open any pending orders if the input "OpenTicket" is a pending order. Please check your trade history and confirm that ticket number 88298097 was a pending order. Better still if you could attach an image of your trade history showing just the relevant trades. I can only imagine that the problem has something to do with you setting the step at only 0.01 which is just 1 pip on AUDJPY. It may be that market...
Ignored
I tried it with multiple settings of step .05 .005 .01 50 and 100 and still got same issue, but Im not that used to EAs yet, only started with them one month ago.

Anyway, I seem to have the ea working as intended at the moment, so Im ok. I will try again to replicate the behaviour for your info and update you
 
 
  • Post #63
  • Quote
  • Jul 16, 2013 11:11pm Jul 16, 2013 11:11pm
  •  minute
  • | Joined Jun 2006 | Status: Member | 377 Posts
Attached Image (click to enlarge)
Click to Enlarge

Name: audjpy.png
Size: 169 KB
Attached Image


This is with a pending order and the settings above the orders are opened up very close together, regardless of step settings ...it opens up buy orders. 5. Even though sell .Anyway. I don't know. Just testing something it wasnt designed to do so its all good.
 
 
  • Post #64
  • Quote
  • Jul 17, 2013 6:47am Jul 17, 2013 6:47am
  •  Gumrai
  • Joined Oct 2012 | Status: Member | 1,959 Posts
Ok
I've found the issue with having a pending order as the original trade. To be fair, I never considered that it may be necessary to have a pending order as the original trade.
I have now made adjustments that allow a pending order as the original trade and this should resolve the problem of it opening market orders.
But please remember that any additional pending orders have to be logical when compared to the current price.
ie if you have set a pending limit buy at 1.5000 when price is at 1.5100, MT4 will not allow you to set a Buy stop at 1.5050 because current price is already above that level

Also 4xPipaholic's suggestion gave me what I hope is a little spark of inspiration.
This may make it a little easier and hopefully eliminate mistakes with inputting the wrong ticket number.
When opening the original trade, in the comment box, enter your MagicLetters

(My internet disconnected while i was trying to add images so I will maybe continue in the next post)
Edit - I see that the file has attached but no images, so look to the next post
Attached File(s)
File Type: ex4 Add Pending and Modify Open Trades v2.ex4   8 KB | 454 downloads
Please Do Not PM Me With Coding Enquiries
 
 
  • Post #65
  • Quote
  • Jul 17, 2013 6:55am Jul 17, 2013 6:55am
  •  Gumrai
  • Joined Oct 2012 | Status: Member | 1,959 Posts
Continuing.....
Also 4xPipaholic's suggestion gave me what I hope is a little spark of inspiration.
This may make it a little easier and hopefully eliminate mistakes with inputting the wrong ticket number.
When opening the original trade, in the comment box, enter your MagicLetters

Attached Image (click to enlarge)
Click to Enlarge

Name: Gold1.JPG
Size: 126 KB


Now you see in the terminal that the comment has been added

Attached Image (click to enlarge)
Click to Enlarge

Name: Gold2.JPG
Size: 123 KB
Please Do Not PM Me With Coding Enquiries
 
 
  • Post #66
  • Quote
  • Jul 17, 2013 7:04am Jul 17, 2013 7:04am
  •  Gumrai
  • Joined Oct 2012 | Status: Member | 1,959 Posts
Then you enter parameters in the EA and set the MagicLetters exactly as the comment in the live trade, In this case Gold. gold or GOLD will not do

Attached Image (click to enlarge)
Click to Enlarge

Name: Gold3.JPG
Size: 134 KB
Please Do Not PM Me With Coding Enquiries
 
 
  • Post #67
  • Quote
  • Jul 17, 2013 7:08am Jul 17, 2013 7:08am
  •  Gumrai
  • Joined Oct 2012 | Status: Member | 1,959 Posts
And new pending orders are opened without you having to enter the ticket number

Attached Image (click to enlarge)
Click to Enlarge

Name: Gold 4.JPG
Size: 146 KB
Please Do Not PM Me With Coding Enquiries
 
 
  • Post #68
  • Quote
  • Jul 17, 2013 7:11am Jul 17, 2013 7:11am
  •  Gumrai
  • Joined Oct 2012 | Status: Member | 1,959 Posts
I've done minimal testing on this new version, so looking to you guys to test out on demo and give some feedback on any problems that you may find
Please Do Not PM Me With Coding Enquiries
 
 
  • Post #69
  • Quote
  • Jul 17, 2013 7:59am Jul 17, 2013 7:59am
  •  xandi
  • Joined Jan 2012 | Status: Loving Nature* | 3,985 Posts
gumrai, and itīs already possible this? treat Pending as original = when pending order is triggered, the EA is activated and insert all pending orders?
"To be fair, I never considered that it may be necessary to have a pending order as the original trade.
I have now made adjustments that allow a pending order as the original trade and this should resolve the problem of it opening market orders."


if so, beautiful...and regarding this issue, it will be possible to add in the future?
I was looking to add also this:

"If TP is hit, delete all pending orders(already do that), and INSERT 1 pending buy order, letīs say, 50 pips below the TP hit (if we are longing, and the opposite if we are shorting)..." ..
..the proposal itīs to start all cycle again: Pending order is triggered below 50 pips previous TP, and new EA is again activated!

.. thatīs a robot!!
 
 
  • Post #70
  • Quote
  • Jul 17, 2013 8:25am Jul 17, 2013 8:25am
  •  Gumrai
  • Joined Oct 2012 | Status: Member | 1,959 Posts
Quoting xandi
Disliked
gumrai, and itīs already possible this? treat Pending as original = when pending order is triggered, the EA is activated and insert all pending orders? "To be fair, I never considered that it may be necessary to have a pending order as the original trade. I have now made adjustments that allow a pending order as the original trade and this should resolve the problem of it opening market orders." if so, beautiful...and regarding this issue, it will be possible to add in the future? I was looking to add also this: "If TP is hit, delete all pending...
Ignored
Anything is possible Xandi, but I am limited by my knowledge, but I also don't know what I can achieve until I try.
Test this latest version and then if you want any modifications, I will try, but cannot promise anything.
Please Do Not PM Me With Coding Enquiries
 
 
  • Post #71
  • Quote
  • Jul 17, 2013 8:49am Jul 17, 2013 8:49am
  •  Gumrai
  • Joined Oct 2012 | Status: Member | 1,959 Posts
Anyway, Xandi, 4XPipaholic and minute,
thanks for the great feedback. It is really usefull and hopefully has enabled me to improve on the original version.
Of course, I rely on your continued feedback to see if this is true or not
My other thread with Hi Lo break is getting hardly any feedback at all, despite many downloads, which is very disappointing.
Please Do Not PM Me With Coding Enquiries
 
 
  • Post #72
  • Quote
  • Jul 17, 2013 12:22pm Jul 17, 2013 12:22pm
  •  minute
  • | Joined Jun 2006 | Status: Member | 377 Posts
Hi Gumrai, thanks for making this adjustment. That comment mod is really useful. Don't need to enter the ticket number! And can now do the pending order , meaning adds another dimension to the ea for trading use. I will will continue to provide feedback. .
 
 
  • Post #73
  • Quote
  • Jul 17, 2013 5:51pm Jul 17, 2013 5:51pm
  •  xandi
  • Joined Jan 2012 | Status: Loving Nature* | 3,985 Posts
Quoting Gumrai
Disliked
Anyway, Xandi, 4XPipaholic and minute, thanks for the great feedback. It is really usefull and hopefully has enabled me to improve on the original version. Of course, I rely on your continued feedback to see if this is true or not My other thread with Hi Lo break is getting hardly any feedback at all, despite many downloads, which is very disappointing.
Ignored
bro, I know that feling, I have your EA on my first page,and in other post, with congratulations to your work and asking who download it to thanks you, and never heard a Thanks!!..It was downloaded 200 times all together, feedback, zero!! it remind me vampires..
http://www.forexfactory.com/showthread.php?t=388919
 
 
  • Post #74
  • Quote
  • Jul 17, 2013 5:53pm Jul 17, 2013 5:53pm
  •  xandi
  • Joined Jan 2012 | Status: Loving Nature* | 3,985 Posts
Quoting minute
Disliked
Hi Gumrai, thanks for making this adjustment. That comment mod is really useful. Don't need to enter the ticket number! And can now do the pending order , meaning adds another dimension to the ea for trading use. I will will continue to provide feedback. .
Ignored
Iīm enthusiastic!! that pending is going to be very usefull..going to test also!!
 
 
  • Post #75
  • Quote
  • Jul 17, 2013 6:45pm Jul 17, 2013 6:45pm
  •  4xPIPAHOLIC
  • Joined Aug 2009 | Status: Member | 2,576 Posts
Quoting xandi
Disliked
{quote} bro, I know that feling, I have your EA on my first page,and in other post, with congratulations to your work and asking who download it to thanks you, and never heard a Thanks!!..It was downloaded 200 times all together, feedback, zero!! it remind me vampires.. http://www.forexfactory.com/showthread.php?t=388919
Ignored

Hi bro....what I have learned in life that "most" are full of s**t ! Once one of my partners told me that my problem is this.....

I was always a person that believed that people are good...(maybe too naive....I was)....but my partner goes to me that I should always think that people are full of s**t and bad....and let them prove themselves before I consider them good.....or as a friend....

They will not even say thank you.....but then again I do not expect it ......it shows a lot about a persons upbringing.....to bad for them....

I think that he was right.....haha....see still "I think".......everyone takes and 1% - 2% offer.......don't be too optimistic about people thanking you.....if I give I give because I want to help but now I know.....not to wait....karma.... cause I also leaned that the more I give the more I get back.....now that is a bonus....
(I usually do not right things like this ever but over the years seeing so many losers I had to, you just ignited it with your comment above.....this is for them.....with love..)

Watch them now start responding to my message.....
 
 
  • Post #76
  • Quote
  • Jul 17, 2013 10:38pm Jul 17, 2013 10:38pm
  •  Gumrai
  • Joined Oct 2012 | Status: Member | 1,959 Posts
Quoting minute
Disliked
Hi Gumrai, thanks for making this adjustment. That comment mod is really useful. Don't need to enter the ticket number! And can now do the pending order , meaning adds another dimension to the ea for trading use. I will will continue to provide feedback. .
Ignored
I think that the idea of using the comment makes it much simpler than risking entering the wrong trade number.
The idea was spawned from a remark from 4XPipaholic, and that shows just how useful feedback can be.
Without 4X's input, I doubt that the idea would have occurred to me.
Please Do Not PM Me With Coding Enquiries
 
 
  • Post #77
  • Quote
  • Jul 17, 2013 10:44pm Jul 17, 2013 10:44pm
  •  Gumrai
  • Joined Oct 2012 | Status: Member | 1,959 Posts
Quoting xandi
Disliked
{quote} bro, I know that feling, I have your EA on my first page,and in other post, with congratulations to your work and asking who download it to thanks you, and never heard a Thanks!!..It was downloaded 200 times all together, feedback, zero!! it remind me vampires.. http://www.forexfactory.com/showthread.php?t=388919
Ignored
Wow! Downloaded 200 times!
There must have been a need for this EA, it's nice to know that my work is usefull
Please Do Not PM Me With Coding Enquiries
 
 
  • Post #78
  • Quote
  • Jul 17, 2013 10:56pm Jul 17, 2013 10:56pm
  •  4xPIPAHOLIC
  • Joined Aug 2009 | Status: Member | 2,576 Posts
Quoting Gumrai
Disliked
{quote} Wow! Downloaded 200 times! There must have been a need for this EA, it's nice to know that my work is usefull
Ignored

Super useful!!!
 
 
  • Post #79
  • Quote
  • Jul 21, 2013 6:19pm Jul 21, 2013 6:19pm
  •  xandi
  • Joined Jan 2012 | Status: Loving Nature* | 3,985 Posts
Gumrai, everything perfect!!! the last version working on pendings itīs a dream!!!

bro, I have other questio to you, Iīve asked before but you miss it..

If the TP is hitted, I need to reenter 50 pips below (if I was long)..thereīs any chance of doing this related order?

"imagine we buy eurusd at 1.3200, TP 3250...the TP is hit, and the EA create auttomatically a Pending Order to buy again at 3200 and TP 3250..the gap should be 50 or elegible!! thatīs difficult bro??
and if this pending order was triggered, we have already all our other EA working on creating Pending Orders to that Pending order triggered..
If this can be done, this sytem become a Robot...itīs the last step, Iīm looking forwar to achive it, so we can trade while on Caribean beaches drinking Margaritas!!! you will be there on our team, Coder!!! heheheheheh
 
 
  • Post #80
  • Quote
  • Jul 21, 2013 7:47pm Jul 21, 2013 7:47pm
  •  Gumrai
  • Joined Oct 2012 | Status: Member | 1,959 Posts
Quoting xandi
Disliked
Gumrai, everything perfect!!! the last version working on pendings itīs a dream!!! bro, I have other questio to you, Iīve asked before but you miss it.. If the TP is hitted, I need to reenter 50 pips below (if I was long)..thereīs any chance of doing this related order? "imagine we buy eurusd at 1.3200, TP 3250...the TP is hit, and the EA create auttomatically a Pending Order to buy again at 3200 and TP 3250..the gap should be 50 or elegible!! thatīs difficult bro?? and if this pending order was triggered, we have already all our other EA working...
Ignored
Hi Xandi,
I've been working to make some minor improvements and also pondering the best way to do what you want.
At the moment, the pending orders are placed during the initialisation stage of the EA and modifications are carried out in the main body.
Any option to add additional trades will have to be in the main body code, so I may have to do some alterations.
Please Do Not PM Me With Coding Enquiries
 
 
  • Platform Tech
  • /
  • Change "Open Order TP(target)" if other pending order triggered
  • Reply to Thread
    • 1 23Page 456 9
    • 1 3Page 45 9
0 traders viewing now
  • More
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