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 Apr 29, 2024 5:26 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Custom Indicator
PostPosted: Mon Aug 15, 2011 3:33 pm 
Offline

Joined: Tue Aug 02, 2011 10:55 am
Posts: 33
Hi

I have created a custom indicator using the molanis software. Its fairly simple and similar (but different) to a moving average. It plots on the screen perfectly.

However, when I try and use it in Strategy builder it says, Unknown error and that there aren't any external inputs. Its true there are no external inputs. But can you take a look and see why there is an error?

I have attached it.

Thanks.


Attachments:
CETA_FT.ex4 [2.7 KiB]
Downloaded 603 times
Top
 Profile  
 
 Post subject: Re: Custom Indicator
PostPosted: Mon Aug 15, 2011 5:35 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
Please post the indicator .moi file


Top
 Profile  
 
 Post subject: Re: Custom Indicator
PostPosted: Tue Aug 16, 2011 3:52 am 
Offline

Joined: Tue Aug 02, 2011 10:55 am
Posts: 33
Hi

Moi attached.

Thanks


Attachments:
CETA_FT-1.moi [1.56 KiB]
Downloaded 587 times
Top
 Profile  
 
 Post subject: Re: Custom Indicator
PostPosted: Tue Aug 16, 2011 1:31 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
When you generate an indicator it shows you the signals like this (regardless of the version used pro or standard):
//***Read this first: Integration with Molanis Strategy Builder***
/*To integrate this indicator with Molanis Strategy Builder use the following modes:
Mode 0 = ((8*Close[i])+(5*Close[i+1])+(2*Close[i+2])+(-1*Close[i+3])+(-4*Close[i+4]))/10;
*/
So you know you need to use mode 0. You define the shift (0=current bar, 1=previous bar)

If you have an Indicator Builder pro version it will give you the .mq4 - then you use the import custom indicator button in the Strategy Builder, and you will see something like the graph below. The strategy builder gives you the indicator and variables.

If you have an Indicator Builder standard version, you will get the .ex4 file which cannot be read using the import custom indicator button. You need to add the name of the indicator manually. In the example, you will write "CETA_FT" under Custom Fields - it is not automatic.


Attachments:
File comment: Importing custom indicators
custom_indicator.PNG
custom_indicator.PNG [ 25.44 KiB | Viewed 5605 times ]
Top
 Profile  
 
 Post subject: Re: Custom Indicator
PostPosted: Fri Aug 19, 2011 3:37 am 
Offline

Joined: Tue Aug 02, 2011 10:55 am
Posts: 33
Hi

I still cannot get this to work. When I add the indicator it still gives an error and when I use the EA it does not open any trades. I have attached the SB & Indicator file,Can you take a look?

Thanks


Attachments:
CETA_FT20.ex4 [3.95 KiB]
Downloaded 616 times
CETA_FT20.moi [1.69 KiB]
Downloaded 631 times
FT1.mol [9.66 KiB]
Downloaded 600 times
Top
 Profile  
 
 Post subject: Re: Custom Indicator
PostPosted: Mon Aug 22, 2011 8:33 am 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
Again, you don't have a pro version so you cannot import the indicator using the import button - you will get an error. The workaround is to write the name of the indicator as explained before (you did it right)
Your strategy needs some adjustment. First, you do not need the CL and CS unless you use hedging. Before a BUY is executed, the expert advisor will close all shorts ( and viceversa )


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