Pair trading and multicurrency arbitrage. The showdown. - page 97

 
mytarmailS #:

Show me the code, please.

at first glance, in MQL:

for(int i=1;i<ArraySize(usdxxx);i++) {

    logusdxxx[i]=MathLog(usdxxx[0])-MathLog(usdxxx[i]) ;

}

MathLog10 instead of MathLog - grading will be more convenient

 
Maxim Kuznetsov #:

just off the top of my head, in MQL:

for(int i=1;i<ArraySize(usdxxx);i++) {

    logusdxxx[i]=MathLog(usdxxx[0])-MathLog(usdxxx[i]) ;

}

MathLog10 instead of MathLog - grading will be more convenient

It turned out like this


 
Maxim Kuznetsov #:


on what timeframe do you watch the indicator?

 
mytarmailS #:

It went like this


It looks like it - all on a common scale and moving synchronously.

I just don't make candlesticks so as not to overload the chart.

 
mytarmailS #:

on what timeframe do you watch the indicator?

on any timeframe I want to watch :-) from M1 to D1.

intraday of course M1-M5

 
Maxim Kuznetsov #:

whatever I want to watch :-) from M1 to D1.

intraday of course M1-M5

last day on m1 looks like this ?


 
mytarmailS #:

Is this what the last day on m1 looks like?


to the nearest sign :-)

I could have confused the code "by hand", who to subtract from whom.

 
Maxim Kuznetsov #:

to the nearest sign :-)

I could have confused the code "by hand", who to subtract from whom.

Well, that's cool.

I'll keep the code, maybe I'll need it someday.

 
mytarmailS #:

Well, it's fun.

I'll keep the code, maybe I'll need it someday.

and if you put the time in ln, it should be a lot of fun....

 
Maxim Kuznetsov #:

and if you put the time in ln, it's gonna be a lot of fun.

I can't imagine what fun it is when a simple percentage change in prices (from the beginning of the day) gives such a picture:

Are you sure you are doing it right? In fact, there is no shift at the end of the day.....

Files:
Reason: