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 |

Finding the minimum value of a MACD Histogram bar Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
IBJAMIN
Posted : Saturday, January 31, 2015 4:01:38 PM
Registered User
Joined: 4/19/2012
Posts: 11

I would like to find the minimum value of the MACD Histogram over the last 10 days and perform an operation on it.

Obviously I can get the MACD histogram bar values, either using the MACD indicator or calculating it directly in a custom PCF. But how can I determine what the minimum value is for the time period involved?

Unlike other indicators that have their own PCF code “operators” (BOP, STOC, TSV) I am not aware of a MACD operator that I could hook up with the MIN operator [for instance,

Min(MACD12.26.9,10).]

Perhaps it exists and I just haven’t found it?

I looked into Change Data Source, but I don’t see any “minimum” indicator (say, for Price [c]) which I could then “redirect” and then assign to another indicator.

Is there a reserved-name for a “generic” variable that I can use in a PCF (say, “DataSourceRangeVariable”) that I could use as the basis for my mathematical operation, which then would take on the value of the selected Data Source variable? So, I could write PCFs that calculate:

DataSourceRangeVariable * 10,

Or

DataSourceRangeVariable.5 / c

Or

Avg(DataSourceRangeVariable.2,12) - Avg(DataSourceRangeVariable.2,26)

…and then change the data source to MACD Histogram ##.##.## (I think you can see the direction I am heading in…)

Other than creating a mile-long formula to check bar 0 with bars 1-9, bar 1 with bar 0 and bars 2-9, bar 2 with bars 0-1 and bars 3-9 is there any way to do this?

Bruce_L
Posted : Wednesday, February 4, 2015 12:58:18 PM


Worden Trainer

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

You could add Donchian Channels to the MACD with the Period set to 10 and the Offset set to 0. The lower Donchian Channel would then be the value of interest. With a few exceptions, it would not be possible to use the result in calculations however.

The other option would be to use the techniques given in the Min Max PCFs topic. The resulting formula would be rather long however.

(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)+XAVGC12.1 - XAVGC26.1 - XAVG(XAVGC12.1,9) + XAVG(XAVGC26.1,9)-ABS(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)-C1)+2*(XAVGC12.2 - XAVGC26.2 - XAVG(XAVGC12.2,9) + XAVG(XAVGC26.2,9))-ABS(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)+XAVGC12.1 - XAVGC26.1 - XAVG(XAVGC12.1,9) + XAVG(XAVGC26.1,9)-ABS(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)-C1)-2*(XAVGC12.2 - XAVGC26.2 - XAVG(XAVGC12.2,9) + XAVG(XAVGC26.2,9)))+2*(XAVGC12.3 - XAVGC26.3 - XAVG(XAVGC12.3,9) + XAVG(XAVGC26.3,9)+XAVGC12.4 - XAVGC26.4 - XAVG(XAVGC12.4,9) + XAVG(XAVGC26.4,9)-ABS(XAVGC12.3 - XAVGC26.3 - XAVG(XAVGC12.3,9) + XAVG(XAVGC26.3,9)-C4))-ABS(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)+XAVGC12.1 - XAVGC26.1 - XAVG(XAVGC12.1,9) + XAVG(XAVGC26.1,9)-ABS(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)-C1)+2*(XAVGC12.2 - XAVGC26.2 - XAVG(XAVGC12.2,9) + XAVG(XAVGC26.2,9))-ABS(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)+XAVGC12.1 - XAVGC26.1 - XAVG(XAVGC12.1,9) + XAVG(XAVGC26.1,9)-ABS(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)-C1)-2*(XAVGC12.2 - XAVGC26.2 - XAVG(XAVGC12.2,9) + XAVG(XAVGC26.2,9)))-2*(XAVGC12.3 - XAVGC26.3 - XAVG(XAVGC12.3,9) + XAVG(XAVGC26.3,9)+XAVGC12.4 - XAVGC26.4 - XAVG(XAVGC12.4,9) + XAVG(XAVGC26.4,9)-ABS(XAVGC12.3 - XAVGC26.3 - XAVG(XAVGC12.3,9) + XAVG(XAVGC26.3,9)-C4)))+XAVGC12.5 - XAVGC26.5 - XAVG(XAVGC12.5,9) + XAVG(XAVGC26.5,9)+XAVGC12.6 - XAVGC26.6 - XAVG(XAVGC12.6,9) + XAVG(XAVGC26.6,9)-ABS(XAVGC12.5 - XAVGC26.5 - XAVG(XAVGC12.5,9) + XAVG(XAVGC26.5,9)-C6)+2*(XAVGC12.7 - XAVGC26.7 - XAVG(XAVGC12.7,9) + XAVG(XAVGC26.7,9))-ABS(XAVGC12.5 - XAVGC26.5 - XAVG(XAVGC12.5,9) + XAVG(XAVGC26.5,9)+XAVGC12.6 - XAVGC26.6 - XAVG(XAVGC12.6,9) + XAVG(XAVGC26.6,9)-ABS(XAVGC12.5 - XAVGC26.5 - XAVG(XAVGC12.5,9) + XAVG(XAVGC26.5,9)-C6)-2*(XAVGC12.7 - XAVGC26.7 - XAVG(XAVGC12.7,9) + XAVG(XAVGC26.7,9)))+2*(XAVGC12.8 - XAVGC26.8 - XAVG(XAVGC12.8,9) + XAVG(XAVGC26.8,9)+XAVGC12.9 - XAVGC26.9 - XAVG(XAVGC12.9,9) + XAVG(XAVGC26.9,9)-ABS(XAVGC12.8 - XAVGC26.8 - XAVG(XAVGC12.8,9) + XAVG(XAVGC26.8,9)-C9))-ABS(XAVGC12.5 - XAVGC26.5 - XAVG(XAVGC12.5,9) + XAVG(XAVGC26.5,9)+XAVGC12.6 - XAVGC26.6 - XAVG(XAVGC12.6,9) + XAVG(XAVGC26.6,9)-ABS(XAVGC12.5 - XAVGC26.5 - XAVG(XAVGC12.5,9) + XAVG(XAVGC26.5,9)-C6)+2*(XAVGC12.7 - XAVGC26.7 - XAVG(XAVGC12.7,9) + XAVG(XAVGC26.7,9))-ABS(XAVGC12.5 - XAVGC26.5 - XAVG(XAVGC12.5,9) + XAVG(XAVGC26.5,9)+XAVGC12.6 - XAVGC26.6 - XAVG(XAVGC12.6,9) + XAVG(XAVGC26.6,9)-ABS(XAVGC12.5 - XAVGC26.5 - XAVG(XAVGC12.5,9) + XAVG(XAVGC26.5,9)-C6)-2*(XAVGC12.7 - XAVGC26.7 - XAVG(XAVGC12.7,9) + XAVG(XAVGC26.7,9)))-2*(XAVGC12.8 - XAVGC26.8 - XAVG(XAVGC12.8,9) + XAVG(XAVGC26.8,9)+XAVGC12.9 - XAVGC26.9 - XAVG(XAVGC12.9,9) + XAVG(XAVGC26.9,9)-ABS(XAVGC12.8 - XAVGC26.8 - XAVG(XAVGC12.8,9) + XAVG(XAVGC26.8,9)-C9)))-ABS(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)+XAVGC12.1 - XAVGC26.1 - XAVG(XAVGC12.1,9) + XAVG(XAVGC26.1,9)-ABS(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)-C1)+2*(XAVGC12.2 - XAVGC26.2 - XAVG(XAVGC12.2,9) + XAVG(XAVGC26.2,9))-ABS(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)+XAVGC12.1 - XAVGC26.1 - XAVG(XAVGC12.1,9) + XAVG(XAVGC26.1,9)-ABS(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)-C1)-2*(XAVGC12.2 - XAVGC26.2 - XAVG(XAVGC12.2,9) + XAVG(XAVGC26.2,9)))+2*(XAVGC12.3 - XAVGC26.3 - XAVG(XAVGC12.3,9) + XAVG(XAVGC26.3,9)+XAVGC12.4 - XAVGC26.4 - XAVG(XAVGC12.4,9) + XAVG(XAVGC26.4,9)-ABS(XAVGC12.3 - XAVGC26.3 - XAVG(XAVGC12.3,9) + XAVG(XAVGC26.3,9)-C4))-ABS(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)+XAVGC12.1 - XAVGC26.1 - XAVG(XAVGC12.1,9) + XAVG(XAVGC26.1,9)-ABS(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)-C1)+2*(XAVGC12.2 - XAVGC26.2 - XAVG(XAVGC12.2,9) + XAVG(XAVGC26.2,9))-ABS(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)+XAVGC12.1 - XAVGC26.1 - XAVG(XAVGC12.1,9) + XAVG(XAVGC26.1,9)-ABS(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)-C1)-2*(XAVGC12.2 - XAVGC26.2 - XAVG(XAVGC12.2,9) + XAVG(XAVGC26.2,9)))-2*(XAVGC12.3 - XAVGC26.3 - XAVG(XAVGC12.3,9) + XAVG(XAVGC26.3,9)+XAVGC12.4 - XAVGC26.4 - XAVG(XAVGC12.4,9) + XAVG(XAVGC26.4,9)-ABS(XAVGC12.3 - XAVGC26.3 - XAVG(XAVGC12.3,9) + XAVG(XAVGC26.3,9)-C4)))-C5-C6+ABS(XAVGC12.5 - XAVGC26.5 - XAVG(XAVGC12.5,9) + XAVG(XAVGC26.5,9)-C6)-2*(XAVGC12.7 - XAVGC26.7 - XAVG(XAVGC12.7,9) + XAVG(XAVGC26.7,9))+ABS(XAVGC12.5 - XAVGC26.5 - XAVG(XAVGC12.5,9) + XAVG(XAVGC26.5,9)+XAVGC12.6 - XAVGC26.6 - XAVG(XAVGC12.6,9) + XAVG(XAVGC26.6,9)-ABS(XAVGC12.5 - XAVGC26.5 - XAVG(XAVGC12.5,9) + XAVG(XAVGC26.5,9)-C6)-2*(XAVGC12.7 - XAVGC26.7 - XAVG(XAVGC12.7,9) + XAVG(XAVGC26.7,9)))-2*(XAVGC12.8 - XAVGC26.8 - XAVG(XAVGC12.8,9) + XAVG(XAVGC26.8,9)+XAVGC12.9 - XAVGC26.9 - XAVG(XAVGC12.9,9) + XAVG(XAVGC26.9,9)-ABS(XAVGC12.8 - XAVGC26.8 - XAVG(XAVGC12.8,9) + XAVG(XAVGC26.8,9)-C9))+ABS(XAVGC12.5 - XAVGC26.5 - XAVG(XAVGC12.5,9) + XAVG(XAVGC26.5,9)+XAVGC12.6 - XAVGC26.6 - XAVG(XAVGC12.6,9) + XAVG(XAVGC26.6,9)-ABS(XAVGC12.5 - XAVGC26.5 - XAVG(XAVGC12.5,9) + XAVG(XAVGC26.5,9)-C6)+2*(XAVGC12.7 - XAVGC26.7 - XAVG(XAVGC12.7,9) + XAVG(XAVGC26.7,9))-ABS(XAVGC12.5 - XAVGC26.5 - XAVG(XAVGC12.5,9) + XAVG(XAVGC26.5,9)+XAVGC12.6 - XAVGC26.6 - XAVG(XAVGC12.6,9) + XAVG(XAVGC26.6,9)-ABS(XAVGC12.5 - XAVGC26.5 - XAVG(XAVGC12.5,9) + XAVG(XAVGC26.5,9)-C6)-2*(XAVGC12.7 - XAVGC26.7 - XAVG(XAVGC12.7,9) + XAVG(XAVGC26.7,9)))-2*(XAVGC12.8 - XAVGC26.8 - XAVG(XAVGC12.8,9) + XAVG(XAVGC26.8,9)+XAVGC12.9 - XAVGC26.9 - XAVG(XAVGC12.9,9) + XAVG(XAVGC26.9,9)-ABS(XAVGC12.8 - XAVGC26.8 - XAVG(XAVGC12.8,9) + XAVG(XAVGC26.8,9)-C9)))))/16



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