The WeeklyLongon the Dax – a seasonality
Forums › ProRealTime English forum › ProOrder support › The WeeklyLongon the Dax – a seasonality
- This topic has 2 replies, 2 voices, and was last updated 3 years ago by
JohnScher.
-
-
09/14/2020 at 2:32 PM #144137
After observing it from the corners of my eyes for the last few years, I went here to measure it.
The seasonality is shown when I buy the Dax on Monday morning and sell it on Friday evening.In order to have valid data going back as far as possible in a 200k backtest, I used the 8H chart. 200k offers a backtest in the 8H until the 1st trade on July 17, 2006 with an entry in the Dax Monday morning 09.00 a.m. and exit on Friday evening 05.00 p.m.
To measure whether it is a Low, I use a linear regression to form a corridor with its optimised values. For the Low I add a close < close [1] and set a filter with the CCI in standard values. That is all.
In the result I “measured” at which values one would have had to buy the Dax to achieve this brilliant result.
Whether the Dax will behave like this in the future, I dare to doubt, but it is worth a try with a limited budget.12345678910111213141516171819202122232425262728293031323334//-------------------------------------------------------// maincode "the weekly long - buy the low"// from timebased-series//// timezone europe, berlin// timeframe 8h//// created and coded by johnscher//-------------------------------------------------------defparam cumulateOrders = true // false no problemfor period = 50 to 60 do //floorperiod = max(period, 2)avg = LinearRegression[period](close)nexttt = opendayofweek = 1 and time = 090000c1 = average [1] (close) < avg // low!c2 = average [1] (close) < average [2] (close) // low!c3 = cci [20] > - 200 // filter, standard valueif tt and c1 and c2 and c3 thenbuy at marketendifif opendayofweek = 5 and time = 170000 thensell at marketendifset stop %loss 5 // as insurance - works without tooset target %profit 5 // hooray! - works without toothat´s all- untile then
johnscher
09/14/2020 at 2:37 PM #144222Hi John, thanks for the sharing the idea. I moved your post into the forum, because I think that there might be a problem with your linear regression loop. With this code, you will always use the same period (60) which is the last period of your loop. So your loop is not useful at all. But I might have wrongly understood your description: “I use a linear regression to form a corridor with its optimised values.” ?
12/28/2021 at 6:31 PM #184042Hello.
I go back to the topic Monday morning long in the Dax if …
The linear regression should only serve as a filter to show a certain depth of the Dax, which is a prerequisite that the long works on Monday morning
It makes no sense Monday morning to long the Dax if it is just at a new ATH.
It is better to long the Dax on Monday morning for the rest of the week when it is “down”.
Linear Regression can be used as a filter or the following filters are coded in.My point here is the idea behind it.
Buy the Dax on Monday morning in the low, not in the high.
If the idea is good, I could prepare it for the library.until
JohnScherTranslated with http://www.DeepL.com/Translator (free version)
Dax - Weekly Long Filter CCI1234567891011121314151617181920212223242526//-------------------------------------------------------------------------// Weekly Long Monday Morning - a seasonality// instrument ger40// from timebased series// timezone europe time, berlin// timeframe 4H// created and coded by johnscher//-------------------------------------------------------------------------defparam cumulateorders = true// Exponentialaverage and cci as filterc1 = cci [20] > -180c2 = close < exponentialaverage [23] (close)if opendayofweek = 1 and time = 090000 thenIF c1 and c2 thenbuy at marketendifendifif onmarket and opendayofweek = 5 and time = 210000 thensell at marketendif// end No1Weekly Long Filter 2PGF12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152//-------------------------------------------------------------------------// Weekly Long Monday Morning - a seasonality// instrument ger40// from timebased series// timezone europe time, berlin// timeframe 4H// created and coded by johnscher//-------------------------------------------------------------------------defparam cumulateorders = true// Two Pool Gaussian and cci as filterperiod = 70period = MAX(Period, 2)series = closeIF BarIndex = 0 THENw = 2 * 3.141592654 / Periodw = 180 * w / 3.141592654b = (1 - COS(w)) / (1.41421 - 1)aa = -b + SQRT(b * b + 2 * b)a1 = 1 - aaa12 = a1 * a1a2 = aa * aay1 = Seriesy2 = y1ENDIFy = a2 * Series + 2 * a1 * y1 - a12 * y2y2 = y1y1 = ycfil = yc1 = close < cfilc2 = cci [23] > -180if opendayofweek = 1 and time = 090000 and c1 and c2 thenbuy at marketendifif onmarket and opendayofweek = 5 and time = 210000 thensell at marketendif// end no2screenshot also athttps://prnt.sc/24zaht2 -
AuthorPosts
Find exclusive trading pro-tools on