molanis.com/forum - Tools for MetaTrader : The place to ask about the best expert advisor builder, expert advisor downloads, and expert advisor programming

AFTER YOU REGISTER SEND US AN EMAIL TO ACTIVATE YOUR ACCOUNT - Before posting:-1- Please read the user guide -2- Try the examples -3- Search in the forum
It is currently Tue May 14, 2024 8:40 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: indicator builder won't compute and plot values .
PostPosted: Sat May 19, 2012 8:56 pm 
Offline

Joined: Sat Oct 15, 2011 11:05 am
Posts: 7
Hi, i tried to build a simple indicator from the formula (high-close)/(high-low), but to my dissappointment the indicator builder neither computed the values nor drew the line, it only showed me a blank indicator window with a dashed horizontal line running through the middle. Why is this so. Thanks


Top
 Profile  
 
 Post subject: Re: indicator builder won't compute and plot values .
PostPosted: Sun May 20, 2012 9:14 am 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
In mt4 if you use / (divide by) in indicators you can get division by zero, and then the indicator does not plot. The indicator has a variable called zero fix, you can change the variable value there or use a simple trick, do:
(high-close)/(high-low+0.00000000001)

0.00000000001 won't affect the calculation and should fix the problem. Also, that indicator should be plotted under the chat.


Top
 Profile  
 
 Post subject: Re: indicator builder won't compute and plot values .
PostPosted: Sun May 20, 2012 6:49 pm 
Offline

Joined: Sat Oct 15, 2011 11:05 am
Posts: 7
how do i locate the zero fix variable...?????


Top
 Profile  
 
 Post subject: Re: indicator builder won't compute and plot values .
PostPosted: Mon May 21, 2012 6:26 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
zero fix variable is only available in the Pro version since you need to see the code to change it.
With demo or standard version this is the easiest fix:
(high-close)/(high-low+0.00000000001)


Top
 Profile  
 
 Post subject: Re: indicator builder won't compute and plot values .
PostPosted: Tue May 22, 2012 12:31 pm 
Offline

Joined: Sat Oct 15, 2011 11:05 am
Posts: 7
thanks a lot, i did that already and all is fine for now.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by Molanis © 2009