TradingView
CryptoStatistical
9 มีนา 2019 เวลา 15 นาฬิกา 1 นาที

Linear Momentum and Performance Indicators (IFTA Jan 2019) 

Bitcoin / United States DollarCoinbase

คำอธิบาย

This a porting to Trading View of the 12 new indicators introduced in IFTA Journal (January Edition) by Akram El Sherbini, MFTA, CFTe, CETA.

Indicators are available in "Linear Momentum and Performance Indicators" at page four.

IFTA Journal is available below:
ifta.org/public/files/journal/d_ifta_journal_19.pdf

Indicators implemented herein:
  • Linear Force Index: The linear force index LFI measures the force of buyers and sellers during rallies and declines, respectively. It combines two important pieces of market information—the price acceleration
    and volumes.
  • Pressure Index: The pressure index PRI measures the buying and selling pressure over a certain range within a time interval by moving around its zero line. The index indicates a rise in buying pressure when it crosses above the zero line and a rise in selling pressure
    when it crosses below the zero line level. The buying and selling force moves the last price during the session to form a range with low and high boundaries.
  • Strength Index Index: The strength index SI is a leading indicator to the pressure index. It measures the ability of buyers to resist sellers and vice versa. SI of today is the ratio of the latest pressure index value to the strain of today.
  • Power Index: It measures the buying and selling power within a time interval by moving around its zero line.
  • Intensity Index: The intensity index II measures the buying and selling intensity within a time interval by moving around its zero line.
  • Dynamic Strength Index: The sole purpose of the dynamic strength index DSI and the integral dynamic strength index IDSI is to lead their intensity indicator peers.
  • Integral Force Index
  • Integral Pressure Index
  • Integral Strength Index
  • Integral Power Index
  • Integral Intensity Index
  • Integral Dynamic Strength Index


The following example shows a trade following the signal while several indicators are crossing the zero line:


Integral performance indicators have a fewer number of trades than the performance indicators. This result is normal, as the integral indicators are less sensitive than their peers. Moreover, the power, intensity, and dynamic strength are less sensitive than the force, pressure, and strength indicators. The same applies for their integrals. Therefore, the integrals of power, intensity, and dynamic strength indicators are more inclined to be medium-term indicators.

As the paper is suggesting "the linear momentum and the new performance indicators should make a significant change in categorizing several indicators in technical analysis."

Technical indicators are using biased mathematical implementations. For example Momentum Index is in reality a velocity indicator, Force index a Momentum indicator and so on. From a Physical perspective correct momentum, force, velocity etc. needs to be corrected and re-categorized.
The author also gives important insights in how these indicators can be used "simultaneously to identify price turning points and filter irrelevant divergences."

"This paper will attempt to adjust the price momentum and force concepts introduced by Welles Wilder and Alexander Elder, respectively. By introducing the concept of linear momentum, new indicators will emerge to dissect the market performance into six main elements: market’s force, pressure, strength, power, intensity, and dynamic strength. This will lead to a deeper insight about market action. The leading performance indicators can be used simultaneously to identify price turning points and filter irrelevant divergences. The linear momentum and the new performance indicators should make a significant change in categorizing several indicators in technical analysis."

Suggestions and feedback are welcome

Hope you enjoy this,
CryptoStatistical

เอกสารเผยแพร่

Note from Akram El Sherbini (original author of the indicators)
From page 13 : for errorneous data or one trade where H=L a fix is to add a negligible fraction to the range (H-L+0.0001)

To fix this special case of division by zero RI=0.0001 has been added to the range
ความคิดเห็น
Orph5781
could you please include in a further improvement, the Long/Short label and related alarm/alert? perhaps there is a simple way of making them accumulative, so the alert/alarm/label appears when two or three or more indicators show Long/Short... the script seems interesting but so many indicators in the same window are hard to analyze.
allanster
Nicely done! I noticed an issue where IntegralStrength was not plotting. Adding extra parantheses to line 70 fixed the issue.

70 IntegralStrengthToday= Momentum/(SF*(Range-RealBody))
CryptoStatistical
@allanster, this is strange... because if I enable the indicator it's working correctly. In addition "Momentum/(SF*Range-RealBody)" is the correct mathematical formulation for the indicator.

Kindest Regards
allanster
@CryptoStatistical, agree it is strange. I was puzzled as well because I assumed your published picture was using your current code. I don't have a logical reason why it plotted for you but not for me, can only report that it would not plot for me until I added the extra set of parantheses. I at times have had to add extra sets in some of my own scripts to alleviate erratic behavior. So it is something that I have definitely seen before.
allanster
@CryptoStatistical, as a followup note, I just loaded your original onto the same chart where I encountered the issues with it earlier, and now IntegralStrength plots fine lol. When I originally encountered the issue before taking the time to troubleshoot it further I did refresh the browser and reload it a few times just to make sure it wasn't something simpler causing it.
CryptoStatistical
@allanster, very strange, but I'm happy that it works. This is just a porting of the original pseudo-code implementation from the author
CryptoStatistical
@allanster, From the Author "Akram El Sherbini", he wrote directly to me:

Hi
Thanks for your interest

I couldn't post the comment on your post

Please note that the integral performance indicators (IPERI) are leading to prices while the performance indicators (PERI) are leading to the integrals and too leading to prices. Usually, I take the signals from the integrals only unless the performance ones give better results by testing.
Also, for
-----------------------PERIs-----------------------
- Strength leads Pressure.
- Pressure leads Linear Force.

- Dynamic Strength leads Intensity.
- Intensity leads Power.

-----------------------IPERIs-----------------------
- Integral Strength leads Integral Pressure.
- Integral Pressure leads Linear Momentum.

- Integral Dynamic Strength leads Integral Intensity.
- Integral Intensity leads Integral Power.
-------------------------------------------------------------------

* All the PERIs lead their peers from the IPERIs.
For Example, the Power Index (PWRI) is leading to the integral power index (IPWRI)

I hope this is useful

Regards,
Akram El Sherbini

Hi
Sorry I can't post comments
For the Strength Indicators

( (SF*Range) - RealBody )

If Range=RealBody, then the division will be by zero and the indicators will not be plotted. That is why the Range is increased by SF=1.01
allanster
@CryptoStatistical, glad to hear, he was nice enough to take the time to write me as well.

I only did this modification as a troubleshooting step because one of the indicators was not plotting.

I had a hunch it was because Pine was wanting an extra set of parantheses.

I have seen Pine do strange things sometimes without them, even when they are not technically needed. Adding them did indeed correct the plotting for me.

Notice I also commented above that I tried the unmodified version again later and it worked perfectly on the second test without the extra set of parantheses. This is indicative of that weird behavior I mentioned.

Having not seen Sherbini's original work and not taking the time to study it, I was just guessing where the parantheses needed to go. So I changed:

(SF*Range-RealBody)

To:

(SF*(Range-RealBody))

It is great to hear from the original author and learn that it should instead be:

{(SF*Range) - RealBody))

Much appreciated!
CryptoStatistical
@allanster, (SF*Range-RealBody) should be the same as (((SF*Range) - RealBody)) because multiplication operator has priority over subtraction. developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence
allanster
@CryptoStatistical, unsure why you think JavaScript operator priority is related to Pine, but it's not lol. Pine also has operator priority, but as I already stated I have seen instances where it is not always honored. I spent hours troubleshooting one of my own Pine strategy scripts that had worked flawlessly through several months and revisions.

What made it even harder to find in my case was that it was erratic in it's behavior, sometimes it would trade correctly, and sometimes not. The solution in that instance was to add an extra set of parantheses that technically should not have been needed. This was another reason it took me so long to find the cause, hard to see and find something wrong with your code when there isn't anything technically wrong with it.

My purpose in relaying this information both here and above was not to disparage your work in any way (it is very nice). It was done with the hope of possibly aiding someone who encounters a similar situation. Your script did not plot IntegralStrength for me on first attempt, adding the extra set resolved the issue. Later reloading your original script plotted fine without the extra set. That is erratic behavior. Notice also that you use similar equations in other indicators that lack this extra set of parantheses, and yet those plotted fine for me on the first load of your script while the IntegralStrength did not plot. There is no logical explanation for this, it is erratic behavior.

Sometimes adding an extra set of technically unneeded parantheses in Pine solves this erratic behavior.

At some point whatever causes this (sometimes) in Pine may be rectified and this information may no longer apply or be useful, but currently what I described can be helpful to know.
เพิ่มเติม