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 8:11 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Custom indicator in strategy builder
PostPosted: Wed Aug 25, 2010 12:02 pm 
Offline

Joined: Wed Aug 25, 2010 11:56 am
Posts: 17
According to the manual "Also the indicator file must be a compiled indicator (a .ex4 file)" however dialogue box in the TA module in strategy builder is looking for a .MQ4 file. I assume the .MQ4 is the uncompiled version of the code? If so does this mean I need the full version of both packages to be able to use custom indicators generated by the TI builder??

Thanks
Chris


Top
 Profile  
 
 Post subject: Re: Custom indicator in strategy builder
PostPosted: Wed Aug 25, 2010 12:32 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
After you compile an EA or an indicator a .ex4 is created. MT4 uses the .ex4 to trade, not the .mq4 Thus you need both the ea .ex4 and the indicator .ex4 for the strategy to run.
The strategy builder has a feature to use custom indicators. If you click the import button you need an .mq4 file - The import function reads the indicator code (.mq4 file) and give you hints about how to get the signals.
If you don't have the .mq4, you cannot use the import feature. You can still use the .ex4 in an EA but you need to enter the indicator variables manually.
The standard version of the technical indicator builder, generates the custom indicator .ex4 and it tells you how to get the signals. With this guide you can use the indicator in an ea using the .ex4 indicator file. However if you want to put your eas and indicators in a VPS you need a pro version since most of the VPS use the .mq4 and not the compiled .ex4 (some vps require that you recompile the ea and indicator in the vps)


Top
 Profile  
 
 Post subject: Re: Custom indicator in strategy builder
PostPosted: Thu Aug 26, 2010 2:03 pm 
Offline

Joined: Wed Aug 25, 2010 11:56 am
Posts: 17
Thanks for the reply. Let me explain the problem I am having and hopefully you can help.

1) Using the TI builder I have created an indicator that plots a line based on a calculation around price. This indicator works (it compiles and plots the line). The indicator is called 'dojiness' and exists as an .ex4 file. The line is a number that can be anything from 0 to 400 (or more).

2) When I add the indicator to the chart, the custom indicator box has 4 tabs. Common, color, levels and visualization. There is NO 'input' tab (as suggested on the forum)

3) When I build a strategy that uses the custom indicator, I have custom fields as "dojiness" and mode as 0 (as there is only one line of output in the indicator). I comare the indicator via an 'and' to be greater than one fixed number and less than another

4) I create a very simple test strategy to fire a trade when dojiness is between the two values and it compiles OK.

5) I now run the strategy in the tester (tick by tick) on MT4, with the dojiness indicator on the screen. The on screen indicator clearly shows 'dojiness' levels bewteen those defined values but the strategy does not fire a trade.


My guess is that the customer indicator is not giving any vales back to the strategy ?

Can you help pleasde?


Top
 Profile  
 
 Post subject: Re: Custom indicator in strategy builder
PostPosted: Thu Aug 26, 2010 7:00 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
When you create the indicator it shows the modes. The mode could be different than zero. Please post your indicator file .moi (not ex4) and your strategy file .mol file to take a look


Top
 Profile  
 
 Post subject: Re: Custom indicator in strategy builder
PostPosted: Fri Aug 27, 2010 1:56 am 
Offline

Joined: Wed Aug 25, 2010 11:56 am
Posts: 17
Thanks for the great support. Here are the two files. If the EA is compiled in 'close of bar' mode (in the start attributes) then no trades are fired. If it is compiled in the 'every tick' mode then a trade is fired at all times. What I am looking for is some proof that the SB EA is getting a valid return number from the custom indicator.

The system is being tested in MT4 using every tick mode and with the indicator displayed on the the screen there are plenty of examples of a valid 'dojiness' value not fireing a test trade.

So in summary, how do I get the value generated via a Molanis TI built indicator to pass that value back to the Molanis SB via the custom inicator setting?

Thanks
Chris


Attachments:
Dojiness.moi [1.97 KiB]
Downloaded 943 times
dojiness test.mol [5.82 KiB]
Downloaded 1014 times
Top
 Profile  
 
 Post subject: Re: Custom indicator in strategy builder
PostPosted: Mon Aug 30, 2010 9:06 am 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
Your strategy and indicator seem to be ok. Your trading condition is too tight that's why you get seldom signals. Also, if you trade using bars, the condition is evaluated in the first tick where open/close/high/low are similar. If you trade using ticks, the condition is evaluated every tick. What you want to do is trade using bars but looking at the previous bar. Change the shift in the TA icons for 1, to evaluate the condition in the previous bar when you get the first tick of the current bar.


Top
 Profile  
 
 Post subject: Re: Custom indicator in strategy builder
PostPosted: Mon Aug 30, 2010 9:37 am 
Offline

Joined: Wed Aug 25, 2010 11:56 am
Posts: 17
molanisfx wrote:
Your strategy and indicator seem to be ok. Your trading condition is too tight that's why you get seldom signals. Also, if you trade using bars, the condition is evaluated in the first tick where open/close/high/low are similar. If you trade using ticks, the condition is evaluated every tick. What you want to do is trade using bars but looking at the previous bar. Change the shift in the TA icons for 1, to evaluate the condition in the previous bar when you get the first tick of the current bar.


Thanks guys - yes the issues was I was using current bar, not i+1...switching to test the i+1 (completed) bar works a treat...the strategy is rubbish but the indicator is working!

Many thanks for excellent support

Chris


Top
 Profile  
 
 Post subject: Re: Custom indicator in strategy builder
PostPosted: Sun Apr 03, 2011 12:41 pm 
Offline

Joined: Sun Apr 03, 2011 12:35 pm
Posts: 11
I cannot really find the import button :(
could anyone, please, tell me where it is??


Top
 Profile  
 
 Post subject: Re: Custom indicator in strategy builder
PostPosted: Sun Apr 03, 2011 3:07 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
You need to select custom indicator in the TA options. Then you will see the button


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