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 9:55 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Custom Indicator settings
PostPosted: Mon Feb 15, 2010 8:13 am 
Offline

Joined: Mon Feb 08, 2010 10:13 am
Posts: 26
Hi,

I've got some problems with the settings for the custom indicator. I'd like to integrate the "RMI" Indicator. Here you can see the parameters of the indicator:

Code:
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 DodgerBlue
#property indicator_level1 15.0
#property indicator_level2 85.0

extern int RMIPeriod = 5;
extern int Shift = 13;
double g_ibuf_84[];
double g_ibuf_88[];
double g_ibuf_92[];

int init() {
   IndicatorBuffers(3);
   SetIndexBuffer(1, g_ibuf_88);
   SetIndexBuffer(2, g_ibuf_92);
   SetIndexStyle(0, DRAW_LINE);
   SetIndexBuffer(0, g_ibuf_84);
   string ls_0 = "RMI(" + RMIPeriod + ")";
   IndicatorShortName(ls_0);
   SetIndexLabel(0, ls_0);
   SetIndexDrawBegin(0, RMIPeriod);
   return (0);


What do I have to set into the fields?

Symbol = current
Timeframe = H4
Custom fields = ???
Mode = ???
Shift = 1

Do I see the indicator in the chart after running the test?

Many thanks


Top
 Profile  
 
 Post subject: Re: Custom Indicator settings
PostPosted: Mon Feb 15, 2010 1:38 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
The integration is explained here:
viewtopic.php?f=2&t=10
Here the easiest way to find the indicator inputs:
viewtopic.php?f=3&t=14

The indicator inputs are the extern variables:
extern int RMIPeriod = 5;
extern int Shift = 13;

mode - Line index. Can be from 0 to 7 and must correspond with the index used by one of SetIndexBuffer functions.
In plain English, if you have one indicator line use 0.

In short:
Custom fields = "RMI",5,13
RMI is the indicator name. (file name without the .mq4)
Mode = 0

Molanis Team


Top
 Profile  
 
 Post subject: Re: Custom Indicator settings
PostPosted: Tue Feb 16, 2010 4:47 am 
Offline

Joined: Mon Feb 08, 2010 10:13 am
Posts: 26
ok, thanks. :idea:

When I open the chart after running the backtest I can see the standard indicators but not a custom one. Is that correct?


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