Forex
Google

Go Back   Forex Trading > Metatrader Training > Metatrader 4 mql 4 - Development course > Questions
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


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 06-03-2006, 04:38 PM
wananohoshi wananohoshi is offline
Junior Member
 
Join Date: May 2006
Posts: 25
wananohoshi is on a distinguished road
Why are all of my custom indicator readings wrong?

Hello. I have been struggling with this matter for two days now, and can't seem to find of any solution about it.
No matter what I do, the values that I get from any custom indicator during backtesting of EA are always totally different from what appears on the charts. I have updated the M1 historical data from Alpari, etc.. Here is the function that I am using:

init(){
if (LocalTime()>StrToTime("7:30")&&LocalTime()<StrToT ime("7:45")){
Print(DoubleToStr(iCustom(NULL,PERIOD_M5,"Juice",0 ,0),8));
}
}

Running the EA on M5 timeframe.

Here is a piece of the results:

2006.06.03 19:21:21 2006.06.02 07:34 ICustomTest EURUSD,M5: 0.00000000
2006.06.03 19:21:21 2006.06.02 07:34 ICustomTest EURUSD,M5: 0.00000000
2006.06.03 19:21:21 2006.06.02 07:33 ICustomTest EURUSD,M5: 0.00000506
2006.06.03 19:21:21 2006.06.02 07:33 ICustomTest EURUSD,M5: 0.00000506
2006.06.03 19:21:21 2006.06.02 07:33 ICustomTest EURUSD,M5: 0.00002318
2006.06.03 19:21:21 2006.06.02 07:33 ICustomTest EURUSD,M5: 0.00002318
2006.06.03 19:21:21 2006.06.02 07:33 ICustomTest EURUSD,M5: 0.00000000
2006.06.03 19:21:21 2006.06.02 07:33 ICustomTest EURUSD,M5: 0.00000000

I can clearly see that on the charts Juice shows values as high as 0.0003. Results seem to vary no matter how big values are. I get the same strange results with all custom indicators I've tried so far...
Has anybody encountered such a problem before? I'd be really glad if you let me know what to do.
Thank you in advance!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-03-2006, 05:10 PM
wananohoshi wananohoshi is offline
Junior Member
 
Join Date: May 2006
Posts: 25
wananohoshi is on a distinguished road
A few minutes ago I replaced the iCustom Juice call with a iStdDev (=Juice?) one, and got the appropriate values. So it seems that I am not addressing Juice right, but what is my mistake?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-03-2006, 06:30 PM
elihayun's Avatar
elihayun elihayun is offline
Senior Member
 
Join Date: Jan 2006
Posts: 350
elihayun is on a distinguished road
Quote:
Originally Posted by wananohoshi
A few minutes ago I replaced the iCustom Juice call with a iStdDev (=Juice?) one, and got the appropriate values. So it seems that I am not addressing Juice right, but what is my mistake?
Juice have 2 parameters. Look at the code


extern int Periyod=7;
extern double Level=0.0004;

and two buffers
#property indicator_buffers 2
So u have to pass the parameters to the iCustome command
double J1 = iCustome(NULL,0, "Juice", 7, 0.0004, 0, 0);
the above command will return the first buffer value from the current bar

Hope it will help
Eli
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-03-2006, 06:44 PM
wananohoshi wananohoshi is offline
Junior Member
 
Join Date: May 2006
Posts: 25
wananohoshi is on a distinguished road
Thank you for replying! I just found out what I should do - read the value with shift=1, as during the backtesting the shift=0 value sometimes varies too quickly with a very large amplitude. Again, thanks a lot!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


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

vB 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
TTF+MW Indicator - Any idea what's wrong? disavowed Indicators - Metatrader 4 5 02-12-2008 08:04 AM
Need an MT4 custom indicator wadeboxjr Metatrader 4 1 08-22-2006 08:50 PM
Custom Indicator Help FX-Hedger Indicators - Metatrader 4 4 03-05-2006 01:26 PM
overbought/oversold readings? FXHound Metatrader 4 2 02-15-2006 02:57 PM
Custom Indicator Roets Setup Questions 1 01-03-2006 07:54 AM


All times are GMT. The time now is 07:57 AM.