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

Trend Indicator on graph v17 Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
kamesh1995
Posted : Tuesday, November 21, 2017 11:08:17 PM
Registered User
Joined: 11/18/2017
Posts: 56

Hi Bruce,

I tried to plot trend indicator on the chart. I used the following formula but it is returning error.

0/ABS( (H + L + O + C)/4 < ((XAVGH6 + XAVGL6 + XAVGO6 + XAVGC6)/4) and (H + L + O + C)/4 < ((XAVGH12 + XAVGL12 + XAVGO12 + XAVGC12)/4) and (H + L + O + C)/4 < ((XAVGH18 + XAVGL18 + XAVGO18 + XAVGC18)/4) and (H + L + O + C)/4 < ((XAVGH24 + XAVGL24 + XAVGO24 + XAVGC24)/4) and (H + L + O + C)/4 < ((XAVGH30 + XAVGL30 + XAVGO30 + XAVGC30)/4))

Any change needed?

Thanks

HarleyBD
Posted : Wednesday, November 22, 2017 6:08:47 AM
Platinum Customer Platinum Customer

Joined: 6/30/2014
Posts: 60

There is nothing wrong with the code, it is a function returning numerical answers.  So when you save it, it will be saved as an indicator formular (used for plotting or used as numerical answers on a column).

Happy Trading

kamesh1995
Posted : Wednesday, November 22, 2017 11:07:54 AM
Registered User
Joined: 11/18/2017
Posts: 56

Hi,

It is not working on graph or as an indicator formula. Getting error message as "divide by 0"

 

Bruce_L
Posted : Wednesday, November 22, 2017 11:11:48 AM


Worden Trainer

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

The formula is designed to intentionally return a division by zero error when the following is false.

(H + L + O + C)/4 < ((XAVGH6 + XAVGL6 + XAVGO6 + XAVGC6)/4) and (H + L + O + C)/4 < ((XAVGH12 + XAVGL12 + XAVGO12 + XAVGC12)/4) and (H + L + O + C)/4 < ((XAVGH18 + XAVGL18 + XAVGO18 + XAVGC18)/4) and (H + L + O + C)/4 < ((XAVGH24 + XAVGL24 + XAVGO24 + XAVGC24)/4) and (H + L + O + C)/4 < ((XAVGH30 + XAVGL30 + XAVGO30 + XAVGC30)/4)

The formula just returns zero when the above formula is true. It does this so a dot gets plotted when true and nothing gets plotted when false when used as a Custom PCF Indicator set to use the Dots Plot Style.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
kamesh1995
Posted : Wednesday, November 22, 2017 11:12:43 AM
Registered User
Joined: 11/18/2017
Posts: 56

Thanks Bruce

Bruce_L
Posted : Wednesday, November 22, 2017 11:13:16 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.