| 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 |
|
|||
|
Problems running an indicator
Hi everyone,
I'm experiencing an issue while calling the indicator StepMA_v7.1 (written by Igorad) from an EA. I don't get the same results as the ones I see on the chart. For instance, when the trend is clearly red (all drawn in red), I get many up trend signals. Here is the code of my "EA" : int start() { // Catches up signals double stepU = NormalizeDouble(iCustom(NULL, 0, "StepMA_v7.1", 10, 0.3, 0, 0, 0, 0, true, 2, 0, 1, 0), Digits); // Catches down signals double stepD = NormalizeDouble(iCustom(NULL, 0, "StepMA_v7.1", 10, 0.3, 0, 0, 0, 0, true, 2, 0, 2, 0), Digits); if (stepU != EMPTY_VALUE && stepD != EMPTY_VALUE) Print("UP/DOWN => " + stepU + "/" + stepD); else if (stepU != EMPTY_VALUE) Print("UP => " + stepU); else if (stepD != EMPTY_VALUE) Print("DOWN => " + stepD); return (0); } I've ran it with the open price only method. Well, I was thinking of what could produce differences between indicators shown on a chart and indicators ran from an EA. Well, I guess there's a difference in the moment where the indicator is called. Correct me if I'm wrong, but on a chart, an indicator is called at the CLOSE of each bar while from an EA, it's the opening of the bars that triggers the start() function. Now, to try to call my indicators under the same conditions, I've chosen the open price only method and used 1 as shift in order to get the last bar CLOSE. But it didn't work. Do you have an idea of what's going on ? I enclosed a picture with the post so you can see the problem. Thanks in advance, Mark |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Running the optimizer/backtester from within the EA | investor_me | Metatrader 4 | 4 | 02-01-2007 10:48 PM |
| Can I restart my pc while running EA | fabrimf | Setup Questions | 3 | 11-17-2006 02:32 PM |
| Running two different Experts in two different timeframes | RJames5541 | Metatrader 4 | 1 | 08-08-2006 09:57 AM |
| Running Multiple Instances of MT4 | fjlpop | Metatrader 4 | 6 | 06-20-2006 01:52 AM |
| Running MQ4 ON MULTYTHREAD CPU'S | pip-gandalf | Metatrader 4 | 2 | 05-31-2006 01:03 AM |