LazyBear

Indicator: Krivo Index [Forex]

Krivo index, suggested by Richard Krivo, tries to quantify the "strength" of a currency by checking how many of its pairs are trading strongly (close above 200sma). As you can see from the chart, KI gives an excellent overview of their strength. Note how it correctly points out the JPY crash (Nov 2012).

I decided to implement KI for each currency separately to be compliant with Pine requirements. Also, this enables to add only the needed currency KI scripts (for ex., just CAD_KI and USD_KI). You can add the needed currency KI scripts and merge them all together to form a chart like this. Make sure you "right click" on all and select "Scale Right" (or "Scale Left". Thing to note is all KIs shd             be aligned to the same scale).

I have published KI for only 5 currencies now, but can add more on request. BTW             , this index is usable on all time frames.

More info on KrivoIndex:
-----------------------------
http://www.dailyfx.com/forex/education/trading_tips/post_of_the_day/2011/06/15/How_to_Create_a_Trading_Edge_Know_the_Strong_and_the_Weak_Currencies.html

JPY crashing:
-----------------------------
http://webcache.googleusercontent.com/search?q=cache:Q4NcRl6oSgQJ:www.madhedgefundtrader.com/surprise-japanese-election-sends-yen-crashing/+&cd=4&hl=en&ct=clnk&gl=us

Euro             Slump:
-----------------------------
http://www.bloomberg.com/news/2014-05-22/euro-set-for-3-week-slide-before-german-sentiment-eu-elections.html

Please see the comment below for the complete list of currency pairs I used for deriving these indexes.
Remove from Favorite Scripts Add to Favorite Scripts
//
// @author LazyBear
//
// If you use this code in its original/modified form, do drop me a note. 
//
study("EUR Krivo Index [LazyBear]", shorttitle="EURKI_LB")

src=close
lengthMA=input(200)

// Helper fns
calc_score(s, l) =>
    ma = sma(s, l)
    s >= ma ? 1 : -1

calc_invscore(s, l) =>
    score=calc_score(s,l)
    -1 * score

// EUR 
ieurchf=security("FX:EURCHF", period, src)
ieurusd=security("FX:EURUSD", period, src)
ieurdkk=security("FX:EURDKK", period, src)
ieurjpy=security("FX:EURJPY", period, src)
ieurpln=security("FX:EURPLN", period, src)
ieurgbp=security("FX:EURGBP", period, src)
ieursek=security("FX:EURSEK", period, src)
ieurcad=security("FX:EURCAD", period, src)
ieurnok=security("FX:EURNOK", period, src)
ieurhuf=security("FX:EURHUF", period, src)
ieurtry=security("FX:EURTRY", period, src)
ieuraud=security("FX:EURAUD", period, src)
ieurnzd=security("FX:EURNZD", period, src)
ieurczk=security("FX:EURCZK", period, src)

// Calculate KI
eur_t = calc_score(ieurusd, lengthMA) +
        calc_score(ieurchf, lengthMA) + 
        calc_score(ieurjpy, lengthMA) + 
        calc_score(ieurdkk, lengthMA) + 
        calc_score(ieurpln, lengthMA) + 
        calc_score(ieurgbp, lengthMA) + 
        calc_score(ieursek, lengthMA) + 
        calc_score(ieurcad, lengthMA) + 
        calc_score(ieurnok, lengthMA) + 
        calc_score(ieurhuf, lengthMA) + 
        calc_score(ieurtry, lengthMA) + 
        calc_score(ieuraud, lengthMA) + 
        calc_score(ieurnzd, lengthMA) + 
        calc_score(ieurczk, lengthMA) 
        
plot(eur_t, color=maroon, linewidth=2, title="EUR KI")
How the following can be done in thinkscript?

// Helper fns
calc_score(s, l) =>
ma = sma(s, l)
s >= ma ? 1 : -1

calc_invscore(s, l) =>
score=calc_score(s,l)
-1 * score
Reply
Hi LazyBear, love your work, but this script seems to be incomplete or something. it ends at 53 lines of code and doesn't load for me. Please help
Reply
Does it take forever to load?
Reply
Kiwi and Aussie dollars would be nice additions. I would attempt it and post but wouldnt want to butcher your work. Thanks.
Reply
LazyBear PRO coondawg71
Let me know the pairs u want to include in each. Thanks.
Reply
Another cracker..thanks again ..
+1 Reply
yw.
Reply
Following currency pairs are used for calculating their respective KIs.

EUR
------

EURCHF
EURUSD
EURDKK
EURJPY
EURPLN
EURGBP
EURSEK
EURCAD
EURNOK
EURHUF
EURTRY
EURAUD
EURNZD
EURCZK

GBP:
------
GBPAUD
GBPCAD
GBPCHF
GBPJPY
GBPNZD
GBPSEK
GBPUSD
EURGBP

USD
-----

USDCAD
USDCHF
USDCNH
USDCZK
USDDKK
USDHKD
USDHUF
USDILS
USDJPY
USDMXN
USDNOK
USDPLN
USDRUB
USDSEK
USDSGD
USDTRY
USDZAR
AUDUSD
EURUSD
GBPUSD
NZDUSD

JPY
------

AUDJPY
CADJPY
CHFJPY
EURJPY
GBPJPY
HKDJPY
NOKJPY
NZDJPY
SEKJPY
SGDJPY
TRYJPY
USDJPY
ZARJPY

CAD
---------
CADCHF
CADJPY
AUDCAD
EURCAD
GBPCAD
NZDCAD
USDCAD
+1 Reply
United States
United Kingdom
India
Deutschland
France
España
Italia
Polska
Türkiye
Россия
Brasil
Indonesia
Malaysia
ประเทศไทย
Việt Nam
日本
한국
简体
繁體
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Priority Support Contact Support Ideas Published Followers Following Private Messages Chat Sign Out