Nicolas

Signal to noise ratio

Category: Indicators By: Nicolas Created: December 21, 2016, 10:00 AM
December 21, 2016, 10:00 AM
Indicators
9 Comments
Signal to noise ratio

This technical indicator is an attempt to find the good momentum of trend : is it actually trending or in a range market?

Interestingly, it follows that π is not only the ratio between the length of a circle to its diameter, it is also a constant rather appears in statistics and, oddly enough, in the relationship between the distance between a price oscillation and a straight line.

  • If the signal / noise ratio is less than or equal to 1/2 π, we will be in a trading range or range.
  • If the signal / noise ratio is greater than 1/2 π, we are in a trending market.

Code converted from the Metatrader4 version, by request on Spanish forums.

Description from x-trader.net website.

//PRC_SignalToNoiseRatio | indicator
//21.12.2016
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
//Converted from MT4 version

// --- parameter
MyLookBackShift = 14
// ---------------

MyClose = Close

LookBackShift = MyClose[MyLookBackShift]

AbsCh = Abs(MyClose - MyClose[1])
MyDistance = Abs(MyClose-LookBackShift)

MyB = 0
for y = 0 to MyLookBackShift + 1 do
 MyB = MyB + AbsCh[y]
next
MyWalk = MyB

MyDTWRatio = MyDistance/MyWalk

MyPiRatio = 1/3.14159265358979/2

Buf0 = MyDTWRatio
Buf1 = MyPiRatio

return Buf0 as "signal to noise ratio",Buf1 as "signal to noise level"

 

 

Download
Filename: PRC_SignalToNoiseRatio.itf
Downloads: 271
Nicolas
Nicolas Legend
I created ProRealCode because I believe in the power of shared knowledge. I spend my time coding new tools and helping members solve complex problems. If you are stuck on a code or need a fresh perspective on a strategy, I am always willing to help. Welcome to the community!
Author’s Profile

Comments

robcole
9 years ago
#

Thx for your reply, i understand, my hope was that you stillhave the mt4 version... however, can you point me into the right direction with the name of the mt4 version, i was searching with google without luck untill now :/ THX

robcole
9 years ago
#

Hello Nicolas, I found this indicator by a google search. since I am mt4 user and you wrote that you have taken a mt4 version as a basis my question, is it possible to get this from you? Greetings robcole

Nicolas
9 years ago
#

Hi Rob, sorry I do not offer MT4 support and I coded this one months ago, I think you'll have to find it by yourself in the forums or elsewhere on the web :)

sanjivmodi
10 years ago
#

Respected sir, I would be grateful if you could send me signal to ratio indicator for Amibroker. Thanking you in advance. Regards Sanjiv modi

verdi55
10 years ago
#

Thanks a lot, this is something I had been looking for for quite a while. Are there any other indicators on this site that can be used to decide whether the market is in a sideward range or trending ? I know the ADX and the RAVI for example. Anything else ? 

Nicolas
10 years ago
#

You can also use the choppiness index,  which is also an oscillator made to detect ranging market : http://www.prorealcode.com/prorealtime-indicators/choppiness-index/

bolsatrilera
10 years ago
#

¿Hay algún problema para hacerlo público también en un blog que tengo?Entiendo que es un código de libre acceso.Gracias por todo Nicolas.

Nicolas
10 years ago
#

Mientras el código y los comentarios permanezcan intactos por supuesto. Un enlace a este post también será muy apreciado :)

bolsatrilera
10 years ago
#

Sin duda,esta es la conversión correcta.Le quedo eternamente agradecido Nicolas.

ProRealCode ProRealCode
Loading...