• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 12:54pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 12:54pm
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 34Page 567 9
  • 1 4Page 56 9
  •  
  • Post #81
  • Quote
  • Jul 21, 2013 8:24pm Jul 21, 2013 8:24pm
  •  xandi
  • Joined Jan 2012 | Status: Loving Nature* | 3,985 Posts
Quoting Gumrai
Disliked
{quote} 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.
Ignored
thanks bro, take all the time you want, and ask me every detail to see if you are understanding the all cycle...
1. we have an open position and the TP is hit
2. the pending order is created with comment ("1ST"), TP 50 pips, entry price 50 pips below of the previous maximum(perfect, like works the trail stop), or simple created 50 pips below from our TP hitted before.
3. If this pending is triggered, using the comment box is created all the pending orders below(this we already have).

It´s better in 2 EA´s? in 2 charts? let´s keep thinking!!
cheers bro!!

remember the promised land
http://wallpicts.com/wp-content/uplo...ackgrounds.jpg
 
 
  • Post #82
  • Quote
  • Edited 2:23pm Aug 5, 2013 2:11pm | Edited 2:23pm
  •  xandi
  • Joined Jan 2012 | Status: Loving Nature* | 3,985 Posts
yóóó|!| Gumrai!!!
where are you, what have you been doing, you pirate!! !I see you´ve been being busy!!!!

have you think about improving the EA with the upside down Trailing Stop?
If price drop down 50 pips from last relative high, you bought?
it´s possible bro?
Thanks
 
 
  • Post #83
  • Quote
  • Aug 5, 2013 4:11pm Aug 5, 2013 4:11pm
  •  Gumrai
  • Joined Oct 2012 | Status: Member | 1,959 Posts
Hi Xandi,
yes, I've been busy.
Unfortunately, not achieving much just lately though.
I'm learning about coding as I go, and I have hit one stumbling block after another.
I will get there eventually, but it is slow progress
Please Do Not PM Me With Coding Enquiries
 
 
  • Post #84
  • Quote
  • Aug 5, 2013 8:25pm Aug 5, 2013 8:25pm
  •  xandi
  • Joined Jan 2012 | Status: Loving Nature* | 3,985 Posts
Quoting Gumrai
Disliked
Hi Xandi, yes, I've been busy. Unfortunately, not achieving much just lately though. I'm learning about coding as I go, and I have hit one stumbling block after another. I will get there eventually, but it is slow progress
Ignored
relax & take it easyy, you creative mind! you are achievieng daily! progressing!!and already with very nice work done!!!
 
 
  • Post #85
  • Quote
  • Edited 9:37pm Aug 7, 2013 2:31am | Edited 9:37pm
  •  Gumrai
  • Joined Oct 2012 | Status: Member | 1,959 Posts
Ok,
this has only been tried in the strategy tester and it seems to function OK
It only works with Limit orders
What should happen is that when the TP is hit, the order that was triggered last will be reset
So, if your original trade hits TP, then a new limit order will open with entry, SL and TP the same as the first trade.
If , for example your second Limit entry hits TP, it will be duplicated, but not the 1st Limit entry or the original trade.
Because the EA works by comparing the TP on the closed trade with the original TP, if you make any modifications to the TP yourself, it will not work.
Please give this a good test. Particularly with things like making sure that it continues to work after shutting down the platform for a while. As may happen in a power cut. Obviously, it would not modify anything while not connected, and should just get on with the job from where it left off when reconnected.

EDIT slight revision, so have removed attached EA and will re-attach the amended version.
Please Do Not PM Me With Coding Enquiries
 
 
  • Post #86
  • Quote
  • Edited 1:05pm Aug 7, 2013 12:35pm | Edited 1:05pm
  •  xandi
  • Joined Jan 2012 | Status: Loving Nature* | 3,985 Posts
Quoting Gumrai
Disliked
Ok, this has only been tried in the strategy tester and it seems to function OK It only works with Limit orders What should happen is that when the TP is hit, the order that was triggered last will be reset So, if your original trade hits TP, then a new limit order will open with entry, SL and TP the same as the first trade. If , for example your second Limit entry hits TP, it will be duplicated, but not the 1st Limit entry or the original trade. Because the EA works by comparing the TP on the closed trade with the original TP, if you make any modifications...
Ignored
hmmm...good, useful, but still not quiet what I need...I need a "Trailing Limit Buy"...i want this, for example:

buy limit long if price fall 50 pips from the last high...get it?
like trailing stop, buy in this case it will not close position , it will open position!!!

this it will be perfect...
even so, I will test the EA above, it can be also useful!
many thanks bro!

ps: I forgot to mention...you´re the best!!!! using your time and creativity here!!! sharing your valuable work...thankssss
 
 
  • Post #87
  • Quote
  • Aug 7, 2013 9:42pm Aug 7, 2013 9:42pm
  •  Gumrai
  • Joined Oct 2012 | Status: Member | 1,959 Posts
Made a slight adjustment and reposting.
What worked in the strategy tester didn't work so well in real time
Attached File(s)
File Type: ex4 APMOTplus v1.1.ex4   10 KB | 249 downloads
Please Do Not PM Me With Coding Enquiries
 
 
  • Post #88
  • Quote
  • Aug 7, 2013 10:04pm Aug 7, 2013 10:04pm
  •  Gumrai
  • Joined Oct 2012 | Status: Member | 1,959 Posts
Quoting xandi
Disliked
{quote} hmmm...good, useful, but still not quiet what I need...I need a "Trailing Limit Buy"...i want this, for example: buy limit long if price fall 50 pips from the last high...get it? like trailing stop, buy in this case it will not close position , it will open position!!! this it will be perfect... even so, I will test the EA above, it can be also useful! many thanks bro! ps: I forgot to mention...you´re the best!!!! using your time and creativity here!!! sharing your valuable work...thankssss
Ignored
Hmmmmm
Maybe I'm a bit slow, but not sure of the exact format here

I think that I can do the "Trailing Limit Buy" OK, just not sure how you want to link it to this EA
Do you want the "Trailing Limit Buy" to replace the Master trade and then when that is triggered it will open the pending orders?
Please Do Not PM Me With Coding Enquiries
 
 
  • Post #89
  • Quote
  • Aug 7, 2013 10:26pm Aug 7, 2013 10:26pm
  •  xandi
  • Joined Jan 2012 | Status: Loving Nature* | 3,985 Posts
the master trade can be

  1. manual entry with tp set
  2. pending order triggered with tp set
  3. trailing buy limit (*)

(*) this trailing could be choosable if we want to be working or not? can it be a 2nd EA to add on the same chart?
if not, I must think, but your solution may work, replacing the 1st"manual entry"

what do you think??

 
 
  • Post #90
  • Quote
  • Aug 8, 2013 12:59am Aug 8, 2013 12:59am
  •  Gumrai
  • Joined Oct 2012 | Status: Member | 1,959 Posts
No, still not sure.
Walk me through it.

Place a buy order at x with TP at y
If TP is hit
a pending buy limit order is opened, entry at y-50 pips
as price goes higher than y the limit order is modified so that if, for example, price reaches a high of y+20, entry will have been modified to y-30 (50 pips below the high)

The 50 pips can be the default, but this can be changed in the input window.
I assume that TP will also be input as well.

I think that I understand that correctly, just not sure where the current EA comes into the picture.
Do you want that set in motion when the pending order is triggered.
I just want to be sure that I am understanding.

PS. You can only have 1 EA on a chart.
Please Do Not PM Me With Coding Enquiries
 
 
  • Post #91
  • Quote
  • Aug 8, 2013 8:47am Aug 8, 2013 8:47am
  •  xandi
  • Joined Jan 2012 | Status: Loving Nature* | 3,985 Posts
Quoting Gumrai
Disliked
No, still not sure. Walk me through it. Place a buy order at x with TP at y If TP is hit a pending buy limit order is opened, entry at y-50 pips as price goes higher than y the limit order is modified so that if, for example, price reaches a high of y+20, entry will have been modified to y-30 (50 pips below the high) The 50 pips can be the default, but this can be changed in the input window. I assume that TP will also be input as well. I think that I understand that correctly, just not sure where the current EA comes into the picture. Do you want...
Ignored
"Place a buy order at x with TP at y If TP is hit a pending buy limit order is opened, entry at y-50 pips as price goes higher than y the limit order is modified so that if, for example, price reaches a high of y+20, entry will have been modified to y-30 (50 pips below the high)" --- exactly, perfect!!!!!
"The 50 pips can be the default, but this can be changed in the input window. I assume that TP will also be input as well." -- correct, different things, better

"Do you want that set in motion when the pending order is triggered" -- going to put here 2/3 scenarios:

I Place a buy order at x with TP at y...i set&enable EA...the pending orders are set automatic...the TP his hit, so the pending buys are deleted, and the trailing limit buy is created as described above, "z" pips below from the high...the trailing limit buy is triggered...pending buys are created again like original version...the TP is hit...pending buys are deleted...another trailing limit buy is created...the trailing buy limited is triggered...pending buys are created as on original version..this time TP is not hit, an the 1st pending buy is triggered...the TP in all open positions changes to the TP of the pending buy triggered!!! and so on...set in motion!!!!


thanks thanks thanks brooo, you are getting there, soon this can do all the job for us!!!
 
 
  • Post #92
  • Quote
  • Aug 8, 2013 6:09pm Aug 8, 2013 6:09pm
  •  xandi
  • Joined Jan 2012 | Status: Loving Nature* | 3,985 Posts
Quoting xandi
Disliked
{quote} "Place a buy order at x with TP at y If TP is hit a pending buy limit order is opened, entry at y-50 pips as price goes higher than y the limit order is modified so that if, for example, price reaches a high of y+20, entry will have been modified to y-30 (50 pips below the high)" --- exactly, perfect!!!!! "The 50 pips can be the default, but this can be changed in the input window. I assume that TP will also be input as well." -- correct, different things, better "Do you want that set in motion when the pending order is triggered"...
Ignored
I forgot to tell!!! Gumrai, you are the greastest!!!!! I´ll go Thailand to find you, and we´ll be like kings, on Pacific lands!!!!
 
 
  • Post #93
  • Quote
  • Aug 8, 2013 6:50pm Aug 8, 2013 6:50pm
  •  Findogg
  • | Joined Jun 2013 | Status: Member | 15 Posts
Hey Gumrai,
Just downloaded your latest EA.......http://assets.forexfactory.net/images/attach/ex4.gif Add Pending and Modify Open Trades v2.ex4 .....awesome work mate the comment field and the ability to open the pyramid on a pending order is just great, makes life a breeze and relaxed trading (set and forget)

Looking forward to what you are working on with Xandi (hopefully you guys will share! )


Keep up the good/hard work....you are the man.....
 
 
  • Post #94
  • Quote
  • Aug 8, 2013 7:11pm Aug 8, 2013 7:11pm
  •  Gumrai
  • Joined Oct 2012 | Status: Member | 1,959 Posts
Flattery will get you everywhere

OK, I think that I get it now.
Don't expect anything too soon though as it will take some time.
I'm gradually getting quicker and making less mistakes as I learn about coding, but it is still an uphill struggle.
I will have to rewrite the code and tidy it up a bit, before embarking into this next adventure into coding
Please Do Not PM Me With Coding Enquiries
 
 
  • Post #95
  • Quote
  • Aug 8, 2013 7:13pm Aug 8, 2013 7:13pm
  •  xandi
  • Joined Jan 2012 | Status: Loving Nature* | 3,985 Posts
Quoting Gumrai
Disliked
Flattery will get you everywhere OK, I think that I get it now. Don't expect anything too soon though as it will take some time. I'm gradually getting quicker and making less mistakes as I learn about coding, but it is still an uphill struggle. I will have to rewrite the code and tidy it up a bit, before embarking into this next adventure into coding
Ignored
 
 
  • Post #96
  • Quote
  • Aug 10, 2013 8:45am Aug 10, 2013 8:45am
  •  Gumrai
  • Joined Oct 2012 | Status: Member | 1,959 Posts
Quoting Findogg
Disliked
Hey Gumrai, Just downloaded your latest EA.......{image} Add Pending and Modify Open Trades v2.ex4 .....awesome work mate the comment field and the ability to open the pyramid on a pending order is just great, makes life a breeze and relaxed trading (set and forget) Looking forward to what you are working on with Xandi (hopefully you guys will share! ) Keep up the good/hard work....you are the man.....
Ignored
Thankyou for your kind words Findogg.
I didn't see your post earlier as I had the thread open and working on my reply to Xandi when you posted.
No worries about sharing. As far as I am concerned, any and all developments of this EA will be available to everyone. I am certain that Xandi feels the same (This is his thread after all).
I only hope that whoever downloads the EA will test it on Demo and report back if anything strange/unexpected happens, I can't test every eventuality myself .
Please Do Not PM Me With Coding Enquiries
 
 
  • Post #97
  • Quote
  • Aug 11, 2013 6:06am Aug 11, 2013 6:06am
  •  Gumrai
  • Joined Oct 2012 | Status: Member | 1,959 Posts
Hi Xandi,
this has only been tested in strategy tester, so totally unknown in the live market.
I'm only attaching it so that hopefully a few people will do some testing with it and expose any problems.
I think that it does what you ask.

There are some differences here in the parameters
MagicLetters etc are the same as before
You will see a different parameter
PipDecimal
This is the amount of decimal points that designate 1 pip.
ie for EURUSD you enter 4 because 1 pip is 0.00010, so the fourth number after the decimal point.
Japanese pairs, you would enter 2 because 1 pip is 0.010

With this, Step has been changed to StepInPips, so you now enter pips

SlaveRetraceInPips the is the retracement from the close price of the Master trade that the pending order will be set at.
SlaveSL_InPips is the Stop Loss for the slave order in pips
SlaveTP_InPips ditto

The other difference that you see is that there is an additional parameter
Tester
If this is set to true, you can test settings in the strategy tester as it will open a trade to get the ball rolling.



Please note that if you use a pending order as the first Master Trade, it will treat it as a slave trade and as price rise will modify it in line with SlaveSL_InPips and SlaveTP_InPips.

I hope that this is clear and look forward to some feedback.
Attached File(s)
File Type: ex4 TrailLimitBuy.ex4   8 KB | 232 downloads
Please Do Not PM Me With Coding Enquiries
 
 
  • Post #98
  • Quote
  • Edited 9:30am Aug 11, 2013 9:05am | Edited 9:30am
  •  xandi
  • Joined Jan 2012 | Status: Loving Nature* | 3,985 Posts
Quoting Gumrai
Disliked
Hi Xandi, this has only been tested in strategy tester, so totally unknown in the live market. I'm only attaching it so that hopefully a few people will do some testing with it and expose any problems. I think that it does what you ask. There are some differences here in the parameters MagicLetters etc are the same as before You will see a different parameter PipDecimal This is the amount of decimal points that designate 1 pip. ie for EURUSD you enter 4 because 1 pip is 0.00010, so the fourth number after the decimal point. Japanese pairs, you would...
Ignored
going to test this night!!! you´ll have feedback this asia bro!!! yupppiiii....spetacularrrr!!!I love the new ideias yours, with change to pipssbrilliant mind!!! thanks
ps: that part of Tester is new to me, but on trying it on DEMO I might get it!!!
 
 
  • Post #99
  • Quote
  • Aug 11, 2013 5:22pm Aug 11, 2013 5:22pm
  •  Gumrai
  • Joined Oct 2012 | Status: Member | 1,959 Posts
Because the markets are not open at the weekend, the only way that I can check for errors in the EA is by using the strategy tester. To do that, the EA needs to open a trade. Usually I delete the trade open order from the EA, but this time I thought "why not leave it in?"
It's not ideal as it will open a trade at whatever price is at the strategy tester's start time, but some may find it useful.
Please Do Not PM Me With Coding Enquiries
 
 
  • Post #100
  • Quote
  • Edited 5:57pm Aug 11, 2013 5:47pm | Edited 5:57pm
  •  xandi
  • Joined Jan 2012 | Status: Loving Nature* | 3,985 Posts
Quoting Gumrai
Disliked
Because the markets are not open at the weekend, the only way that I can check for errors in the EA is by using the strategy tester. To do that, the EA needs to open a trade. Usually I delete the trade open order from the EA, but this time I thought "why not leave it in?" It's not ideal as it will open a trade at whatever price is at the strategy tester's start time, but some may find it useful.
Ignored
didn´t get your message...im downloading it and start trying...

ps::ahh get it!!! you live the parameters choose!!!nice for 1st use!!
 
 
  • Platform Tech
  • /
  • Change "Open Order TP(target)" if other pending order triggered
  • Reply to Thread
    • 1 34Page 567 9
    • 1 4Page 56 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