Per

Trading with the trend | W+D screening of Value Zone entries

Category: Screeners By: Per Created: February 21, 2018, 9:41 AM
February 21, 2018, 9:41 AM
Screeners
6 Comments
Trading with the trend | W+D screening of Value Zone entries

Trend following – Swing trading entry, screening of VZ

  1. W(Weekly tf): Screening for trend 10 vs. 20W EMA (can be optimized by 5, 10, 20, 50..).
  2. W(Weekly tf): Screening for price (close) crossing 20W EMA (can be optimized by 5, 10, 20..).
  3. D(Daily tf): Screening for MACD (close) crossing the Signal line (X-over in Up / X-under in Dn. -trends)
  4. Cherry picking: Copy the best results to a Hot-list that is observed in 4H + 1H charts, pending an entry trigger

Next step:

  • create a screener for the entry trigger in 4H+1H
  • Backtesting trading system based on the trigger
TIMEFRAME(Weekly)
//
//-Indicators
indicator0 = ExponentialAverage[10](close)
indicator1 = ExponentialAverage[50](close)
//
//-Trend:
DnTrendW = ( indicator0[5] < indicator1[5] )
UpTrendW = (indicator0[5] > indicator1[5])
//
//Value-Zone, price retracement (Zone-level = Indicator20)
indicator13 = ExponentialAverage[20](close)
VZinDnTrendW = (close[0] >= indicator13[0])
VZinUpTrendW = (close[0] <= indicator13[0])
//
TIMEFRAME(Daily)
//
//-A trending trend[W], correction[W])MACD-line crossing Signal-line[D]
//
indicator10 = MACDline[7,14,3](close)
indicator11 = ExponentialAverage[3](indicator10)
VZinUpTrendD = indicator10 >= indicator11
VZinDnTrendD = indicator10 <= indicator11
//
TIMEFRAME(DEFAULT)
//
DnTrendSummary = DnTrendW AND VZinDnTrendW AND VZinDnTrendD 
UpTrendSummary = UpTrendW AND VZinUpTrendW AND VZinUpTrendD
//
//-DnTrend
//
If DnTrendSummary then
 myTrend = -1
else
 myTrend = 0
Endif
//
//-UpTrend
//
If UpTrendSummary then
 myTrend = 1
else
 myTrend = 0
Endif
//
//-Summary
//
If mytrend = 1 then
 Filter = 1
Elsif myTrend = -1 then
 Filter = 1
else 
 Filter = 0
endif

SCREENER[Filter] (myTrend AS "Lng.1|Sht.-1")

Download
Filename: Trading-with-the-trend.itf
Downloads: 494
Per
Per Average
PRT Trading trading by IG. I am following trends, trading with the trend, trend following or a swing with the trend. I am developing coding skills and back-test new strategies to evaluate strategies.
Author’s Profile

Comments

Per Inge
8 years ago
#

Gents - An update - I have been studying various trading approaches, as this one that is based on the moves in a trend, detecting triggers on the variations within. I was not able to find satisfactory repeatable and predictive outcome. As you know, here is where the money management kick in and the end-result comes form the balance between. If i may suggest a way forward, tweak the parameters on for example an instrument that by observations moves less random than often seen by forex and if successful in no less than 4 out of 10 triggers - the rest is done by money management. (I have moved over to more trend following on longer timeframes W and M to mitigate the stress of the trading "robots" as it took too much an effort to deal with it.) P

Jessar
8 years ago
#

guten Tag, gibt es bereits die Aktualisierte Datei?

Actabi
8 years ago
#

Thank you ! Have you realised your "next step" ?

Per Inge
9 years ago
#

Thanks for your advice, that is useful and I will study that option. I found that problem as well, and have developed it further. Are there any way that I can edit it online at this time ? (Or, alternatively how do I proceed ? )

Nicolas
9 years ago
#

You can send me updates through the form on the contact page: https://www.prorealcode.com/contact/ Thank you very much for your contribution!

Nicolas
9 years ago
#

Thank you for this valuable stock screener. However, I can't get bearish signals with the code (mytrend=-1)? To "backtest" the signals, we could compare the actual Close with the Close when the signal occurred X bars ago in ProScreener.

ProRealCode ProRealCode
Loading...