NexusFi: Find Your Edge


Home Menu

 





Trend Thrust Indicator (TTI)


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 8 posts (36 thanks)
    2. looks_two Virtuose1 with 5 posts (1 thanks)
    3. looks_3 wldman with 1 posts (0 thanks)
    4. looks_4 DavidHP with 1 posts (1 thanks)
    1. trending_up 13,974 views
    2. thumb_up 38 thanks given
    3. group 3 followers
    1. forum 14 posts
    2. attach_file 8 attachments




 
Search this Thread

Trend Thrust Indicator (TTI)

  #11 (permalink)
 
Virtuose1's Avatar
 Virtuose1 
Montreal, Qc, Canada
 
Experience: Advanced
Platform: NinjaTrader 7
Broker: Interactive Brokers
Trading: ETF
Posts: 58 since Jun 2011
Thanks Given: 142
Thanks Received: 41


Fat Tails View Post
If you look at the definition of VFactor and IVFactor

 
Code
Vfactor = (bd.vwma(volume,fastlen,voltoday)/xaverage(volume,slowlen))*10;
IVfactor = (bd.vwma(volume,slowlen,voltoday)/xaverage(volume,fastlen))*10;


you will note that in both formulae the enumerator is a volume-weighted moving average VWMA, while the denominator is an exponential moving average. As the VWMA is based on a simple moving average, a simple moving average should be used for the denominator as well. Compared to the simple moving average, the exponential moving average gives more weight to the more recent data points, which sort of intermingles with the volume weighting of the VWMA.

My understanding is that he compares to an EMA (instead of SMA) to be consistent with the standard MACD calculations (which uses EMAs). The VWMA comparison to SMA is done in another indicator (VPCI) which is used in conjunction with TTI to determine trading signals.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Cheap historycal L1 data for stocks
Stocks and ETFs
Better Renko Gaps
The Elite Circle
How to apply profiles
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
ZombieSqueeze
Platforms and Indicators
 
  #12 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


Virtuose1 View Post
My understanding is that he compares to an EMA (instead of SMA) to be consistent with the standard MACD calculations (which uses EMAs). The VWMA comparison to SMA is done in another indicator (VPCI) which is used in conjunction with TTI to determine trading signals.

The original idea which preceeded the TTI, was the MACD built from volume-weighted moving averages. The TTI is still based on that concept, as fastavg and slowavg are such volume-weighted averages. The only enhancement applied to this concept, as that both fastavg and slowavg a multiplied with a volume factor or inverted volume factor.

This volume factor is needed to make the MACD faster in case that volume rises and slower in case that volume drops, at least this is my understanding.

Now, one of the most peculiar ideas is, that a VWMA of volume is used. This basically produces a sum of the squares of volume, as volume is multiplied by itself, then added up over the period and divided by the total volume. The value obtained is similar to a standard deviation of volume, which means that it will return a higher value if volume is dispersed and a lower value if volume is homogeneous. I do not see how the indicator can gain anything from taking into account the volume dispersion.


Why are two different moving averages used?

The essential idea of the vFactor seems to be that it compares the average volume over the fast period with the average volume over the slow period, so far not specified which type of average is used. The volume ratio can then be used to accelerate the fast moving average of the MACD, when volume is rising, or to decelerate it, when volume is falling.

I am now assuming that the correct formulae for FAST and SLOW are:

 
Code
FAST = (VFACTOR/IVFACTOR) * FASTAVG;  
LOW = (IVFACTOR/VFACTOR)* SLOWAVG;


In that case I obtain

 
Code
fast =   [VWMA(Volume, fastPeriod) / VWMA(Volume, slowPeriod)] 
           * [EMA(Volume, fastPeriod)/EMA(Volume, slowPeriod)] * FASTAVG;


and I can see that both the left and the right term will be greater than 1, if volume is rising. However, I do not see any advantage to use the volume weighted average for the left term. I think that

 
Code
fast =   [EMA(Volume, fastPeriod)/EMA(Volume, slowPeriod)]^2 * FASTAVG;

would be good enough to achieve the same behaviour. No need to fool around with two different types of moving averages.


Inconsistency in the way the smoothing constant is modified:

My remark regarding the inconsistency in comparing the VWMA to an EMA referred to the formula used for vavg. The ratio of the two moving averages distorts the smoothing constant used to calculate the signal line of the MACD. The term vfactor/ivfactor is identical with vfactor^2. This means that it takes values > 1, when volume is rising and < 1, when volume is falling. This tendency is reinforced by using a shorter weighted moving average for vfactor and a slower moving average for ivFactor. However, I do not see, how it makes sense to compare two averages with both a different formula and a different period. This formula calls for simplification. After all it is only used to modify the period for computing the signal line, and if you check it, it does not change a lot.


How can you compare a spread to a MACD?

This remark refers to the histogram shown by the indicator. The histogram of a MACD is usually obtained by calculating the difference between the raw MACD and the signal line. If I look at the Easy Language code, this is done when sprdiff is calculated.

But why would anyone subtract a standard MACD from that spread?

Reply With Quote
Thanked by:
  #13 (permalink)
 
Virtuose1's Avatar
 Virtuose1 
Montreal, Qc, Canada
 
Experience: Advanced
Platform: NinjaTrader 7
Broker: Interactive Brokers
Trading: ETF
Posts: 58 since Jun 2011
Thanks Given: 142
Thanks Received: 41


It's all good questions... Let's hope Buff is reading this and can provide his perspective :-)

Started this thread Reply With Quote
  #14 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103

Then let us go and code an indicator, which serves the same purpose as Buff Dormeier's Trend Thrust Indicator, but

- uses simpler mechanics
- and can be applied to intraday data

The first task is to get rid of the volume-weighted moving average VWMA and to replace it with a range-weighted moving average RWMA. We know that there is a positive correlation between volume and range, therefore the two averages will be similar. But unlike the VWMA, the RWMA will not overreact to the volume gap at the start and the end of the regular session.

Attached is the RWMA, which I will use for coding an enhanced version of the trend thrust indicator.






Attached Files
Elite Membership required to download: RWMA.zip
Reply With Quote
  #15 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103

This is just to communicate that I have put the project on hold.

The original Trend Thrust Indicator has a few major shortcomings, I would even say that it violates the principles of mathematics. Let me summarize the problems

The indicator is derivative of a MACD. In the first step the two EMAs are replaced with VWMAs. This results in a MACD built from volume-weighted moving averages. There is no problem here, except that the volume is unevenly distributed between the night and the regular session. Therefore I would suggest to use a range-weighted moving averages instead of the volume-weighted moving average.

In a second step, Buff Dormeier tries to adapt the MACD in order to increase the difference, when volume increases. To achieve this he multiplies the fast MACD by a volume factor and the slow MACD by an inverted volume factor. This is where the technical problem starts. Multiplying both average with different multipliers may not only result in a reduction of the spread between them (the spread is the MACD) but it may actually create an inverted spread.

For example let us assume that the fast moving average is 110 and the slow moving average is 100. Let us further assume that the volume multiplier is 0.9 and the inverted volume multiplier is 1.11. If you look at the MACD prior to applying the volume multiplier, it is 110 - 100 = 10. It is positive, because the fast moving average is above the slow moving average, which stands for rising prices. Now, I will apply the volume multiplier. The modified fast moving average becomes 0.9 * 110 = 99, while the slow moving average is no 1.11 * 100 = 111. The new spread becomes 99 - 111 = - 12. The problem here is that we have rising prices, but a negative spread, which is unacceptable and makes the indicator unusable.

In my opinion this is a serious flaw.

The above problem does not invalidate the concept. The original idea is similar to the adaptive moving averages developed by Tushar Chande and Perry Kaufman, and also the behaviour of the ADXVMA, which flatten out when volatility drops. The only problem here is that the indicator uses different multipliers for the two moving averages. If the spread is calculated first, and the volume factor applied to the spread, then the indicator should behave in the way as it was intended.

I did not have the time to do this during the last week, but will come up with something. If I forget it, please remind me. However, I will not publish a copy of the original TTI, as I think that it should not be used. Of course there is the possibility that I have misinterpreted the TradeStation code, but in that case I should not publish my version of the TTI either.

Reply With Quote




Last Updated on September 21, 2013


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts