Registered User Joined: 5/12/2016 Posts: 13
|
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}
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
There isn't a way to set up user defined variables in TC2000. I don't really understand the code in your post.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|