I'm hoping someone can explain this to me.
Take a look at the code below. It measures a currencies "strength". But here's what confuses me, it doesn't measure a currency against the other 7 (with the exception being NZD). CAD is only measured against the USD. Why? Is this a weighting thing?
Relevant code:
I get the basic idea, but I don't understand why it's incomplete on all but NZD.
See attached indicator for full code.
Take a look at the code below. It measures a currencies "strength". But here's what confuses me, it doesn't measure a currency against the other 7 (with the exception being NZD). CAD is only measured against the USD. Why? Is this a weighting thing?
Relevant code:
Inserted Code
aMeter[USD] = NormalizeDouble((aLookup[USDJPY]+aLookup[USDCHF]+aLookup[USDCAD]+aStrength[EURUSD]+aStrength[GBPUSD]+aStrength[AUDUSD])/6,1); aMeter[EUR] = NormalizeDouble((aLookup[EURUSD]+aLookup[EURJPY]+aLookup[EURGBP]+aLookup[EURCHF]+aLookup[EURAUD])/5,1); aMeter[GBP] = NormalizeDouble((aLookup[GBPUSD]+aLookup[GBPJPY]+aLookup[GBPCHF]+aStrength[EURGBP])/4,1); aMeter[CHF] = NormalizeDouble((aStrength[USDCHF]+aStrength[EURCHF]+aStrength[GBPCHF])/3,1); aMeter[CAD] = NormalizeDouble((aStrength[USDCAD]),1); aMeter[AUD] = NormalizeDouble((aLookup[AUDUSD]+aStrength[EURAUD])/2,1); aMeter[JPY] = NormalizeDouble((aStrength[USDJPY]+aStrength[EURJPY]+aStrength[GBPJPY])/3,1); aMeter[NZD] = NormalizeDouble((aLookup[NZDUSD]+aStrength[EURNZD]+aStrength[GBPNZD]+aStrength[AUDNZD]+aLookup[NZDCAD]+aLookup[NZDCHF]+aLookup[NZDJPY])/7,1);
I get the basic idea, but I don't understand why it's incomplete on all but NZD.
See attached indicator for full code.
Attached File(s)
!xMeter v 1.3.mq4
18 KB
|
235 downloads