[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 327

 
Merincool:

I'll give it a shot, thanks.


Thank you so much, it seems to be working.

And regarding the previous post, am I right about the array? Or am I wrong?

 
amurik61:

Your 5th parameter is 0 - i.e. the last bar!

make it like this:

Excerpt from doc:

double iRSI( string symbol, int timeframe, int period, int applied_price, int shift)
Calculates the Relative strength index and returns its value.
Parameters:
symbol - Symbol the data of which should be used to calculate indicator. NULL means the current symbol.
timeframe - Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.
period - Number of periods for calculation.
applied_price - Applied price. It can be any of Applied price enumeration values.
shift - Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of time ago).

Thank you very much, it seems to be working

and about the previous post, about the array, am i right? or not

 
Merincool:


Thank you very much, it seems to be working.

And regarding the previous post, about the array, am I right or not?


I made the same mistake myself, I've been programming for 5 years, I thought it made no difference which side the array was filled from :)

But MQL4 proves that there is a difference, however I would like to understand EE. Gurus, clarify?

 
 

Is it possible to get the indicator lines to be shown on the chart during the test and not after its completion?

Respectfully, Shurkin.

 
Shurkin:

Is it possible to get the indicator lines to be shown on the chart during the test and not after its completion?

Regards, Shurkin.


The easiest and dumbest way:

  • Start the test with visualization.
  • Click "Pause".
  • Manually add the required Indices to the chart.
  • Release the Pause.
 
amurik61:

Thanks to colleagues in MQL5!

mql4-russian.chm -http://ruforum.mt5.com/threads/10397-mql4-russian.chm?p=1067754&viewfull=1#post1067754



Oh, that's what I need!!! And one more question, I don't know too much about the concept, where to read it in which section, arrays are not the same
 
Merincool:

I am trying to write a simple indicator based on RSI (the analogue is RandomIndicatorSignals mq4).

I am trying to write a simple indicator based on RSI (for the analogue of this indicator RandomIndicatorSignals.mq4 from the article MQL4 Language for Dummies. Custom Indicators (Part 1)(https://www.mql5.com/ru/articles/1500).

The idea is simple, if RSI draws a top or a trough, it draws an arrow on the chart.

It seems to be ok, but in my opinion RSI value buffer for each candle is not filled, because of this it doesn't work. Here is the code.


If you remove the logical errors, it works fine

Files:
rsibarrow.mq4  3 kb
 
Vinin:


If you remove the logical errors, everything works fine


))) Thanks for the tutorial, it means I'm not completely lost in programming)))) I will continue to learn
 
Sepulca:


The easiest and dumbest way:

  • Start the test with the visualisation.
  • Press Pause.
  • Manually add the desired indices to the chart.
  • Release "Pause".
Thank you. Shurkin
Reason: