| 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 |
|
|||
|
I'll try to explain myself :
Suppose I have 3 different systems:
system 1 works best on EUR/USD 1M chart. system 2 works best on EUR/USD 5M chart. system 3 works best on EUR/USD 1H chart. Now I want my expert advisor to open 1 position per chart and no more. In other words, I want to open 1 position only for system 1, 1 position for system 2, and 1 to system 3. The previous solution you wrote limit 1 position per symbol, and now I want to limit 1 position per chart type... |
|
|||
|
Quote:
if(timeprev==Time[0]) { return(0); //only execute on new bar } else if (timeprev==0) { timeprev=Time[0]; // do nothing if freshly added to chart return(0); } else { timeprev=Time[0]; // bar processing here } |
|
||||
|
Quote:
|
|
||||
|
Display percentage target ?
Hello
I am trying to display a percentage target in the form of a comment within a ea. I have this bit of code which displays the current balance as a comment: "Percentage Target : " + AccountBalance()"\n" At the start of the ea I have the following: extern int ProfitPercentage=25; Now what I want to do is : AccountBalance * ProfitPercentage and display the results. eg. $5675.69 * 25% = $1418.92 and display only $1418.69. Thanks in advance |
|
|||
|
hi guyss....
1:how to make the EA to trade only one time persignal..( what i mean is the code) for example ma cross EA... when the ma cross up and with target 20 pip it will closed but when the trend is continue it will try to open another trade since the fast ma still above slow ma.it only have to open another trade when the ma cross down. fast ma > slow ma = need only one trade persignal fast ma < slow ma = also need only one trade persignal 2:is there anyway to put time delay on the crossing? I only know pip seperation (whatever they call it) mean it will wait maybe 10-15 pip after the crossing the only open a trade. just a newbie trying to learn mq4 language![]() |
|
||||
|
one way would be to make the EA look at historical MA readings rather than the current ones. In principle it'd be:
PHP Code:
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MT4 (Basic) Questions | stepwise | Metatrader 4 | 6 | 09-22-2008 02:22 AM |
| Basic Indicator Question | waaustin | Metatrader Programming | 8 | 04-02-2008 02:54 PM |
| Need Help Understanding Basic MQL logic | Emerald King | Expert Advisors - Metatrader 4 | 7 | 02-27-2007 09:59 AM |
| Very basic coding help needed | camisa | Questions | 1 | 05-08-2006 05:36 PM |