Adviser Ivan - the best of ilan

 

The Ilans are already worn to a crisp. And that's why it's time for the Ivan series EA.

This is a public attempt to write an EA taking into account the lack of Ilans.

Next is going to be ...

 
Vladimir Karputov:

The Ilans are already worn to a crisp. And that's why it's time for the Ivan series EA.

This is a public attempt to write an EA taking into account the lack of Ilans.

Next is going to be ...

What will happen next? Will there be a drained account as well?)
 
Vitaly Muzichenko:
What happens next? Will there be a drained account as well)?
There will be :), but in the meantime I'm collecting requirements and general principles. As well as a discussion of Ilan's good and bad traits. All in order to raise Ivan.
 

One of the principles for opening positions:

  • Sell if the closing price two bars ago was above the closing price on the previous bar and the RSI is above the RsiMinimum (oversold area).
  • Buy if the closing price two bars ago was lower than the closing price on the previous bar and the RSI is lower than the RsiMaximum (overbought zone).
To find and visualize such zones, we will create a special Expert Advisor: "Ivan Visualization of entrances.mq5". The Expert Advisor will do the following: when finding an entry, it draws objects

OBJ_ARROW_BUY

buy

Sign "Buy"

OBJ_ARROW_SELL

sell

The "Sell" sign


These objects will be visible in the MetaTrader 5 visual testing. The Expert Advisor will search for entry conditions only on a new bar, as there is no need to work inside the bar.

 

Oh, what a funny nameIvan is...

)

 
Renat Akhtyamov:

Oh, what a funny nameIvan...

)

Come on.)

 
Vladimir Karputov:

One of the principles for opening positions:

  • Sell if the closing price two bars ago was above the closing price on the previous bar and the RSI is above the RsiMinimum (oversold area).
  • Buy if the closing price two bars ago was lower than the closing price on the previous bar and the RSI is lower than the RsiMaximum (overbought zone).
...
By the way, this is immediately confusing: from which bar should we take the RSI value?
 
Vladimir Karputov:
By the way, here's the immediate confusion: from which bar should I take the RSI value?
Well, it's kind of like an hourly period
 
альмир мир:
Well, it kind of takes it from one hour period

"Hourly period" is the timeframe of the chart on which the EA has been attached.

I asked about what bar number should (or better) take the value of the RSI indicator.

 

This is what came out with the visualisation:

Screenshots of the MetaTrader trading platform

EURUSD, H1, 2017.02.13

MetaQuotes Software Corp., MetaTrader 5, Demo

Visualization of entrances

EURUSD, H1, 2017.02.13, MetaQuotes Software Corp.


I am also attaching the chart template ("temp.tpl") obtained after visual testing (don't pay attention to Moving Average - they are not used yet).

Files:
temp.tpl  1141 kb
 

Generally, I think the entry conditions are

  • Buy if the close price two bars ago was below the close price on the previous bar and the RSI is below the RsiMaximum (overbought zone).
  • Sell if the close price two bars ago was above the close price on the previous bar and the RSI is above the RsiMinimum (oversold area).

are not the best. The RSI indicator has several entry patterns(Relative Strength Index):

  • Tops and bottoms
    The Relative Strength Index usually tops above 70 and bottoms below 30 and usually outpaces the formation of tops and bottoms on the price chart.
  • Chart Patterns
    The Relative Strength Index often forms graphic patterns, such as 'head and shoulders' or triangles, which may not show up on a price chart.
  • Failed Swing (Support and Resistance Breaks)
    Occurs when the Relative Strength Index rises above the previous high (peak) or falls below the previous low (trough).
  • Support and resistance levels
    The Relative Strength Index chart shows support and resistance levels even more clearly than the price chart.
  • Divergences
    As mentioned above, divergences occur when price makes a new high (low) but is not confirmed by a new high (low) on the RSI chart. This usually results in a price correction in the direction of the Relative Strength Index.

Entry signals from the indicator(Williams' Percent Range) may be worth considering:

Indicator values between -80% and -100% indicate an oversold condition. Values between -0% and -20% indicate that the market is overbought.

Reason: