INVITE-ONLY SCRIPT

Tug-of-War Fast/Slow Technical Indicator

The script Tug-of-War (ToW) Fast/Slow has a couple of lines (red and purple) and areas (purple and greenish) which give the trend. It also has one line (blue) and dots (green) that give the up-and-down swing.

HOW THE INDICATOR WORKS
It is based on moving averages run on normal OHLC bars, Heikin Ashi bars as well as customized bars (which modify the open/high/low/close values similar to how Haikin Ashi bars do). These moving averages are weighted by volume and related to each other (for example differences are calculated) to produce the final lines. Since the script requires volume, it may not work for tickers which don't have volume (however for some tickers the script uses a proxy-volume so that they work; for example it uses the SPY volume for VIX). There is a different but similar script that I'll be publishing (ToW Simple) which doesn't use volume and runs on any ticker.

HOW TO SETUP THE INDICATOR
The indicator can be run on "close" prices as well as "open", "high", "low" and several mini-max modes ("MM ..."). They pick highs and lows (minim and maxim values, hence the mini-max name) to generate the indicator lines. See the drop down box options under "Adjust Close Type" (the very fist options in the script settings). The multiple MM modes use different formulas to calculate the mini-max values. The more significant MM modes are MM ZZ (zig-zag), MM HL/HL (determines highs and lows based on highs and lows), MM HL/C (determines highs and lows based on close) and MM Close. Note: if the MM ZZ mode show you the highs for the current bar and you actually want the lows (or vice versa) check "MM ZZ Reverse".

The indicator has two fast lines:
  • the green dots (called F1 since it's the 1st Fast line, actually dots)
  • the blue line (called F2--the 2nd Fast line)

They are called "fast" because they move up and down faster. In previous iterations of the script I called them "swing lines" since they capture the prices swing up and down. The blue line is the more significant one (since the green one I set, by default to dots instead of an actual line).

The indicator has two slow lines:
  • the purple line (called S1 since it's the 1st Slow line)
  • the blue line (called S2--the 2nd Slow line)

They move slower than the fast line and they are better at determining the trend.

The order of lines, from fast to slow, is: F1 (green), F2 (blue), S1 (purple) and S2 (red).

The indicator also has two areas:
  • the greenish area (called FA since it's the Fast Area)
  • the purple area (called SA since it's the Slow Area)


Additional lines (but less significant are displayed if you uncheck the "Clean look" option).

The script allows to display up to for sets of lines (see the top "Adjust Close Type (Set #)" options). For example one set may show "Highs" and the other "Lows" or "Close" and "MM HL/HL". Additionally it can run in multi-set mode when it shows the chosen one line (F1, F2, S1, S2, FA, SA) for each OHLC (open, high, low, close). See "Only Show Related Lines" option. In this display purple is the line for Open, green is the line for High, red is the line for Low and black is the line for Close.

The indicator also has a custom mode (see the "Enable custom bars" checkbox and the options following it). With it you can change the open/high/low/close value (see "Custom #1 OHLC to Modify") of a bar ("Custom #1 Index To Modify" determines which bare to modify, 0 being the most recent bar). Then "Custom #1 Modifier Type" specifies to use open/high/low/close value of the same or different bar (use "Custom #1 Modifier Index/Value ..." to choose which bar's OHLC value to use for the custom value; 0 means the O/H/L/C value of the same bar as the one being modified; 1 means previous bar, etc.). If "Custom" is selected instead (under Modifier Type) then you can enter the custom value in the "Custom #1 Modifier Index/Value ..." field. This will show you how the indicator lines look like if the price was different. Three different bars can be modified this way. You can try different custom values and see for what price value one of the lines reaches a high or low point. That is an estimate of how far the price may go. Note: the indicator values depends depends on all OHLC values (plus volume) not just on the one chosen. That is, if the indicators is based on close values it is still affected to some extent by high, low and volume. Therefore the price value determined using the custom mode may not be exact but only a rough estimate (and the bigger changes in OHLC the bigger affect on the indicator and the actual price may not be exactly what was calculated using the custom mode.

HOW TO USE THE INDICATOR
Strategies and tools that apply to price such as resistance and support levels and trend lines, pitchforks (particularly Schiff pitchforks in case of the indicator) also apply to these lines. Because the indicator lines are within a range it is generally easier and faster to see and find such support/resistance levels and trend lines.

Additionally, the lines or the areas crossing the 0 line often indicate a change in trend (however if earlier indicator highs/lows bounce off around the 0 line that may happen this time around as well). The more significant 0 crossing is for the slow lines (red first and then purple) as well as the areas.

The slow lines and the areas, as mentioned already, show the trend (in previous iterations of the indicator I called them direction lines).

The fast lines (blue line, green dots) show the swing, as mentioned earlier. They often swing up and down. When they reach a high (you can thin of it as overbought) they may move back down on the next bar (or vice-versa when reaching a low). However, sometimes they don't swing but rather move in a line closer to a straight line (more like the slow lines). That indicates that the trend is stronger.

The fast lines can also indicate the trend by looking if their highs and/or lows are trending up or down. Thus, if the highs and lows are trending down then it's likely the price will go down.

Another thing to look at is divergence between the price and the slow lines or the high/lows trend of the fast lines (that I mentioned above). If the price is going up but the these are trending down then over the same bars then the price may be coming closer to a reversal.

STRATEGIES

  • Swing-in-trend. Find a ticker with the slow lines showing an upward trend (i.e., the red line crossing 0 or being above 0) and a the slow line (such as the blue line) reaching a previous low level (draw support levels and/or trend lines to determine that). Go long when the fast line reaches the support level or bottom trendline. The expectation is that the price will move up by the close of the next bar (when the position should normally be closed). The "go-short" setup is just reversed (slow lines trending down and the fast lines reaching high levels). You can use the "High", "Low", "MM ZZ" or one of the other MM modes instead of "Close" to get a better entry and exist point (in this case you enter when the the "Low" or "MM ZZ" modes reached a low and you enter if the "High" or "MM ZZ" reached a high or else exit at close of the next bar).
  • Trend-on-swing. When the red line is about to cross or just crossed the 0 line and wait for the swing line to go down first (you can use "High", "Low" or an MM mode, as explained dabove, for a better entry point) and then you enter the position and exit when either the slow (red) line reaches a resistance level, it crosses 0 the other way or when the fast line reaches a very high resistance level. This strategy will take longer, it won't be closed on the next bar.
  • Mini-max strategy. This is a new strategy I've developed. It uses MM ZZ mode (and a second MM ZZ set to "reverse") as well as "High", "Low" and "MM HL/HL" mode. I basically draw resistance and support lines on these, usually 2-3 lines for high and the same for low, for multiple tickers that seem a good match (they show a nice, consistent up/down pattern for MM ZZ). When the F2/blue lines reaches one of the horizontal lines further from the 0 lines (I setup alerts for this), then I enter expecting a move in the opposite direction. If it reaches the 2nd or 3rd low horizontal line then I go long. Then on the next bar when the F2 line reaches the 1st high horizontal line then I close the position (alternatively, I close half and keep half for when the second high horizontal line is reached). Alternatively, I may close the same bar, when the reversed MM ZZ setup reaches the 1st high horizontal line. I usually use this setup on weekly charts and use weekly options but it can be used on other charts such as daily charts as well.

    I recommend to setup alerts on the indicator. After you draw a horizontal line or a trend line and you select it, its bar has a clock icon with a "+" sign. If you click on it you can setup an alert. In the setup dialog, under "Condition" select the indicator and then select the line of the indicator (such as "F2 (f_s/Blue)") then select "Once Per Bar" under "Options" (that's my recommendation, it will alert you only one time per bar). Finally customize the message for example: "ZZ: F2/blue /lo hl 1/3, TQQQ, 1D" (which means it's for MM ZZ mode when F2 (blue) line intersects the 1st (out of 3) low horizontal line (HL) and it's for TQQQ on 1D chart. When I use the reverse mode for ZZ then I write: "ZZr: ..."

    In the chart above, the first indicator shows the "Close" mode and the second the "MM ZZ" mode (along with 2 levels for high and low).
Centered OscillatorsMoving AveragesVolume

Script sob convite

O acesso a este script é restrito aos usuários autorizados pelo autor e pode requerir pagamento. Você pode adicioná-lo a seus favoritos, mas só poderá utilizá-lo após solicitar permissão e obtê-la do autor. Contate TradersForecast para mais informações, ou siga as instruções do autor abaixo.

O TradingView não sugere pagar por um script e usá-lo, a menos que você confie 100% no seu autor e entenda como o script funciona. Em muitos casos, você pode encontrar uma boa alternativa de código aberto gratuita nos nossos Scripts da Comunidade.

Instruções do autor

Quer usar esse script no gráfico?

Aviso: por favor leia antes de solicitar acesso.

Aviso legal