Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Found on Search Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
traderlady
Posted : Thursday, March 21, 2019 11:00:22 PM
Registered User
Joined: 10/7/2004
Posts: 1,178

Hi Bruce,

Through search, I found this useful PCF Indicator coded by you.  I intend to use this transformed into a 1-Ago indicator as a column. 

I've tested the original below as a column and it does work that way.

IIF(L > H1, 1, IIF(H < L1, -1, IIF(L > MINH2.1, 2, IIF(H < MAXL2.1, -2, IIF(L > MINH3.1, 3, IIF(H < MAXL3.1, -3, IIF(L > MINH4.1, 4, IIF(H < MAXL4.1, -4, IIF(L > MINH5.1, 5, IIF(H < MAXL5.1, -5, IIF(L > MINH6.1, 6, IIF(H < MAXL6.1, -6, IIF(L > MINH7.1, 7, IIF(H < MAXL7.1, -7, IIF(L > MINH8.1, 8, IIF(H < MAXL8.1, -8, IIF(L > MINH9.1, 9, IIF(H < MAXL9.1, -9, IIF(L > MINH10.1, 10, IIF(H < MAXL10.1, -10, IIF(L > MINH11.1, 11, IIF(H < MAXL11.1, -11, IIF(L > MINH12.1, 12, IIF(H < MAXL12.1, -12, IIF(L > MINH13.1, 13, IIF(H < MAXL13.1, -13, IIF(L > MINH14.1, 14, IIF(H < MAXL14.1, -14, IIF(L > MINH15.1, 15, IIF(H < MAXL15.1, -15, IIF(L > MINH16.1, 16, IIF(H < MAXL16.1, -16, IIF(L > MINH17.1, 17, IIF(H < MAXL17.1, -17, IIF(L > MINH18.1, 18, IIF(H < MAXL18.1, -18, IIF(L > MINH19.1, 19, IIF(H < MAXL19.1, -19, IIF(L > MINH20.1, 20, IIF(H < MAXL20.1, -20, IIF(L > MINH21.1, 21, IIF(H < MAXL21.1, -21, IIF(L > MINH22.1, 22, IIF(H < MAXL22.1, -22, IIF(L > MINH23.1, 23, IIF(H < MAXL23.1, -23, IIF(L > MINH24.1, 24, IIF(H < MAXL24.1, -24, IIF(L > MINH25.1, 25, IIF(H < MAXL25.1, -25, IIF(L > MINH26.1, 26, IIF(H < MAXL26.1, -26, IIF(L > MINH27.1, 27, IIF(H < MAXL27.1, -27, IIF(L > MINH28.1, 28, IIF(H < MAXL28.1, -28, IIF(L > MINH29.1, 29, IIF(H < MAXL29.1, -29, IIF(L > MINH30.1, 30, IIF(H < MAXL30.1, -30, IIF(L > MINH31.1, 31, IIF(H < MAXL31.1, -31, IIF(L > MINH32.1, 32, IIF(H < MAXL32.1, -32, IIF(L > MINH33.1, 33, IIF(H < MAXL33.1, -33, IIF(L > MINH34.1, 34, IIF(H < MAXL34.1, -34, IIF(L > MINH35.1, 35, IIF(H < MAXL35.1, -35, IIF(L > MINH36.1, 36, IIF(H < MAXL36.1, -36, IIF(L > MINH37.1, 37, IIF(H < MAXL37.1, -37, IIF(L > MINH38.1, 38, IIF(H < MAXL38.1, -38, IIF(L > MINH39.1, 39, IIF(H < MAXL39.1, -39, IIF(L > MINH40.1, 40, IIF(H < MAXL40.1, -40, IIF(L > MINH41.1, 41, IIF(H < MAXL41.1, -41, IIF(L > MINH42.1, 42, IIF(H < MAXL42.1, -42, IIF(L > MINH43.1, 43, IIF(H < MAXL43.1, -43, IIF(L > MINH44.1, 44, IIF(H < MAXL44.1, -44, IIF(L > MINH45.1, 45, IIF(H < MAXL45.1, -45, IIF(L > MINH46.1, 46, IIF(H < MAXL46.1, -46, IIF(L > MINH47.1, 47, IIF(H < MAXL47.1, -47, IIF(L > MINH48.1, 48, IIF(H < MAXL48.1, -48, IIF(L > MINH49.1, 49, IIF(H < MAXL49.1, -49, IIF(L > MINH50.1, 50, IIF(H < MAXL50.1, -50, 0))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

Wow, are we lucky to have a master mathematician at Worden!

traderlady
 

Bruce_L
Posted : Friday, March 22, 2019 10:45:18 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

The best way to do this is to just plot the formula as a Custom PCF Indicator and add a 1-period simple moving average with an offset of 1.

IIF(L1 > H2, 1, IIF(H1 < L2, -1, IIF(L1 > MINH2.2, 2, IIF(H1 < MAXL2.2, -2, IIF(L1 > MINH3.2, 3, IIF(H1 < MAXL3.2, -3, IIF(L1 > MINH4.2, 4, IIF(H1 < MAXL4.2, -4, IIF(L1 > MINH5.2, 5, IIF(H1 < MAXL5.2, -5, IIF(L1 > MINH6.2, 6, IIF(H1 < MAXL6.2, -6, IIF(L1 > MINH7.2, 7, IIF(H1 < MAXL7.2, -7, IIF(L1 > MINH8.2, 8, IIF(H1 < MAXL8.2, -8, IIF(L1 > MINH9.2, 9, IIF(H1 < MAXL9.2, -9, IIF(L1 > MINH10.2, 10, IIF(H1 < MAXL10.2, -10, IIF(L1 > MINH11.2, 11, IIF(H1 < MAXL11.2, -11, IIF(L1 > MINH12.2, 12, IIF(H1 < MAXL12.2, -12, IIF(L1 > MINH13.2, 13, IIF(H1 < MAXL13.2, -13, IIF(L1 > MINH14.2, 14, IIF(H1 < MAXL14.2, -14, IIF(L1 > MINH15.2, 15, IIF(H1 < MAXL15.2, -15, IIF(L1 > MINH16.2, 16, IIF(H1 < MAXL16.2, -16, IIF(L1 > MINH17.2, 17, IIF(H1 < MAXL17.2, -17, IIF(L1 > MINH18.2, 18, IIF(H1 < MAXL18.2, -18, IIF(L1 > MINH19.2, 19, IIF(H1 < MAXL19.2, -19, IIF(L1 > MINH20.2, 20, IIF(H1 < MAXL20.2, -20, IIF(L1 > MINH21.2, 21, IIF(H1 < MAXL21.2, -21, IIF(L1 > MINH22.2, 22, IIF(H1 < MAXL22.2, -22, IIF(L1 > MINH23.2, 23, IIF(H1 < MAXL23.2, -23, IIF(L1 > MINH24.2, 24, IIF(H1 < MAXL24.2, -24, IIF(L1 > MINH25.2, 25, IIF(H1 < MAXL25.2, -25, IIF(L1 > MINH26.2, 26, IIF(H1 < MAXL26.2, -26, IIF(L1 > MINH27.2, 27, IIF(H1 < MAXL27.2, -27, IIF(L1 > MINH28.2, 28, IIF(H1 < MAXL28.2, -28, IIF(L1 > MINH29.2, 29, IIF(H1 < MAXL29.2, -29, IIF(L1 > MINH30.2, 30, IIF(H1 < MAXL30.2, -30, IIF(L1 > MINH31.2, 31, IIF(H1 < MAXL31.2, -31, IIF(L1 > MINH32.2, 32, IIF(H1 < MAXL32.2, -32, IIF(L1 > MINH33.2, 33, IIF(H1 < MAXL33.2, -33, IIF(L1 > MINH34.2, 34, IIF(H1 < MAXL34.2, -34, IIF(L1 > MINH35.2, 35, IIF(H1 < MAXL35.2, -35, IIF(L1 > MINH36.2, 36, IIF(H1 < MAXL36.2, -36, IIF(L1 > MINH37.2, 37, IIF(H1 < MAXL37.2, -37, IIF(L1 > MINH38.2, 38, IIF(H1 < MAXL38.2, -38, IIF(L1 > MINH39.2, 39, IIF(H1 < MAXL39.2, -39, IIF(L1 > MINH40.2, 40, IIF(H1 < MAXL40.2, -40, IIF(L1 > MINH41.2, 41, IIF(H1 < MAXL41.2, -41, IIF(L1 > MINH42.2, 42, IIF(H1 < MAXL42.2, -42, IIF(L1 > MINH43.2, 43, IIF(H1 < MAXL43.2, -43, IIF(L1 > MINH44.2, 44, IIF(H1 < MAXL44.2, -44, IIF(L1 > MINH45.2, 45, IIF(H1 < MAXL45.2, -45, IIF(L1 > MINH46.2, 46, IIF(H1 < MAXL46.2, -46, IIF(L1 > MINH47.2, 47, IIF(H1 < MAXL47.2, -47, IIF(L1 > MINH48.2, 48, IIF(H1 < MAXL48.2, -48, IIF(L1 > MINH49.2, 49, IIF(H1 < MAXL49.2, -49, IIF(L1 > MINH50.2, 50, IIF(H1 < MAXL50.2, -50, 1 / 0))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
traderlady
Posted : Friday, March 22, 2019 11:03:36 AM
Registered User
Joined: 10/7/2004
Posts: 1,178

I am not sure how to follow your instructions for how to transform your original formula into a 1-Ago formula when I want to use the 1-Ago as a column.

(I already know how to plot the Magnitude formula on a chart and how to place the original as a column)

Bruce_L
Posted : Friday, March 22, 2019 11:07:59 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

I you already have the formula plotted on the chart, add a moving average indicator to the plot.

Then edit the moving average indicator.

You will want to set both the period and offset to 1.

You could then click on the moving average and select Copy to WatchList or Report if you wanted to us the value as a WatchList column.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
traderlady
Posted : Friday, March 22, 2019 11:21:28 AM
Registered User
Joined: 10/7/2004
Posts: 1,178

Thanks for the complete explanation.  I'll try that.

traderlady
Posted : Friday, March 22, 2019 11:24:20 AM
Registered User
Joined: 10/7/2004
Posts: 1,178

Even old dogs can learn new tricks!  :>)  Thanks, Bruce.

Bruce_L
Posted : Friday, March 22, 2019 11:31:57 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

You're welcome.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.