Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, VoroneTZ), 831 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 3 of 3 1 2 3
Re: Market Meanness Index [Re: GPEngine] #450578
04/18/15 17:34
04/18/15 17:34
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Then I think in a wrong direction, okay I will try it once again, anytime.

Meanwhile a more practical question: in the example begin of this thread jcl calculated:

Quote:
vars Trend = series(LowPass(Price,500));

vars Meanness = series(MMI(Price,200));
vars Filter = series(LowPass(Meanness,500));


Is there a relationship between the 500 periods of the LowPass-Filter for the price defining the trend, the 200 of the Meanness and the 500 for smoothing the Meaness? Is there a 'universal' ratio or is it rather a matter of optimization?

Thanks, Sphin

Re: Market Meanness Index [Re: jcl] #453204
07/11/15 21:29
07/11/15 21:29
Joined: Nov 2013
Posts: 123
Mithrandir77 Offline
Member
Mithrandir77  Offline
Member

Joined: Nov 2013
Posts: 123
Hi jcl, I noticed that in include.c the code for MMI is:

Code:
var MMI(var* Data,int TimePeriod)
{
	TimePeriod = Min(TimePeriod,1000);
	var m = Median(Data,TimePeriod);
	TimePeriod = Min(TimePeriod,g->nBar);
	if(TimePeriod <= 2) return 75;
	int i, nh=0, nl=0;
	for(i=1; i<TimePeriod; i++) {
		if(Data[i] > m && Data[i] > Data[i-1])
			nl++;
		else if(Data[i] < m && Data[i] < Data[i-1])
			nh++;
	}
	return 100.*(nl+nh)/(TimePeriod-1);
}



Why are these lines added?

TimePeriod = Min(TimePeriod,1000);
TimePeriod = Min(TimePeriod,g->nBar);
if(TimePeriod <= 2) return 75;

Re: Market Meanness Index [Re: Mithrandir77] #453234
07/13/15 07:22
07/13/15 07:22
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Safeguards. The first line limits the time period to 1000, which is needed for the Median function. The second line limits it to the data that's really available and the third line sets a lower limit for the time period.

Re: Market Meanness Index [Re: jcl] #453245
07/13/15 17:13
07/13/15 17:13
Joined: Nov 2013
Posts: 123
Mithrandir77 Offline
Member
Mithrandir77  Offline
Member

Joined: Nov 2013
Posts: 123
Thanks for the explanation!

Re: Market Meanness Index [Re: Mithrandir77] #454913
09/29/15 09:05
09/29/15 09:05
Joined: Jul 2013
Posts: 75
R
royal Offline
Junior Member
royal  Offline
Junior Member
R

Joined: Jul 2013
Posts: 75
I have a few questions concerning the MMIPeriod:

1. In the forum you use 200 and 500 as periods, in the manual 300 and 500 and in the financial hacker blog an optimized value (200-500) which is the same for both.
As Sphin already asked is there a 'universal' ratio or is it rather a matter of optimization?

2. When I want to use the MMI with daily bars, should I also use the 200-500 range, or should I break it down to 8-21? (~200/24-500/24)

Last edited by royal; 09/29/15 09:05.
Re: Market Meanness Index [Re: royal] #454920
09/29/15 10:20
09/29/15 10:20
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
The time period is a compromise: It should be longer than about 100-200 bars, otherwise the measure is not precise enough. But it should not be too long, such as much more than 500 bars, otherwise the period can cover several different market changes. It does not depend on the bar period because any bar period establishes a different market with different rules. The same asset can be trending with daily bars, but mean reversing with 1-hour bars.

Re: Market Meanness Index [Re: jcl] #454923
09/29/15 11:06
09/29/15 11:06
Joined: Jul 2013
Posts: 75
R
royal Offline
Junior Member
royal  Offline
Junior Member
R

Joined: Jul 2013
Posts: 75
Thanks for the answer, I will play around a bit with the 200-500 range laugh

Page 3 of 3 1 2 3

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1