Some signs of the right TCs - page 9

 
Petros Shatakhtsyan:

Why is it off topic?

When we increase the price or multiply it by a constant, the nature of the price movement does not change.

Perhaps I misinterpreted "stability test". If it's about assessing the robustness of the TS, then off topic.

 
fxsaber:

On flipping and even shuffling, I want to do some research.

In the comments it was suggested to think about the behaviour of the TS after time inversion - ticks go in the opposite direction (from future to past), as if the rewind was switched on.

There you can also read, on which symbols the inversion may not affect the result of the TS, and for which it is a serious change of market patterns.

Fortunately, forex symbols should not, in theory, destroy market patterns with this time inversion. I found it interesting to test this on one of my TS.


First, the code of tick series inversion in MQL5.

int TimeDayOfWeek( const datetime Date )
{
  MqlDateTime mTime;
  
  TimeToStruct(Date, mTime);
  
  return(mTime.day_of_week);
}

#define  HOUR 3600
#define  DAY (24 * HOUR)
#define  WEEK 7

// https://www.mql5.com/ru/forum/170953/page8#comment_6940794
datetime GetTimeDayOfWeek( const datetime TimeSource, const int Shift = 0, const ENUM_DAY_OF_WEEK Day = SUNDAY )
{
  const datetime Res = TimeSource / DAY * DAY;
  
  return(Res - (((WEEK + (TimeDayOfWeek(Res) - Day)) % WEEK) + Shift * WEEK) * DAY);
}

void ReverseTick( MqlTick &Tick, const long &Offset )
{
  Tick.time_msc = Offset - Tick.time_msc;
  Tick.time = (datetime)(Tick.time_msc / 1000);
  
  return;
}

// Инверсирование времени.
void ReverseTicks( MqlTick &Ticks[] )
{
  const int Size = ArraySize(Ticks);
  
  if (Size)
  {
    const long Offset = (long)(GetTimeDayOfWeek(Ticks[0].time, 0, MONDAY) + GetTimeDayOfWeek(Ticks[Size - 1].time, -1, SATURDAY)) * 1000;

    for (int i = 0; i < Size; i++)
      ReverseTick(Ticks[i], Offset);

    ArrayReverse(Ticks);
  }

  return;  
}


On the basis of this function the script that creates the inverted symbol is attached. We will work with it. The results are as follows.


The Optimizer's best pass on the straight symbol.


The same pass on the time inverted symbol.


No inference.

Files:
 

fxsaber:

There you could also read on which symbols the inversion may not affect the result of the TS, and for which it is a serious change in market patterns.

Not surprising at all. Especially if trading on indicator/signals is used. The reverse order of ticks, draws a different picture. Which leads to the indicators giving more/less entry/exit signals.
This is the simplest thing that comes to mind. But if you dig deeper, there will be many details. And all because of the change of tick patterns.

 
Konstantin Nikitin:

Nothing surprising at all. Especially if trading on indicator/s signals is used. Reverse order of ticks, draws a different picture. Which leads to the indicators giving more/less entry/exit signals.
This is the simplest thing that comes to mind. But if you dig deeper, there will be many details. And all because of the change of tick patterns.

It's as if the entry was taken out of context. You must have had some conclusions before that. I haven't understood anything from those sentences so far.

 
Nikolai Semko:
I would add the main thing:
  • has no period-dependent parameters.
  • operation of the TS does not depend on the current chart timeframe
  • TS operation does not depend on the symbol-instrument
  • the whole setting of TS - is only a setting of risk management (the size of used deposit)

Storyteller...

 
Алексей Тарабанов:

Storyteller...

He's got a point...

most likely in everything and breathlessly watch the reaction... silently...

but I'd like to continue the banquet, so to speak.

;)

 
Renat Akhtyamov:

He's got a point...

probably in everything and breathlessly watching for a reaction... silently.

but I'd like to continue the banquet, so to speak.

;)

Just Martingale. Perfect.

 
fxsaber:

...

For example, take EURUSD. Ran the TS, getting a number of entries.

Then we created the symbol 100/EURUSD. Then we ran the TS. Entries should coincide with the original ones.

If this does not happen (99%), the TS is not written correctly.

I do not understand how TS should react to symbols taken to some degree.

I should clarify it. For 100/EURUSD inputs and outputs should switch places or change the direction of transaction opening (sell instead of buy). The sign of change of the inverse value is opposite at the same time interval. What transformations are appropriate - I think monotonic ones on the entire timeframe. Both positive multiplication and logarithm by any base.

After all, everyone will draw where they should have bought, where they should have sold, if the history of the rate already exists - buy at the lows and sell at the highs. Transformations with a monotonic function preserve the location of extrema, that's enough.

 
Vladimir:

We should clarify. For 100/EURUSD the entries and exits should be reversed or the direction of trade opening should be reversed (sell instead of buy).

Of course, the direction will change, but not the time.

The sign of change in the opposite direction at the same time interval. What transformations are appropriate - I think monotonic ones on the entire timeframe. Both positive exponentiation and logarithm on any basis.

After all, everyone will draw where they should have bought, where they should have sold, if the history of the rate already exists - buy at the lows and sell at the highs. Transformations with a monotonic function preserve the location of extrema, that's enough.

This transformation will indeed keep local extrema in place. There is only one function that will be able to identify them - the ZigZag with a zero min knee.

Local extrema identified through a ZigZag with a different size of the min knee (the minimum relative price change between extrema) or non-SigZag (any other function), will not coincide after multiplication by the monotonic function.


The zero ZigZag invariant in your proposed transformation, unfortunately, does not allow for the modified series to return to the original series. Therefore the transformation cannot but change the TC result for all monotone functions.


However, for some specific functions the inverse transformation is possible. I mentioned the function constant. It's quite elementary there.

You pointed to a more general example - multiplication by a linear (in time) function. However, there you need to have at least a small (where there are at least two local extrema) interval of the original price series for an inverse transformation.


At the same time, in reality we do not have such an interval of initial price series. This is even if we leave aside the not entirely clear economic interpretation of such a transformation. Perhaps multiplication by a linear function is a hidden inflation of one of the assets.


All in all, unfortunately, there is no way to generalise about multiplication by a constant. But the idea was very interesting, thank you.

 
Renat Akhtyamov:

He's got a point...

he's just right.
Reason: