Auftrag beendet
Spezifikation
MARKET SCANNER BASED ON DIFFERENT INDICATORS FROM DIFFERENT TIMEFRAMES
We need the Fractal S/R Indicator (file attached) , Bollinger Bands, 2x MACDs, Williams %R as input Indicators. We want to combine two parts within the screener. Part one is looking for potential trading zones, here we use the Fractal S/R and the Bollinger Bands. As soon as price reaches this entry zones, the second part of the scanner will be looking for entry possibilities with the MACD and the Williams %R.
The MACD we use is special version, its calculated with the VWAP. The Code is open and you find it at the end oft he document.
Indicators for the potential trading Zone
o Input TF
o Volume MA
- Bollingers Bands
o Input TF
o Length
o StdDev
- ATR
o Input TF
o Length
o Smoothing
The Alarm is triggered as soon as the conditions 1 or 2 is true. We want to seperate possible Long/Short Zone. Resistance Fractals and Upper Bollinger bands for possible Short and vice versa.
Scanning for potential trading Zones
Condition 1:
Price is coming into the defined ATR range around the Fractal level and is touching one of the bollinger bands
Condition 2 :
Price is coming into the defined ATR range of the bollinger bands and is touching one of the fractal SR levels.
è Those two conditions need to be in certain range – herefore we use ATR. Alarm will be triggered if condition 1 or 2 is true within the range.
Indicator for the potental entry alarms
- 2x MACD
o Fast MA Length
o Slow MA Length
o Signal Length
o Z-VWAP Lengt
o MACZ Constant A
o MACZ Constant B
- Williams %R
o Input TF
o Length
Scanning for potential entry
Condition 3 :
- Signal Line from MACD must be above 2
- Williams is above -20
Condition 4 :
- Signal Line from MACD must be below -2
- Williams is below -80
à The Alarm is triggered as soon as the conditions 3 or 4 from both timeframes are true
Additional Settings
- We want to set the last x fractals to be used for triggering alarms.
- After an alert wait at least x candles on the current Timeframe to open the next alert
//
// @author LazyBear
// List of all my indicators:
//
study("MAC-Z VWAP Indicator [LazyBear]", shorttitle="MACZVWAP_LB")
fastLength = input(12, minval=1, title="MACD Fast MA Length"), slowLength=input(25,minval=1, title="MACD Slow MA Length")
signalLength=input(9, title="MACD Signal Length")
lengthz = input(20, title="Z-VWAP Length")
lengthStdev=input(25, title="Stdev Length")
A=input(1.0, minval=-2.0, maxval=2.0, title="MACZ constant A")
B=input(1.0, minval=-2.0, maxval=2.0, title="MACZ constant B")
useLag=input(false, type=bool, title="Apply Laguerre Smoothing")
gamma = input(0.02, title="Laguerre Gamma")
source = close
calc_laguerre(s,g) =>
l0 = (1 - g)*s+g*nz(l0[1])
l1 = -g*l0+nz(l0[1])+g*nz(l1[1])
l2 = -g*l1+nz(l1[1])+g*nz(l2[1])
l3 = -g*l2+nz(l2[1])+g*nz(l3[1])
(l0 + 2*l1 + 2*l2 + l3)/6
calc_zvwap(pds) =>
mean = sum(volume*close,pds)/sum(volume,pds)
vwapsd = sqrt(sma(pow(close-mean, 2), pds) )
(close-mean)/vwapsd
zscore = calc_zvwap(lengthz)
fastMA = sma(source, fastLength)
slowMA = sma(source, slowLength)
macd = fastMA - slowMA
macz_t=zscore*A+ macd/stdev(source, lengthStdev)*B
macz=useLag ? calc_laguerre(macz_t,gamma) : macz_t
signal=sma(macz, signalLength)
hist=macz-signal
plot(hist, color=red, style=area, title="Histogram", transp=85)
plot(macz, color=green, title="MAC-Z", linewidth=2)
plot(signal, color=orange, title="Signal", linewidth=2)