Download MetaTrader 5
To add comments, please log in or register
Do you know that MQL5 has classes?
Karthikeyenv Venkadaswamy
97
Karthikeyenv Venkadaswamy 2016.07.13 10:40 

Hi,

I would like to create an indicator using RSI.  The indicator should predict using 3 time frame viz, PERIOD_D1, PERIOD_4H, PERIOD_1H.  An arrow should be formed in the chart window if all the 3 time frame indicate buy/sell.  Can any body help me out in coding this.

Carl Schreiber
5938
Carl Schreiber 2016.07.13 11:02  
vkarthikeyenv:

Hi,

.. Can any body help me out in coding this.

Sorry but no! One reason is that it probably already exists!
Achim Rogalski
61
Achim Rogalski 2016.07.13 11:41  

I would do it like this:

   double RSH_H1_0 = iRSI(0,PERIOD_H1,14,PRICE_TYPICAL,0);

   double RSH_H1_1 = iRSI(0,PERIOD_H1,14,PRICE_TYPICAL,1); 

   double RSH_D1_0 = iRSI(0,PERIOD_D1,14,PRICE_TYPICAL,0);

   double RSH_D1_1 = iRSI(0,PERIOD_D1,14,PRICE_TYPICAL,1);

   double RSH_H4_0 = iRSI(0,PERIOD_H4,14,PRICE_TYPICAL,0);

   double RSH_H4_1 = iRSI(0,PERIOD_H4,14,PRICE_TYPICAL,1);

   

   if(RSH_H1_0 < RSH_H1_1 && RSH_D1_0 < RSH_D1_1 && RSH_H4_0 < RSH_H4_1)  // down

   {  show arrow, play sound, etc. }

whroeder1
13602
whroeder1 2016.07.13 14:41  
vkarthikeyenv:
  1. I would like..
  2. Can any body help me...
  3. I would do it ...
  1. Don't paste code
    Play video
    Please edit your post.
    For large amounts of code, attach it.

  2. You have only three choices: Search for it, learn to code it, or pay someone. We're not going to code it FOR you.
    We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
/
To add comments, please log in or register