Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Help with Indicator Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
kerryh1959
Posted : Monday, July 24, 2017 12:06:42 PM
Registered User
Joined: 9/20/2005
Posts: 149

How do I get this formula to show up on the close of the price bars? Thanks for your help in advance.

 

((MAXC21-L)/MAXC21) * 100 < BBTOP(2, 20, 0)

Bruce_L
Posted : Monday, July 24, 2017 12:31:42 PM


Worden Trainer

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

You could check it for the previous bar instead of the current bar. It won't "show up on the close of the price bars", but if I am understand the question correctly, it will give you the desired result at the open of the next price bar (which for most intraday bars is the same thing).

100 * (1 - L1 / MAXC21.1) < BBTOP(2, 20, 1)

That said, these two things are not on the same scale. If you want the bollinger bands to be of the formula instead of price, then it would need to be re-written.

-L1 / MAXC21.1 < AVG(-L1 / MAXC21.1, 20) + 2 * SQR(ABS(SUM((-L1 / MAXC21.1) ^ 2, 20) - 20 * AVG(-L1 / MAXC21.1, 20) ^ 2) / 20)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
kerryh1959
Posted : Monday, July 24, 2017 1:40:12 PM
Registered User
Joined: 9/20/2005
Posts: 149

What I would like to see is for a dot to appear on the price bar when this formula, ((MAXC21-L)/MAXC21) * 100, crosses below the top bollinger band. Thanks again.

Bruce_L
Posted : Monday, July 24, 2017 1:46:13 PM


Worden Trainer

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

Is the Bollinger Band applied to price? If so, it cannot be done.

If the Bollinger Band is applied to your formula, you could plot at a dot at the closing price by plotting the following Formula in a Custom PCF Indicator using the Dot Plot Style in the same pane and scale as price.

IIF(XDOWN(-L1 / MAXC21.1, AVG(-L1 / MAXC21.1, 20) + 2 * SQR(ABS(SUM((-L1 / MAXC21.1) ^ 2, 20) - 20 * AVG(-L1 / MAXC21.1, 20) ^ 2) / 20)), C, 1 / 0)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
kerryh1959
Posted : Tuesday, July 25, 2017 12:20:43 AM
Registered User
Joined: 9/20/2005
Posts: 149

Bruce, I appreciate your effort but the formula is not working correctly. I've attached a copy of the chart showing what I'm looking for. Hope this helps.

 

Bruce_L
Posted : Tuesday, July 25, 2017 9:29:17 AM


Worden Trainer

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

I am not seeing any images. The best topic of which I'm aware on how to post images in the forums is Inserting A Chart into A Worden post.

Maybe if we make this for the current bar instead of the previous bar (but then it won't wait until the next bar opens to make the dot).

IIF(XDOWN(-L / MAXC21, AVG(-L / MAXC21, 20) + 2 * SQR(ABS(SUM((-L / MAXC21) ^ 2, 20) - 20 * AVG(-L / MAXC21, 20) ^ 2) / 20)), C, 1 / 0)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
kerryh1959
Posted : Tuesday, July 25, 2017 10:31:04 AM
Registered User
Joined: 9/20/2005
Posts: 149

This is what I wanted. Thanks Bruce

Swamishanmuga
Posted : Wednesday, July 26, 2017 6:43:56 AM
Registered User
Joined: 4/5/2016
Posts: 2

I would like to plot as indicator, latest high opening & next latest high openings compared to today's  price action for life time of stock..(similar to pivot points)

For example, i could indicator with Max(O,10) for 10 days, but how could I do the same for life time ?

How could i do it in levels? first max and second etc..

Bruce_L
Posted : Wednesday, July 26, 2017 9:28:50 AM


Worden Trainer

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

There really isn't a way to write this for the lifetime of the stock.

It is possible to check if the current open is the highest over the entire available history of the stock but there isn't a way to do this using a formula, or to just get the value of the highest open if it isn't the current bar.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
kerryh1959
Posted : Wednesday, July 26, 2017 9:51:17 AM
Registered User
Joined: 9/20/2005
Posts: 149

Good morning Bruce, would you please give me the formula for when the indicator is moving back above the lower bollinger band. Thanks again.

Bruce_L
Posted : Wednesday, July 26, 2017 9:54:54 AM


Worden Trainer

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

Please try the following.

IIF(XUP(-L / MAXC21, AVG(-L / MAXC21, 20) - 2 * SQR(ABS(SUM((-L / MAXC21) ^ 2, 20) - 20 * AVG(-L / MAXC21, 20) ^ 2) / 20)), C, 1 / 0)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Swamishanmuga
Posted : Wednesday, July 26, 2017 5:44:09 PM
Registered User
Joined: 4/5/2016
Posts: 2

Got it. Is it possible to find past 3 highest open prices (& closing lower) in past 6 months and mark them with horizontal lines?

Is it possible to code the same?

Thanks 

QUOTE (Bruce_L)

There really isn't a way to write this for the lifetime of the stock.

It is possible to check if the current open is the highest over the entire available history of the stock but there isn't a way to do this using a formula, or to just get the value of the highest open if it isn't the current bar.

Bruce_L
Posted : Thursday, July 27, 2017 9:50:50 AM


Worden Trainer

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

It is theoretically possible to write such formulas.

PCF for Order Statistics

And this technique can even be optimized somewhat using IIF() and CountTrue() functions. That said, writing a formula to find the 3 highest open prices in the last 6 months results in a formula which is way to long and slow to be practical or post in the forums.



-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.