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 Mon May 13, 2024 3:36 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: custom indicator
PostPosted: Mon Mar 07, 2011 4:58 pm 
Offline

Joined: Sun Jan 16, 2011 12:06 pm
Posts: 58
I am trying to build a custom indicator for Heikin Ashi. I was able to enter the equation for the first 2 lines but I do not know how to enter the equation for the 3rd and 4th lines. The formula is as follows

1-Open = (open of previous bar+close of previous bar)/2
2-Close = (open+high+low+close)/4
3-High = maximum of high, open, or close (whichever is highest)
4-Low = minimum of low, open, or close (whichever is lowest)

My other quetions are
1- Is their a way to give title to each indicator line.
2- In the right lower corner of Trading Block Editor their are 2 red tabs one for indicators and the other for advanced. How can we learn more about these 2 tabs???

Thanks for your assistance. :) :)


Top
 Profile  
 
 Post subject: Re: custom indicator
PostPosted: Mon Mar 07, 2011 5:36 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
Quote:
3-High = maximum of high, open, or close (whichever is highest)

Try using MathMax in the formula (click on advanced to write the formula), something like this :
MathMax(MathMax(Open[i],High[i]),Close[i]);
Note that MathMax was designed to compare 2 values, the line above compares 3 values

double MathMax( double value1, double value2)
Returns the maximum value of two numeric values.
Parameters:
value1 - The first numeric value.
value2 - The second numeric value.

Sample:
double result=MathMax(1.08,Bid);

Quote:
4-Low = minimum of low, open, or close (whichever is lowest)

Try using MathMin

Quote:
1- Is their a way to give title to each indicator line.

To show it in mt4 ? it is not possible

Quote:
2- In the right lower corner of Trading Block Editor their are 2 red tabs one for indicators and the other for advanced. How can we learn more about these 2 tabs???


Have you seen the manuals? http://www.molanis.com/support/manuals
With advanced you write your own formula. Gives more control since you do not have to use the buttons.
The other option is to use indicators in your calculations., to create logics like 5*moving average indicator a/2.


Top
 Profile  
 
 Post subject: Re: custom indicator
PostPosted: Mon Mar 07, 2011 9:49 pm 
Offline

Joined: Sun Jan 16, 2011 12:06 pm
Posts: 58
Thanks a lot for such a detailed answer. It helped me a lot. Great support.


Top
 Profile  
 
 Post subject: Re: custom indicator
PostPosted: Sun Mar 13, 2011 4:16 pm 
Offline

Joined: Sun Jan 16, 2011 12:06 pm
Posts: 58
I tried the MathMax equation for item#3 but got the error message stating ERROR:You equation has errors.
Please help


Top
 Profile  
 
 Post subject: Re: custom indicator
PostPosted: Mon Mar 14, 2011 9:03 am 
Offline
Site Admin

Joined: Fri Oct 16, 2009 3:40 pm
Posts: 451
Make sure you use
MathMax(MathMax(Open[i],High[i]),Close[i])
without the ;


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