Hello,

I've tried RandomWalk script that goes with Zorro (just changed dates a little bit). It compares distribution of price movements of EUR/USD price curve and random price curve:
Quote:
function run()
{
StartDate=2013;
EndDate=2017;
PlotHeight1 = 320;

vars Price = series(price());
int num = NumRiseFall(Price,20);
int x = 3*num;
if(num < 0) x += 3; // eliminate the 0 gap
plotBar("Price",x,num,1,SUM+BARS,RED);

vars Random = series(0);
Random[0] = Random[1] + random();
num = NumRiseFall(Random,20);
x = 3*num+1;
if(num < 0) x += 3;
plotBar("Random",x,0,1,SUM+BARS,BLUE);
}


The following chart is generated:

The Black Book says:
Quote:
In the chart, the height of the bars is equivalent to the number of rising or falling price series. The red bars are from the real EUR/USD price curve above, the blue bars from a curve of random numbers. The numbers on the x axis are the duration of a price movement in hours, at the right side for rising, and at the left side for falling prices. The height of a bar indicates how frequently such a rising or falling series occurs in the curve. For instance, the bar above the 3 at the right shows how often the price was rising for 3 hours in sequence. If prices would move totally random, the red bars had the same heights as the blue bars. We can see that this is not the case: rising/falling series of 3, 4, 5, or more hours occur more often in the real price curve than in the random data. 1-hour series - a price rising in the first and falling in the second hour, or vice versa - occur less often. Real prices tend to keep their direction. This effect causes the famous "fat tails" of price distributions. It exists with most assets and time frames, like minutes or days instead of hours.



However, this effect almost or completely disappears in case of Close prices: if series(priceClose()) is used instead of series(price()).
For example:


I wonder how it could be explained?
Thank you!