Swing Line indicator by Ron Black

Category: Indicators By: Nicolas Created: September 20, 2017, 9:31 AM
September 20, 2017, 9:31 AM
Indicators
32 Comments

A precise picture of the short-term price swings is basic to understanding the market direction. The Clear method is an effective way to identify and visualize short-term price swings. The method benefits the individual trader because it is simple, objective, requires no calculation, and has no delay.

This indicator is the implementation of the swing line indicator presented in Ron Black’s article in this issue (“Getting Clear With Short-Term Swings”).

Code converted from TradeStation programming language by a request in the English forum.

//PRC_SwingLine Ron Black | indicator
//20.09.2017
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge

if upsw=1 then 
 if high>hH then 
  hH=high
 endif
 if low>hL then 
  hL=low
 endif

 if high<hL then 
  upsw=0
  lL=low 
  lH=high
 endif
endif

if upsw=0 then 
 if low<lL then 
  lL=low
 endif
 if high<lH then 
  lH=high
 endif

 if low>lH then 
  upsw=1
  hH=high
  hL=low
 endif
endif

if upsw=1 then 
 swingline=hL
 r=0
 g=255
 b=255
else
 swingline=lH
 r=255
 g=0
 b=255
endif

return swingline coloured(r,g,b) style(line,2) as "Swing Line"

Download
Filename: PRC_SwingLine-Ron-Black.itf
Downloads: 543
Nicolas Master
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

Logo Logo
Loading...