|
|||||||
| 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 |
|
|||
|
Trouble Shooting
So I’m trying to piece together my first EA… obviously I’m at a dead end. The concept is to combine two functions which are:
Run (close profitable trades) executed every designated (time cycle) I have two user input options – 1 (define profitable) and 2 define (time cycle). I believe most of the code is in order. I am left with one last error “end program”... and I can't figure out why. Can someone with a bit more experience at coding please correct what I’m doing wrong? It’s driving me CRAZY!!! Thanks in advance, MM |
|
|||
|
Quote:
|
|
|||
|
Thanks
Did as suggested, and compiles fine now. However upon running it live I noticed it did not work as specified. In other words I set the time update to 15 min and it never initialized the Close All Profitable Positions script. Any thoughts?
|
|
|||
|
PHP Code:
The right way is: PHP Code:
EDIT : sorry, I didn't see it is a Script and not an EA, so there is another reason why it doesn't work : a script is executed only once : if you want to check something periodically, you have to write some loop in the code ![]() Last edited by Michel : 11-03-2006 at 09:38 PM. |
|
|||
|
Quote:
I might have to leave this one to the pros. MM |
|
|||
|
Quote:
Just write an EA to close your trades, not a script : put your test and the close func in the "start" func without any time-trick, that's all : at every tick the start function is called, there all your trades will be checked and eventually closed. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Hammer and Shooting Star indicator | Marbo | Indicators - Metatrader 4 | 12 | 03-30-2007 02:07 PM |
| anyone having trouble with marketiva | increase | General Discussion | 2 | 02-09-2007 03:08 AM |
| Trouble with bars | pabloschiki | Metatrader 4 | 4 | 08-29-2006 08:09 PM |
| having trouble with multiple EAs | ycomp | Expert Advisors - Metatrader 4 | 6 | 03-03-2006 04:41 AM |