Can anyone convert this TradingView indicator for ThinkOrSwim. Thank you!!!
study(title="Bill Williams Volume and MFI notation [tekolo]", shorttitle="BW ProfitUnity", overlay=true)
// The Bill Williams Profitunity provides a unique way of quantifying price movement relative to volume.
// At the heart of it is the Market Facilatation Index (MFI). The MFI is the bar's range (high - low)
// divided by the volume. Using the MFI, each bar has a mathematical relationship of the price activity
// versus the volume. In essence, the MFI is a measurement of market efficiency, tracking how much
// movement has occurred in price relative to volume. By comparing the MFI for the current bar to the
// previous bar's, you can gauge the current bar's ability to facilitate price to the previous bar's
// ability. The Bill Williams Profitunity can be used on any period from daily bars to monthly bars.
//
// The MFI as a stand-alone indicator has little value. However, by comparing the current bar's MFI and
// volume with the previous bar's MFI and volume, a very tradable system emerges.
// Williams defines the four possible combinations of MFI and volume as follows. A plus sign means the
// current bar's value is greater than the previous bar's value. A minus sign means the current bar's
// value is less than the previous bar's value.
// Volume MFI Label:
// Green
// Fade
// Fake
// Squat
// Green. This bar shows an increase in volume and the MFI relative to the previous bar. Hence, there is
// price movement, and the MFI is larger for this bar than that for the previous bar. Further, more
// players are entering the market as signaled by the increase in volume. This activity in the futures
// market means that off-floor traders are very active. In addition, the price action is directional
// that is, the market is moving in one direction due to the involvement of new traders putting on new
// positions. This is the kind of day that you would already want to have a trade on in the same direction.
// Fade. This bar shows a decrease in volume and the MFI relative to the previous bar. The market has slowed
// and there is a minor amount of activity as indicated by the low volume. This type of day is called a fade,
// as the traders' interest in the market by this point is fading. Often, this sort of day happens at the end
// of a trend. The market has simply reached a point where nobody is willing to establish any new positions.
// At this point the market appears to be suffering from a certain amount of boredom. Keep in mind, however,
// that out of this market condition, a new trend could emerge.
// Fake. This bar shows a decrease in volume but an increase in the MFI. This condition means that the market
// is moving more relative to the previous bar (the greater MFI), but the lack of volume is evidence that there
// is no new participation. The price action may be driven by just the traders in the pit and is not attracting
// new players from the outside. Williams has an hypothesis, that the traders in the pit may be just strong enough
// to push the market to price levels where there are many stop orders resting in the hands of the brokers, hence
// faking out the off-floor traders.
// Squat. This bar shows an increase in volume relative to the previous bar, but the MFI is lower. The increase
// in volume indicates heavy activity, but the decrease in the MFI indicates that the market is unable to make
// any real headway. Volume increased, the trend has stalled and the price movement has stopped. This price action
// usually, but not always occurs prior to an important move in the opposite direction. This type of bar is called
// a squat bar because the market appears to be squatting prior to a breakout. Often, the breakout of such a bar will
//indicate whether this squat is a trend reversal squat or a trend continuation squat.
// More info:
// http://analyzerxl.com/webhelp/BulkQuotesXL Pro Online Help/scr/HTMLs/TA_Library/BillWilliamsProfitunity.htm
// https://en.wikipedia.org/wiki/Market_facilitation_index
study(title="Bill Williams Volume and MFI notation [tekolo]", shorttitle="BW ProfitUnity", overlay=true)
// The Bill Williams Profitunity provides a unique way of quantifying price movement relative to volume.
// At the heart of it is the Market Facilatation Index (MFI). The MFI is the bar's range (high - low)
// divided by the volume. Using the MFI, each bar has a mathematical relationship of the price activity
// versus the volume. In essence, the MFI is a measurement of market efficiency, tracking how much
// movement has occurred in price relative to volume. By comparing the MFI for the current bar to the
// previous bar's, you can gauge the current bar's ability to facilitate price to the previous bar's
// ability. The Bill Williams Profitunity can be used on any period from daily bars to monthly bars.
//
// The MFI as a stand-alone indicator has little value. However, by comparing the current bar's MFI and
// volume with the previous bar's MFI and volume, a very tradable system emerges.
// Williams defines the four possible combinations of MFI and volume as follows. A plus sign means the
// current bar's value is greater than the previous bar's value. A minus sign means the current bar's
// value is less than the previous bar's value.
// Volume MFI Label:
// Green
// Fade
// Fake
// Squat
// Green. This bar shows an increase in volume and the MFI relative to the previous bar. Hence, there is
// price movement, and the MFI is larger for this bar than that for the previous bar. Further, more
// players are entering the market as signaled by the increase in volume. This activity in the futures
// market means that off-floor traders are very active. In addition, the price action is directional
// that is, the market is moving in one direction due to the involvement of new traders putting on new
// positions. This is the kind of day that you would already want to have a trade on in the same direction.
// Fade. This bar shows a decrease in volume and the MFI relative to the previous bar. The market has slowed
// and there is a minor amount of activity as indicated by the low volume. This type of day is called a fade,
// as the traders' interest in the market by this point is fading. Often, this sort of day happens at the end
// of a trend. The market has simply reached a point where nobody is willing to establish any new positions.
// At this point the market appears to be suffering from a certain amount of boredom. Keep in mind, however,
// that out of this market condition, a new trend could emerge.
// Fake. This bar shows a decrease in volume but an increase in the MFI. This condition means that the market
// is moving more relative to the previous bar (the greater MFI), but the lack of volume is evidence that there
// is no new participation. The price action may be driven by just the traders in the pit and is not attracting
// new players from the outside. Williams has an hypothesis, that the traders in the pit may be just strong enough
// to push the market to price levels where there are many stop orders resting in the hands of the brokers, hence
// faking out the off-floor traders.
// Squat. This bar shows an increase in volume relative to the previous bar, but the MFI is lower. The increase
// in volume indicates heavy activity, but the decrease in the MFI indicates that the market is unable to make
// any real headway. Volume increased, the trend has stalled and the price movement has stopped. This price action
// usually, but not always occurs prior to an important move in the opposite direction. This type of bar is called
// a squat bar because the market appears to be squatting prior to a breakout. Often, the breakout of such a bar will
//indicate whether this squat is a trend reversal squat or a trend continuation squat.
// More info:
// http://analyzerxl.com/webhelp/BulkQuotesXL Pro Online Help/scr/HTMLs/TA_Library/BillWilliamsProfitunity.htm
// https://en.wikipedia.org/wiki/Market_facilitation_index
Last edited by a moderator: