# Diego Riobo Cabot's Force Indicator

Diego Riobo Cabot
Analysing the Market as Physical Forces

Credits First:

Tradingview Pine Comunity, it's just amazing, honestly.
Godmode Indicator's creators. I was inspired by them to create an indicator that takes a lot of variables into account. I also took the idea of the Momentum and LSMA from there
Function te get volume from lower tf was taken from a post in stack overflow. So, credits to you, anonymous hero.

Let's get to it:

so... What is this thing, exactly?

I wanted to measure the market's upward and downard force, in order to calculate the resulting force. Just as a curiosity.
At the end, I got a pretty decent indicator in my hands and I'd like to share it with you guys.

The main goal was to apply basic rules of physics: Velocity, Acceleration, Mass and Force (We could go further if we wanted, such as Impulse, Quantity of Movement, Impact and so on)
Everything appart from mass is a vector, meaning it has a direcction and a magnitude. Each of them were decompossed in upwards and downwards direction
Nevertheless I pictured this Analysis as a "fight" between two teams the Bulls and the Bears (Buyers and Sellers). So I measured two masses: Bulls (+) and Bears(-)

Glossary (internal Clockwork)
° Velocity: Is the ratio between a travelled distance and the time that took to travel it.
+ Upwards Velocity (v_up): Meausures if current source is higher than the previous and stores this value. Has positive values
+ Downwards Velocity (v_dn): Meausures if current source is lower than the previous and stores this value. Has negative values
+ Both vectors are averaged using the rma function (same average type used in the RSI )
+ The length of this average is called length_v: "Lookback - Velocity"

+ Resultant Velocity (v_av): The sum of the averaged v_up and v_dn, since they have equally opposite directions, there's no need for a vectorial sum.
+ Velocity Index (v_in): It's an index between +100% and -100%. Meausures where v_av stands in relation to high (v_up) and low (v_dn). Not used for calculations, but I'll leave it there for further research

° Acceleration: Meausures the rate of change of velocity during time. Since we already have the velocity calculated, it's pretty straight forward
+ Upwards Vel increase (v_up_up): Stores positive variations of upwards' velocity.
+ Upwards Vel decrease (v_up_dn): Stores negative variations of upwards' velocity.
+ Downwards Vel increase (v_dn_up): Stores positive variations of downwards' velocity.
+ Downwards Vel decrease (v_dn_dn): Stores negative variations of downwards' velocity.
+ Upwards Accel. (a_up): v_up_up + v_dn_up
+ Downwards Accel. (a_dn): v_up_dn + v_dn_dn
+ Resultant Accel. (a_av): a_up + a:dn Not used, is there for further research

° Mass: Measures the volume of operations. How much asset is bougth (Bull) or sold (bears).

+ Mass is measured from a lower timeframe. It checks if the candles are Bullish or Bearish (Could be done with closing prices, or typical price)
+ The Lower Timeframe is determined in minutes throught the input variable "Lower Timeframe"

+ Bull mass (vol_up): Total bullish volume in the lower timeframe, for the current candle period
+ Bear mass (vol_dn): Total bearish volume in the lower timeframe, for the current candle period
+ Neutral mass (vol_nt): Total neutral volume in the lower timeframe. (Buy price = Open price) Not used for calculations. Could be used for resistance points?
+ Resultant mass (vol_av): |vol_up - vol_dn|
+ Total mass (vol_tt): Sum of all masses (Just the total volume )

° Force: It's nothing else than mass * acceleration
+ Upwards Force (f_up): vol_up * a_up Bulls mass * Positive Acceleration
+ Downwards Force (f_dn): vol_dn * a_dn Bears mass * Negative Acceleration.
+ Resultant Force (f_av): f_up + f_dn Not used, is there for further research

° Force Index
+ Upwards Channel (fi_up)
+ Downwards Channel (fi_dn)
+ Both vectors are averaged using the rma function (same average type used in the RSI )
+ The length of this average is called length_v: "Lookback - Force"

+ Raw Index (fi_rw): It's an index between +100% and -100%. Meausures where f_av stands in relation to high (f_up) and low (f_dn).
+ Index (fi_in): It's the averaged raw index using the rma function and the "Force Index Smoothing" period
+ Signal (fi_sg): It's the averaged fi_in using the rma function and the "Force Signal Smoothing" period
+ Momentum (fi_mo): fi_in - f_sg. If the momentum is higher than the current force direction, current force should be outwon by previos market trend. It's Smoothed out using the "Force Momentum Lookback"
+ Trend (fi_tr): It's a linear regression of fi_in using a very long period (Force Trend Lookback)

Okay... sure, but how do I use it?

° It is very similar to how the GodMode 3.2 indicator works actually, so if you're familiar with it, you can start trying this indicator out. I've noticed it can provide a bit more timely signals
° It's also similar to Stochastics or RSI indices... but with three lines. an instantaneous one (Force - Blue), an averaged one (Signal - Orange ) and a slow one (Trend - Green)

° Bullish / Bearish momentum: Trendline (green) above 0% means Bullish . Above 12% means a trend wants to form and if it reaches 40% means the strend is super strong ( Bitcoin like, strong). The opposite goes for bearish trends (values under 0)

° Line crossings: Instant Force Line (Blue) crosses over the Signal Line ( Orange ), while the orange is going slightly down or flat under the -12%: Means a long signal. The opposite applies for the Short signals
° Line crossings: Same as above, but when the Signal crosses over the Trend Line (Green)
° Reversals: The background columns are supposed to immitate the "Inertia" of movement. If inertia's bars are higher (when positive) or lower (when negative) than the Force Line (Blue), then it means that the current force the market is making, is probably weaker (at that time) than the inertia the market carries with it.

Tips:

° If you wen't long, the orange line is going slightly down, but it's over +12%, it means the bullish trend is still going, although not as strong as before. You could keep your long position. The reverse applies for short.

סקריפט מוגן
סקריפט זה פורסם במקור סגור ותוכל להשתמש בו באופן חופשי. אתה יכול להגדירו כמועדף כדי להשתמש בו בגרף. אינך יכול להציג או לשנות את קוד המקור שלו.
כתב ויתור

המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.

רוצה להשתמש בסקריפ זה בגרף?