Guidance for coding a simple indicator

 

Hi, I am new to MT5 and need some guidance to get started in programming MQL5. I am trying to write a simple indicator that:

1) Puts a Green Up arrow at the low of a bar when: the given bar's range (close - open) is more then that of bar 3 periods before

2) Puts a Red Down arrow at the high of a bar when: the given bar's range (close - open) is less then that of bar 3 periods before


For eg: if bar[0] is the current bar and if bar[3] is the bar 3 periods ago and 

IF (bar[0].open - bar[0].close) > (bar[3].open - bar[3].close)

    then put a GREEN UP arrow at the low of bar[0]

ELSE

   put a RED DOWN arrow at the high of bar[0]


Would be very helpful if someone can provide MQL5 code for this.


Thanks in advance !

 
You can search in CodeBase or in the Market. If no luck, you can hire someone to code it for you in Freelance section.  Regards.
MQL5 Code Base
MQL5 Code Base
  • www.mql5.com
You don't know where to start learning the MQL5 or MQL4 programming language? Various programs for your MetaTrader terminal are available here. Download and study published code examples, develop your own indicators and Expert Advisors. Publish your applications in the largest library of MQL5 and MQL4 codes, and they will be available in every...