| New signals service! | |
|
|||||||
| 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 |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
How to open two indipendent orders?
Hi all again! I'm sorry to hassle you with questions that may stupid, but i need your help!
My problem is that i wanted to add an hedging subsystem in my EA (originally from coderguru), so here is the point: I have an order X if X goes under (e.g.) 25 pips i open order Y so if was only one order "y" it is no problem because i can use a counter like this PHP Code:
and then limit to 1 the open order like this PHP Code:
X closes Y still open X1 goes -25 now i'd like to open Y1 order and i can't! How can i solve this problem? |
|
|||
|
I'd like to try to help you but your question isn't very clear.
Lux
__________________
Build An Expert Advisor. FREE E-course As Seen On TV ![]() ForexArea.com Users of Gap Trader from 'Forex-Assistant' MUST Read This |
|
|||
|
Ok i'll try to explain better....
I have an ea, it performs well, but it still have false signals but it's not a problem For example my signal is buy is buy right ? (X) if OrderProfit < -25 open hedge order the hedge order is a sell order (Y) with it's paramaters. If X closes Y must still open until take profit and so on X1 Y X1 Y Y1 etc is it a little bit more clear? |
|
|||
|
You could have a binary variable and reset when the first order closes so when you have an X order and it goes -25 and reset=false you open Y. Then set reset=true until X is gone
Hope it makes sense Last edited by InTrance; 07-15-2008 at 04:17 PM. |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Close all open orders EA | nubika | Expert Advisors - Metatrader 4 | 15 | 10-25-2008 04:30 AM |
| EA to close pending and open orders!! | criss73 | Expert Advisors - Metatrader 4 | 6 | 10-31-2007 09:42 PM |
| close all open orders script | forextrend | General Discussion | 2 | 12-17-2006 07:16 AM |
| Script to close open orders... | babarmughal | Expert Advisors - Metatrader 4 | 1 | 12-13-2006 05:50 PM |
| Using Arrays to track info for All Open Orders | deeforex | Questions | 6 | 09-12-2006 07:01 PM |