fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    Ma of RSI indicator

    Questions & Answers
    2
    5
    3020
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      Tailung last edited by

      In MT4 you can drop a MA on the RSI indicator window.
      Is there a way where I can do that with fxDreema?

      1 Reply Last reply Reply Quote 0
      • fxDreema
        fxDreema last edited by

        I don't know if this is even possible in MQL4. This is the function to get MA value, and there is nothing about using it in other subcharts: http://docs.mql4.com/indicators/ima
        But maybe there are some custom indicators to do that?

        1 Reply Last reply Reply Quote 0
        • T
          Tailung last edited by

          So I found that this is possible in MQL. I searched documentation and I tinkered with the custom indicator MACD.mq4, that comes standard with MT4.
          Here is what I have come up with: MARSI.mq4 see attachment. Hmmmm. Can't Upload *.mq4 Then copy/past

          It shows: RSI in separate window.
          It shows: MA of RSI in that window
          It shows: 2 levels

          But how do I use this custom indicator in FxDreema ?

          //+------------------------------------------------------------------+
          //| Custom MARSI.mq4 |
          //| Copyright © 2004, MetaQuotes Software Corp. |
          //| http://www.metaquotes.net/ |
          //+------------------------------------------------------------------+
          #property copyright "Copyright © 2004, MetaQuotes Software Corp."
          #property link "http://www.metaquotes.net/"
          //---- indicator settings
          #property indicator_separate_window
          #property indicator_buffers 2
          #property indicator_color1 DodgerBlue
          #property indicator_color2 Red
          #property indicator_width1 2
          #property indicator_level1 45
          #property indicator_level2 55
          //---- indicator parameters
          extern int RSI_Period=10;
          extern int MA_Period=10;
          //---- indicator buffers
          double RSI_Buffer[];
          double MA_Buffer[];

          //+------------------------------------------------------------------+
          //| Custom indicator initialization function |
          //+------------------------------------------------------------------+
          int init()
          {
          //---- drawing settings
          SetIndexStyle(0,DRAW_LINE);
          SetIndexStyle(1,DRAW_LINE);
          SetIndexDrawBegin(1,MA_Period);
          IndicatorDigits(Digits);

          //---- indicator buffers mapping
          SetIndexBuffer(0,RSI_Buffer);
          SetIndexBuffer(1,MA_Buffer);
          //---- name for DataWindow and indicator subwindow label
          IndicatorShortName("RSI("+RSI_Period+")MA("+MA_Period+")");
          SetIndexLabel(0,"RSI");
          SetIndexLabel(1,"MA on RSI");
          //---- initialization done
          return(0);
          }
          //+------------------------------------------------------------------+
          //| RSI and Ma on RSI |
          //+------------------------------------------------------------------+
          int start()
          {
          int limit;
          int counted_bars=IndicatorCounted();
          //---- last counted bar will be recounted
          if(counted_bars>0) counted_bars--;
          limit=Bars-counted_bars;
          //---- macd counted in the 1-st buffer
          for(int i=0; i<limit; i++)
          RSI_Buffer*= iRSI(NULL, 0, RSI_Period, PRICE_CLOSE, i);
          //---- signal line counted in the 2-nd buffer
          for(i=0; i<limit; i++)
          MA_Buffer*=iMAOnArray(RSI_Buffer,Bars,MA_Period,0,MODE_SMA,i);
          //---- done
          return(0);
          }
          //+------------------------------------------------------------------+

          1 Reply Last reply Reply Quote 0
          • fxDreema
            fxDreema last edited by

            Upload it and use it: http://fxdreema.com/documentation/proje ... indicators
            It checked if it can be uploaded - it's all normal.

            If you can't win the battle with custom indicator's buffers, you can try "Levels tester" block, which is the second from the top.

            1 Reply Last reply Reply Quote 0
            • T
              Tailung last edited by

              Well this works perfect. Indicator does exactly what it should do and FxDreema doen't complain. usefull

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post

              Online Users

              C
              E
              S
              T
              F
              F
              D
              J
              D

              19
              Online

              146.7k
              Users

              22.4k
              Topics

              122.6k
              Posts

              Powered by NodeBB Forums | Contributors