Study1: multi-currency analysis for scalping and beyond - page 2

 
Zhunko:
It is doubtful... The rate is instantly applied to all related pairs. Has anyone seen a real skew in forex?


Pay attention, Zhunko. The man is only looking at dollar pairs. Of course related pairs, i.e. crosses, instantly work out. So you can see the bias or one of the currencies has its movement. But that is behind the scenes.

And taking it into account through cross analysis is indeed possible. The logic is the same as for the dollar in the first post: if all pairs where this currency is present behave accordingly, then it is the currency that is moving. It is just too complicated logic. The only solution is to follow only one currency, for example USD. But then this is not an arbitrage strategy, but a trend strategy. With all its uncertainties.

 

once came up with this thing for multi-currencyanalysis, it shows the distance in pips between the first and last tick for a certain number of seconds.

 
Yurixx:


Pay attention, Zhunko. The man is only looking at dollar pairs. Of course related pairs, i.e. crosses, work out instantly. That's how you can see if it's skewed or if one currency has its own movement. But it is in the background.

And it is really possible to take it into account by cross analysis. The logic is the same as in relation to dollar in the first post: if all pairs that have this currency behave accordingly, then this currency moves. It is just too complicated logic. The only solution is to follow only one currency, for example USD. But then this is not an arbitrage strategy, but a trend strategy. With all its uncertainties.


I only look at the major currencies, because they determine all the crosses. It is very important to understand. I.e. cross analysis is the analysis of majors. For example, a EURJPY study will be complete if we investigate the product EURUSD * USDJPY. Seems like obvious things to say.

Keeping track of all currencies through the analysis of not only majors but also crosses (derived from majors) is not complicated logic, but simple.

Here is the code I used to investigate the majors. It was written quickly, but the logic is simple.

The TestAlgo script looks for all the patterns on the history from StartTime to this point. Input parameters: E1 - small radius, E2 - large radius. Depth - maximum depth in bars to search.

The SaveTestAlgo Expert Advisor saves all found patterns (requires DLL permission) as screenshots of all symbols with lines and text (as shown above) into folder experts/files.

To use as follows: open two charts (e.g. GBPJPY M1 and GBPJPY M1). On the first one, run the TestAlgo script, and on the second one, run the SaveTestAlgo Expert Advisor. Further on, the Expert Advisor does not need to be touched - it stays on the second chart. And we do all manipulations on the first chart with the script TestAlgo, changing the input parameters.

As you can see, the code of the pattern finding script is simple and short. So, the complexity of implementation is a myth.

Files:
testalgo.rar  3 kb
 
sanyooooook:

once came up with this thing for multi-currency analysis, it shows the distance in pips between the first and last tick for a certain number of seconds.

Have you investigated your own thing? Have you noticed any patterns, any peculiarities?
 
hrenfx:
Have you researched your thing? Have you noticed any patterns, any peculiarities?
You can use it to trace exactly what you call skewness, you can see which pair is lagging while the others are going up/down.
 
sanyooooook:
You can use it to trace exactly what you call misalignment, to see which pair is lagging while the others have gone up/down.

Got it. Just these lags/distortions were investigated on the history with the script (posted above) in a more general way: the distortions are analysed at all possible time intervals and the characteristics of the distortions are clearly defined - the radii.
 
hrenfx:

Here's the code I researched the majors with.

I have a minor technical comment on the code. There seems to be no need to check

    Pos = iBarShift(Symbols[i], Period(), Times[CurrentPos]);
    if (iTime(Symbols[i], Period(), Pos) < Times[CurrentPos])
      Price = iClose(Symbols[i], Period(), Pos);
    else  
      Price = iOpen(Symbols[i], Period(), Pos);

Here are the minutes of the dollar index imported into eurusd, with a daily gap. I only used the first part of the design.



You can see that iBarShift returns not only the number of the nearest bar but also the number of the bar closest to the left, i.e. it would be quite correct to simply

    Pos = iBarShift(Symbols[i], Period(), Times[CurrentPos]);
    Price = iClose(Symbols[i], Period(), Pos);

But I'm doing another check - the time must not be shorter than the time of the first bar of the requested quote, just for the tests on the history such a check would be useful, imho.

 

I understand that the topic of multi-currency analysis is much more complex than monocurrency analysis. Let's share our experiences: ideas, research, etc. What is there to hide?

I think indices in their classic form (constant weighting coefficients) are complete crap. Obviously the coefficients should be floating.

Perhaps someone has researched the topic of dynamic coefficients in index calculations.

There's so little of substance on the forum, there's a shitload of flub. Share information on multicurrency analysis, it may be useful for you too. And it certainly will not be to your detriment.

 
Candid:

I have a minor technical comment on the code. There seems to be no need to check

Let me explain with an example:

We need to look at the open price of the bar at 13:48 on the history.

EURUSD has a bar at 13:48 - we open it.

GBPUSD has a bar at 13:48 - we open it.

AUDUSD has no bar at 13:48 (quotes did not update at that time) - use the last quote that was before 13:48. For example, if the bar before 13:48 has a time of 13:47, we take its Close. Obviously, this price will also be current at 13:48.

 
hrenfx:

For example, if the bar before 13:48 has a time of 13:47, then take its Close. Obviously, this price will also be relevant at 13:48.


What if it is not 13:47 but 13:01?

Or even 13:47, there is no guarantee that the bar with time 13:48 is not missed.

If it is a hole in history ?

Reason: