tarzan

Intramarket Correlator L-O-L-A excerpt

Here we have an intramarket correlator taken as an excerpt from the L-O-L-A institutional trading system.

The plot displayed on the screen is the correlation index of the correlated security plotted against the security data series. Suggest simple line plots of contrasting colors.

When the plot is below the security price this is an indication of a strong negative correlation. When the plot is above the security price this is indicative of a strong positive correlation.

Provided for free by Tarzan at tradingview. or noprism@hushmail.com

plz contact for more information on L-O-L-A

*** Past performance is not necessarily indicative of future results ***

Life is like a moving picture

Nothing in life is a permanent fixture

Ray Davies
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?
//@version=2
study("Intramarket Correlator", title= "L-O-L-A exerpt Lola Multi v 6.08", overlay=true)
//
//  Life is only a moving picture
//
//  Nothing in life is a permanent fixture
//
//  We lve
//
//  We die
//
//  No one
//
//  Knows why
//
//
// here we have an exerpt from the master trading system LOLA which is available for institutional trading 

// plz contact tarzan at tradingview or noprism@hushmail.com for details
//
//         ** Past performance is not necessarily indicative of future results donkey **
//


c = navy

bgColor = (dayofweek == monday)    ? color(c, 98) :
          (dayofweek == tuesday)   ? color(c, 96) :
          (dayofweek == wednesday) ? color(c, 94) :
          (dayofweek == thursday)  ? color(c, 92) :
          (dayofweek == friday)    ? color(c, 90) : na
          
          
bgcolor(color = bgColor)

// Well I'm not the world's most physical guy but when she squeezed me tight she nearly broke my spine
//
//                            Oh my lola lo-lo-lo-lo lola


correlat = input(title = "Correlation Index", defval=1, minval=0, maxval=1, step=1)
secname = input("DX1!", title = "Security to correlate", type=string )
jimmyskew = input(title = "Jimmy Skew", defval=0, step=1, minval=0)
enter_fast = input(title = "length of correlation array[strict=20]", defval=9, minval=1)
offsetamt = input(title = "plot offset", defval=0, minval=0)
primarytrendmult = input(title = "longer term trend length adder", defval=-6, step=1)
usingprice=input(title = "price basis 0=open 1=high 2=low 3=close", defval=3, minval=0, maxval=3, step=1)
startyear =input(title = "Start year", defval=2000, step=1)
endyear =input(title = "Stop year", defval=2017, step=1)
startmonth = input(title = "Start month", defval=1, step=1)
endmonth  = input(title = "Stop month ", defval=12, step=1)

pricetouse = (usingprice == 0) ? open  : 
             (usingprice == 1) ? high  : 
             (usingprice == 2) ? low   : 
             (usingprice == 3) ? close : na 


//some globals but then again everything is global here so be careful donkeys

// pressure pressure I got pressure oh yeah oh yeah

USDX = tickerid("ICEUSA",secname)
s = security(secname, "D", pricetouse) 

currentbarnumber = n

// dk biology 

jimmy = correlation(s[jimmyskew],pricetouse[jimmyskew],(enter_fast + primarytrendmult + jimmyskew))  

differential=(pricetouse < 10 ) ? jimmy*.1 :
             (pricetouse >= 10 and pricetouse < 100) ? jimmy :
             (pricetouse >= 100 and pricetouse < 1000) ? jimmy*10 :
             (pricetouse >=1000 and pricetouse < 10000) ?jimmy*100 : jimmy*1000

plot((pricetouse+differential), color=red,style=line, offset=offsetamt, linewidth=2)


plot(close)