Forum

How to compare dates?

Hi, I'd like to use limitation of styding the candles in history. For this reason I'm going to have two inputs: input datetime start_date = D'2020.10.26'; input datetime end_date = D'2020.12.31'; But I do not know how to make a comparison between the current date of each bar in a for loop and input

Help relate data

Hi, I have a slight problem and would appreciate if someone can help me. I want to study an arrow indicator on a given period of time (2 years for example, M1). The study is done by the script. For this reason I write the following settings to Metatrader 4: Max bars in history: 634000 Max bars in

iMAOnArray

Hello, I'd like to add a moving average to ATR (avergae true range) chart. It looks like this: - ATR is blue line - MA is red line The problem is I don't know to to read the data in MQL. Here is what I did. #property copyright "Copyright 2019, MetaQuotes Software Corp." #property link

Your indicator is too slow...

Hi, everybody. Can anybody help me understand how to make things right in my script? I'm trying to use several indicators at once, and naturally I got the problem of "your indicator is too slow..." How can I solve this problem? I NEED TO STUDY 5 PREVIOUS CANDLES. That is why I call [i+n] in each

Got invalid RSI value

Hi, could you please help me understand the problem? I'm trying to get the values of MACD main and signal lines, and RSI line of a last closed candle and a candle before it. I managed to get the right values for MACD lines, but not for RSI... rsiHandle = iRSI(_Symbol, PERIOD_CURRENT, inpRsiPeriod