Indicators: Ind_2 Line+1

 

Ind_2 Line+1:

The indicator of the arbitrage situation for spread consisting from two instruments


Author: Evgeniy Trofimov

 

Well done! Thank you! He was just what I needed to write the exp....

I started to write it myself, but I haven't finished it yet...

I will study your code and plug it into expa!

It is iCustom(), isn't it?

 

Yes, thank you.

I would only note that for the currency pairs analysed in this example, it is better to set the price line of the second instrument(USDCHF) to be drawn in reverse! Then the signals of paired entry/exit will be visible much better!

 
R0MAN:

It's iCustom(), right?

Easy!

In the attached file is an example of an Expert Advisor using the indicator. +Incloud for pair trading

Files:
Tandem2.mq5  9 kb
Tandem.mqh  9 kb
 
EvgeTrofi:

Easy!

In the attached file is an example of an Expert Advisor using the indicator. +Incloud for paired trading

О! Senk-s. I'll take a closer look...

 

The most interesting thing is to catch the movement and not the pullback, which is marked on the figure. And the longer the lines are on different sides of the 0 line, the more you can usually take a profit.

 
Why is the lot on the left side so much different than the number on the right?

For example right now on the left I have 1.36, on the right I have 0.99 - it's just too different numbers.... Thanks

 
Dear Evgeniy,

Thank you for sharing your work and this great indicator.
Unfortunately, it does not apear in MT5 platform after copying it in "Indicators' folder...What could be the problem?

Thank you in advance for your time!
 
Because the values for the lots on the right are calculated taking into account the volatility of the instrument at a certain interval, and from the point of view of short-term trading it will be more correct to enter with such, or approximately such lots.
 

By the way, there is an error in the code, open it in meta-editor and you will see that the author specified an extra path to the folder, apparently where he had the programme, delete this path and compile.

#include <MovingAverages.mqh>

#include <EvgeTrofi\MoneyManagment.mqh>.

Remove EvgeTrofi

Files:
 

Those who have such symbols EURUSD.m - you need to change the code

  // Make instrument names case insensitive
  //InpSymbol1=StringUpper(Symbol1_Name);
  //InpSymbol2=StringUpper(Symbol2_Name);
  InpSymbol1=Symbol1_Name;
  InpSymbol2=Symbol2_Name;