Forex
Google
New signals service!

Go Back   Forex Trading > Discussion Areas > Metatrader 4


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 02-24-2007, 08:19 AM
Junior Member
 
Join Date: Apr 2006
Posts: 13
Mark53 is on a distinguished road
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
Attached Images
File Type: jpg chart.JPG (663.6 KB, 39 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

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

BB 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
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


All times are GMT. The time now is 06:17 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.