Scalping with Parabolic SAR and Fibonacci

Category: Indicators By: Nicolas Created: September 3, 2019, 9:50 AM
September 3, 2019, 9:50 AM
Indicators
22 Comments

This scalping indicator was requested in the indicators’ forum, it contains 2 parabolic SAR of different settings and plot automatically entry, stoploss and target levels calculated with Fibonacci retracement.

The rules are:

LONG

  • When price breaks up through the 0.02 & 0.2 PSAR you draw a Fibonacci retracement
  • from the closest last significant low (before pirce broke PSAR)
  • to the high of the bar that broke the PSAR.
  • This gives you your PROFIT TARGET at 161.8% Level
  • and your ENTRY ar 50% level
  • STOP = Last Signifcant low -2 Pips

SHORT

  • When price breaks down through the 0.02 & 0.2 PSAR you draw a Fibonacci retracement
  • from the closest last significant high (before pirce broke PSAR)
  • to the low of the bar that broke the PSAR.
  • This gives you your PROFIT TARGET at 161.8% Level
  • and your ENTRY ar 50% level
  • STOP = Last Signifcant high +2 Pips
//PRC_Scalping with Parabolic SAR and Fibonacci | indicator
//03.09.2019
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge

// --- settings 
plotbar=10 //bars duration for plotting the fib zones
// --- end of settings 

sarfast=SAR[0.02,0.02,0.2]
sarslow=SAR[0.005,0.005,0.05]

//colors
if close>sarfast then //bullish trend
 r=0
 g=255
else //bearish trend 
 r=255
 g=0
endif

//highs and lows
if close<sarfast then
 ll=min(ll,low)
else
 hh=max(hh,high)
endif

if close>sarfast and close[1]<sarfast[1]  then //new bullish signal 
 fibo0=ll
 ll=sarslow //reset ll
 if close>sarslow then
  startbar=barindex
  irange=high-fibo0
  entry = fibo0+(irange/2)
  itarget = fibo0+irange*1.618
  istop = fibo0-2*pointsize
  drawarrowup(startbar,fibo0) coloured(0,255,0)
  drawtext("50% (entry)",barindex,entry-2*pointsize,dialog,standard,20) coloured(0,255,0)
  drawtext("SL",barindex,istop-2*pointsize,dialog,standard,20) coloured(255,0,0)
  drawtext("TP",barindex,itarget-2*pointsize,dialog,standard,20) coloured(0,0,255)
 endif
endif
if close<sarfast and close[1]>sarfast[1] then //new bearish signal
 fibo0=hh
 hh=0 //reset hh
 if  close<sarslow then 
  startbar=barindex
  irange=fibo0-low
  entry = fibo0-(irange/2)
  itarget = fibo0-irange*1.618
  istop = fibo0+2*pointsize
  drawarrowdown(startbar,fibo0) coloured(255,0,0)
  drawtext("50% (entry)",barindex,entry+2*pointsize,dialog,standard,20) coloured(0,255,0)
  drawtext("SL",barindex,istop+2*pointsize,dialog,standard,20) coloured(255,0,0)
  drawtext("TP",barindex,itarget+2*pointsize,dialog,standard,20) coloured(0,0,255)
 endif
endif

//plot fib zones 
if barindex-startbar<=plotbar then
 if close>sarslow then //bullish trend  
  drawsegment(startbar,istop,barindex,istop) coloured(255,0,0) //stoploss
  drawsegment(startbar,entry,barindex,entry) coloured(0,255,0) //entry at 50% fibo
  drawsegment(startbar,itarget,barindex,itarget) coloured(0,0,255) //target at 161.8% fibo
 endif
 if close<sarslow then //bearish trend
  drawsegment(startbar,istop,barindex,istop) coloured(255,0,0) //stoploss
  drawsegment(startbar,entry,barindex,entry) coloured(0,255,0) //entry at 50% fibo
  drawsegment(startbar,itarget,barindex,itarget) coloured(0,0,255) //target at 161.8% fibo
 endif
endif

return sarfast coloured(r,g,0) style(point,5),sarslow coloured(0,195,255)  style(point,5)

 

Download
Filename: PRC_ScalpingSAR-and-Fibonacci.itf
Downloads: 1695
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...