Strategy - Parabolic SAR & Fibo (update)

Category: Indicators By: leofi Created: February 27, 2020, 12:37 PM
February 27, 2020, 12:37 PM
Indicators
8 Comments

The indicator returns a signal for the bullish signal and for the bearish signal,  so you can easily create an alert to warn you.

Here is an update of the “prc_scalpingsar-and-fibonacci” indicator, for more information please refer to the following > link < .

New:

  • Take profit 2 (261.8%)
  • Add variable parameter(draw the line sl, tp1, tp2, entry and change stop loss)
  • Delete view parabolic sar fast and slow
  • Add signal bearish and bullish for audible alert

Exemple alert :

Signal SarFibo – Signal BEARISH >= Signal SarFibo – LVL Alert

Signal SarFibo – Signal BULLISH >= Signal SarFibo – LVL Alert

LvL Alert is always at 1, the signal bearish or bullish is at 0 and will become 1 if there is a signal.

//-+------------------------------------------------------------------+-//
// | PRC_Scalping with Parabolic SAR and Fibonacci | indicator        | //
// | Author by: Nicolas @ www.prorealcode.com                         | //
// | Modify by: Tom's - Leofi                                         | //
// | Last update: 27.02.20                                            | //
//-+------------------------------------------------------------------+-//

//-+------------------------------------------------------------------+-//
// | Variable Setup                                                   | //
//-+------------------------------------------------------------------+-//

//-> Custom stop loss
sizeStopLoss = 2

//-> Bars duration for plotting the fib zones
plotBar = 10

//-> Draw line take profit (1) at 161.8% ?
isActiveLineTP1 = 1

//-> Draw line take profit (2) at 261.8% ?
isActiveLineTP2 = 1

//-> Draw line entry at 50% ?
isActiveLineEntry = 1

//-> Draw line stop loss ?
isActiveLineSL = 1

//-> Parabolic SAR fast and slow
sarFast = SAR[0.02, 0.02, 0.2]
sarSlow = SAR[0.005, 0.005, 0.05]

//-+------------------------------------------------------------------+-//
// | Signal Parabolic SAR                                             | //
//-+------------------------------------------------------------------+-//

//-> Variable for alert signal
alertLVL = 1
signalBullish = 0
signalBearish = 0

//-> Maximun highs and minimum lows
IF (close < sarFast) THEN
 valueMinLow = min(valueMinLow, low)
ELSE
 valueMinHigh = max(valueMinHigh, high)
ENDIF
 
//-> Bullish signal
IF (close > sarFast and close[1] < sarFast[1]) THEN
 fibo = valueMinLow
 valueMinLow = sarSlow
 IF (close > sarSlow) THEN
  startbar = barindex
  irange = high - fibo
  entry = fibo + (irange / 2)
  tp1 = fibo + irange * 1.618
  tp2 = fibo + irange * 2.618
  sl = fibo - sizeStopLoss * pointsize
  //-> Send signal bullish
  drawtext(" ⇗", barindex, sl + (2 * pointsize), dialog, standard, 30) coloured(0, 233, 0)
  drawvline(barindex) coloured(0, 233 ,0)
  signalBullish = alertLVL
 ENDIF
ENDIF

//-> Bearish signal
IF (close < sarFast and close[1] > sarFast[1]) THEN
 fibo = valueMinHigh
 valueMinHigh = 0
 IF (close < sarSlow) THEN
  startbar = barindex
  irange = fibo - low
  entry = fibo - (irange / 2)
  tp1 = fibo - irange * 1.618
  tp2 = fibo - irange * 2.618
  sl = fibo + sizeStopLoss * pointsize
  //-> Send signal bearish
  drawtext(" ⇘", barindex, sl - (2 * pointsize), dialog, standard, 30) coloured(233, 0, 0)
  drawvline(barindex) coloured(233, 0 ,0)
  signalBearish = alertLVL
 ENDIF
ENDIF

//-> Draw tp1 and SL on graph
IF (barindex - startbar <= plotbar) THEN
 IF (isActiveLineSL) THEN
  drawsegment(startbar, sl, barindex, sl) coloured(233, 0, 0)
 ENDIF
 IF (isActiveLineTP1) THEN
  drawsegment(startbar, tp1, barindex, tp1) coloured(0, 233, 0)
 ENDIF
 IF (isActiveLineTP2) THEN
  drawsegment(startbar, tp2, barindex, tp2) coloured(0, 144, 0)
 ENDIF
 IF (isActiveLineEntry) THEN
  drawsegment(startbar, entry, barindex, entry) coloured(233, 255, 233)
 ENDIF
ENDIF
 
RETURN signalBearish coloured(233, 0, 0) style(histogram) AS "Signal BEARISH", signalBullish coloured(0, 233, 0) style(histogram) AS "Signal BULLISH", alertLVL AS "LvL Alert"

https://www.prorealcode.com/prorealtime-indicators/scalping-with-parabolic-sar-and-fibonacci/

https://www.prorealcode.com/user/nicolas/

Download
Filename: Parabolic-SAR-and-Fibo.itf
Downloads: 684
leofi Junior
Dev java, php, html, css, javascript..
Author’s Profile

Comments

Logo Logo
Loading...