Forex
Google

Go Back   Forex Trading > Metatrader Training > Metatrader 4 mql 4 - Development course > Questions
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-07-2006, 06:03 PM
deeforex's Avatar
deeforex deeforex is offline
Member
 
Join Date: Oct 2005
Posts: 91
deeforex is on a distinguished road
How to modify this order

Could someone please share with me what the code might look like if I would like to modify this order.

I know that you can only set entry orders ~5 pips (broker buffer) away from the market price. I have pending BuyStop for 1.8580. When the market moves away from this BuyStop I want to be able to modify it to enter earlier and at a better price if possible.

Let's say, modify order if (Ask>=Threshold) && ( (Ask+BrokerBuffer) < BuyStop)
threshold=originalBuyStop - 10*Points

1.8575 Ask, BuyStop is set at 1.8580
1.8574 Ask, BuyStop is modified to 1.8579
1.8573 Ask, BuyStop is modified to 1.8578
1.8572 Ask, BuyStop is modified to 1.8577
1.8571 Ask, BuyStop is modified to 1.8576
1.8570 Ask, BuyStop is modified to 1.8575
threshold=1.8570, so no longer need to modify orders.

I'm very bad at using counters to go through the orders and I'm not totally sure how to call up the existing BuyStop order. If someone could put this into code for me, I would really appreciate it!

Mucho Gracias,
dee

Last edited by deeforex : 06-07-2006 at 06:06 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Plz modify kevmcfoster Suggestions for Trading Systems 6 01-01-2007 11:34 PM
Need help to modify this EA alpin Expert Advisors - Metatrader 4 1 11-27-2006 11:13 AM
modify currency_loader2 EA kidhudi Metatrader 4 2 11-04-2006 06:49 PM
How do I modify the magic number on an order? Aaragorn General Discussion 7 07-17-2006 05:46 PM


All times are GMT. The time now is 10:50 AM.