Forex



Go Back   Forex Trading > Training > Metatrader > Metatrader 4 mql 4 - Development course > Questions
Forex Forum Register More recent Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 06-03-2006, 05:38 PM
Junior Member
 
Join Date: May 2006
Posts: 26
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #2 (permalink)  
Old 06-03-2006, 06:10 PM
Junior Member
 
Join Date: May 2006
Posts: 26
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #3 (permalink)  
Old 06-03-2006, 07:30 PM
elihayun's Avatar
Senior Member
 
Join Date: Jan 2006
Posts: 397
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #4 (permalink)  
Old 06-03-2006, 07:44 PM
Junior Member
 
Join Date: May 2006
Posts: 26
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
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 09:04 AM
Need an MT4 custom indicator wadeboxjr Metatrader 4 1 08-22-2006 09:50 PM
Custom Indicator Help FX-Hedger Indicators - Metatrader 4 4 03-05-2006 02:26 PM
overbought/oversold readings? FXHound Metatrader 4 2 02-15-2006 03:57 PM
Custom Indicator Roets Setup Questions 1 01-03-2006 08:54 AM


All times are GMT. The time now is 06:46 PM.



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