I am trying to convert this from stockfetcher to here and having a little bit of trouble understanding how I setup variables in TC2000? SF doesnt have if statements so you have to use a count instead. I want to be able to have many of these of several days and add them all together. ROC is rate of change. Any help would be apprecitated.
/* ROC(2) Bullish Divergence Calculation */
set{2daylo, count(Fisher Transform(10) decreasing past 1 days, 1)}
set{ROCdivpos12, count(ROC(4) above ROC(4) 1 day ago, 1)}
set{ROCdivpos22, count(ROC(4) 1 day ago below ROC(2) 2 days ago, 1)}
set{ROCbulldiv12, 2daylo * ROCdivpos12}
set{ROCbulldiv22, ROCbulldiv12 * ROCdivpos22}
/* ROC(2) Bullish Divergence Calculation */
set{3daylo, count(Fisher Transform(10) decreasing past 2 days, 1)}
set{ROCdivpos13, count(ROC(4) above ROC(4) 1 day ago, 1)}
set{ROCdivpos23, count(ROC(4) 1 day ago below ROC(2) 2 days ago, 1)}
set{ROCbulldiv13, 3daylo * ROCdivpos13}
set{ROCbulldiv23, ROCbulldiv13 * ROCdivpos23}
|
nevermind I think I am going to just add a column and look for it there manually.
|
how do I create a condition to show when the formula below crossed above 0 and not just greater than zero.
(O + H + L + C - XAVG(O1 + H1 + L1 + C1, 3)) / 4
|
The CCI encoding is done on the actual OBV line, the line itself represents the OBV but green represents CCI going up and Red is CCI going down. Thanks for the assistance.
|
These also need to be used on HA candles, any help will be appreciated.
|
Per Bruce here is Fisher Transform(10)
A Fisher Transform 10 from TC2000 can be written as follows.
XAVG(LOG(2 * XAVG(((H + L) / 2 - MINL10) / (MAXH10 - MINL10), 5) / (2 - 2 * XAVG(((H + L) / 2 - MINL10) / (MAXH10 - MINL10), 5))), 3)
Looks like OBV is just represented as OBV.
|
I am in the processing of trying to move from tradingview to TC2000 if I can get all of my custom filters over and I need help with this one please:
study(title="Fisher Transform of On Balance Volume with CCI", shorttitle="DM_-_Fisher_of_OBV_CCI")
//On Balance Volume
src = close
obv = cum(change(src) > 0 ? volume : change(src) < 0 ? -volume : 0*volume)
//Fisher Transform of OBV
length = input(9, minval=2, title="Period of Fisher Transform of OBV")
high_ = highest(obv, length)
low_ = lowest(obv, length)
round_(val) => val > .99 ? .999 : val < -.99 ? -.999 : val
value = round_(.66 * ((obv - low_) / max(high_ - low_, .001) - .5) + .67 * nz(value[1]))
fish1 = .5 * log((1 + value) / max(1 - value, .001)) + .5 * nz(fish1[1])
lengthCCI = input(4, minval=1, title="CCI Length")
threshold=input(0, title="CCI threshold for OBV coding")
lengthema=input(13, title="EMA length")
signallen = input(12, title="Linear Regression Signal Line Period")
signal = linreg(fish1,signallen,0)
o=fish1
c=cci(src, lengthCCI)
fish2 = fish1[1]
plot(fish2, color=silver, title="Fast Signal Line")
plot(o, color=c>=threshold?green:red, title="OBV_CCI coded", linewidth=2)
plot(ema(o,lengthema), color=orange, linewidth=2)
plot(signal,color=red, title="Linear Regression Signal Line")
hline(0, color=maroon)
hline(0, color=maroon)
hline(0, color=maroon)
Much thanks in advance!
|
Great those match up thanks for the assistance. I might be reaching out to you for help convert another formula from tradingview to TC2000, thanks!
|
I could have messed up and now been on MSFT when I ran it, can you check your end since my free preview is gone?
|
showing 1.11 for the delta, daily TF.
|