molanis.com/forum - Tools for MetaTrader : The place to ask about the best expert advisor builder, expert advisor downloads, and expert advisor programming
http://www.molanis.com/forum/

Custom Indicator settings
http://www.molanis.com/forum/viewtopic.php?f=2&t=58
Page 1 of 1

Author:  nick_berlin [ Mon Feb 15, 2010 8:13 am ]
Post subject:  Custom Indicator settings

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

Author:  molanisfx [ Mon Feb 15, 2010 1:38 pm ]
Post subject:  Re: Custom Indicator settings

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

Author:  nick_berlin [ Tue Feb 16, 2010 4:47 am ]
Post subject:  Re: Custom Indicator settings

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?

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/