Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- discounts are available after registering.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Folks could someone post code an indicator like these or translate the code from ninja into multicharts.
i find it he section of download indicaotr of ninja
Not sure you haven't confused the simple moving average (which is TWAP in its essence) and TWAP trading method. Please check with the article in Wikipedia and we could start from there.
Both VWAP and TWAP relate to a session, which means that both have an anchor point, where the calculations start. The TWAP is an anchored SMA with an increasing length, the VWAP is an anchored VWMA with an increasing length.
If you apply a TWAP to a fixed period chart (for example a 5 min chart), all bars have an equal weight and the TWAP is calculated as the arithmetic average of all typical prices (or closing prices).
However, if you apply a TWAP to a range, a tick or a volume chart, the TWAP becomes a time-weighted average. This means that each bar is attributed a weight corresponding to its duration = time stamp of last tick of current bar minus time stamp of last tick of previous bar. These weights are then used to calculate the arithmetic average from the typical prices of all bars within the session.
So VWAP and TWAP are similar in their construction as weighted averages, however
- VWAP becomes a standard arithmetic average on a volume chart
- TWAP becomes a standard arithmetic average on a fixed period chart