TRIN 2 Indicator?
Author: swuzy
Creation Date: 8/10/2009 6:12 PM
profile picture


Is there a modified TRIN indicator available such as described in ?

This version seems conceptually much easier to keep straight in one's mind while trying to implement some strategies with it.

Would it be possible to please add this to the Rule based wizard list?


profile picture


Short answer:

No. If this indicator is coded, you'll have to work with it in a code-based strategy.

Long-winded explanation:

Wealth-Lab 5's Indicator doesn't know what an "external symbol" is - this is a prerogative of code-based strategies. For some (design/implementation) reason, the indicators that accept a Bars object as one of their parameters to construct themselves can not be practically used in the Rule-based wizard. McClellan Oscilator, Beta, TRIN or its derivative described in the link above are such indicators. The rule-based strategy users are not given the ability to specify a custom Bars symbol other than to pick up a pre-filled one from the dropdown box (typically, Bars.Close).
profile picture


Eugene, I think it's possible. In the Market Sentiment Data folder, WL Pro has .STI.N and .STI.O for the NYSE and Nasdaq TRINs. You can pass Bars to a TRIN2 indicator to synch these external symbols and create the indicator. Here's a mockup -

Please log in to see this code.
The problem is where to include the indicator. It's not really valid for the Community since not everyone has access to these Market Sentiment symbols.
profile picture


Since swuzy was requesting a rule-based solution, this has to be a formal indicator. Now, the question is: in a rule-based strategy, how do we pass .STI.N and .STI.O to a formal indicator that accepts a Bars object as a parameter? Like Beta in Community.Indicators. I couldn't.
profile picture


I was thinking of just hard-coding the symbols into the indicator's body, but it would only work if you had the Fidelity DataSet.

Let's see, we can create a list of strings to select as parameters in our Rules Builder. If we knew some popular symbols for nyse and nasdaq trin, then we could include them in the list for the rule. Does Y! or other providers have the trin data handy?
profile picture


Y! once happened to have advancing/declining issues but it's a question whether do they have it on board currently.

But I'm not sure how the symbols would help the formal indicator. My understanding is that internally, it's not aware of the "External Symbol" concept. I could imagine some mimicking of a static data provider's behavior in the formal indicator's body by traversing through BarDataStore and retrieving a symbol named .STI.N in one of the datasources, but that's not elegant.
profile picture


Stumbled onto this old thread and decided to make an update.

The problem has long been resolved by using the External Symbol Plotter in Rule-Based strategies. Requires installed Community Indicators library.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).