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 Fri May 03, 2024 1:12 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Building a Custom Indicator
PostPosted: Sat Oct 13, 2012 2:06 am 
Offline

Joined: Fri Feb 04, 2011 9:48 pm
Posts: 114
Location: Canada
Molanis
As mentioned in the previous post, I am building a custom indicator. However my indicator is much more involved than what is shown in your tutorial video on your website:

I am not using a formula based on currency prices as the example shown and as common indicators do. I am plotting two lines based on the averages of values from other common indicator values from all the other 24 pairs in my MT4 system. After running a calculation on these values I can determine a relative currency strength shown by two lines in a separate window on the any particular pair chart. One line representing the base currency and one representing the terms currency.

Therefore I will have no need for i or i+1, i+2 etc. The mathematical formula will involve averages (possibly moving averages at a later stage) resulting in a figure of an overall rise or fall in price trend of a particular currency in relation to the others.

How would I use your custom indicator to do this please?

_________________
Building a future with automated trading


Top
 Profile  
 
 Post subject: Re: Building a Custom Indicator
PostPosted: Mon Oct 15, 2012 8:02 am 
Offline
Site Admin

Joined: Fri Oct 16, 2009 3:40 pm
Posts: 451
You still need to use i, i+1.. but it will be in the parameters of the indicators you will use
To start, in the indicator builder for mt4 create the average of one indicator:
-insert an indicator
-set advanced option to average
-set a period
Compare your indicator with the same indicator created using mt4 charts - in mt4 charts you can do indicator of an indicator


Top
 Profile  
 
 Post subject: Re: Building a Custom Indicator
PostPosted: Mon Oct 15, 2012 2:29 pm 
Offline

Joined: Fri Feb 04, 2011 9:48 pm
Posts: 114
Location: Canada
Molanis:

Okay I did that, and that's cool and it gives pretty good signals, but that's not what I am after. I don't think you understand what I am doing. Let me explain it again:

I want to get an average of the indicator value of 7 different currency pairs -- to be shown in one window in one currency pair in one line.

However in the indicator block, it does not give you the option of choosing a different pair other than the the "current symbol". How do I do this??

_________________
Building a future with automated trading


Top
 Profile  
 
 Post subject: Re: Building a Custom Indicator
PostPosted: Tue Oct 16, 2012 12:11 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
That was just the first step. Now you need to do the same using more pairs. By default the indicator builder will write null instead of the pair. The reason behind that is to create one pair indicators by default - it is done that way because in mt4 you cannot backtest multi pair indicators. Since you want to use multiple pairs, you need to replace the null by the pair (NULL will be replaced by "EURUSD". Take a look at the mt4 reference http://www.molanis.com/products/molanis ... indicators


Top
 Profile  
 
 Post subject: entering a specific pair
PostPosted: Tue Oct 16, 2012 12:19 pm 
Offline

Joined: Fri Feb 04, 2011 9:48 pm
Posts: 114
Location: Canada
I did that, and it didn't accept it the first time, I will try it again. That is why I am stuck here.

_________________
Building a future with automated trading


Top
 Profile  
 
 Post subject: Didn't work
PostPosted: Tue Oct 16, 2012 12:30 pm 
Offline

Joined: Fri Feb 04, 2011 9:48 pm
Posts: 114
Location: Canada
I went to an indicator that I had already built; tested equation and it was ok. All I did was replace the NULL with EURUSD and it said I had errors. So what's wrong?

_________________
Building a future with automated trading


Top
 Profile  
 
 Post subject: Re: Building a Custom Indicator
PostPosted: Wed Oct 17, 2012 4:59 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
Quote:
NULL will be replaced by "EURUSD".

Use "EURUSD"


Top
 Profile  
 
 Post subject: Re: Building a Custom Indicator
PostPosted: Thu Oct 18, 2012 11:23 am 
Offline

Joined: Mon Feb 06, 2012 12:53 pm
Posts: 18
Hello Molanis!

Trying to figure out which option to use inside the TA block in order to use the current bar[0] setting for an EA. Here's what I mean.....

I want the EA to execute IF the Open[0] is LESS THAN Current bar Price (which would be a BULL Candle at any point during the session) then BUY. Inverse for SHORT.

I know if we're talking about the previous candle, it would be IF Open[1] < Close[1] then BUY. But I don't know which option is AVAILABLE in Molanis TA Blocks to choose for the [0] settings because the [0] has an OPEN......but the CLOSE has not happened yet.

Thanks

Dash


Top
 Profile  
 
 Post subject: Re: Building a Custom Indicator
PostPosted: Thu Oct 18, 2012 12:07 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
Next time start a new thread please.

You are right. If you use the current bar you cannot use the close price. Also trading ticks would be better in this case since trading bars only trades at the open

Try comparing the open to bid or ask. The downsize is that backtest will not work fine.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 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