While searching for profitable strategies, I came across something really simple in various forums and websites.
Basically it’s a trend following system and here we are only looking at the long side.
The trend is long when the price is above a higher average.
If the trend is long we take a long position after the morning tussle in the Dax at a late lunch. We hold the position overnight until the next morning and then liquidate it.
In my systems I like to set a filter after the time. Here for seasonal reasons some months and because of the over-weekend-risk friday are excluded.
As an explanation can be considered that the Dax follows the strong development of the S&P500 and DowJones shortly before and with their opening bell.
//-------------------------------------------------------
// late lunch trade
// instrument dax40
// timezone europe, berlin
// timeframe 30m
// created and coded by JohnScher
//-------------------------------------------------------
defparam cumulateorders= false
//defparam flatafter = 213000 // works too
once ordersize = 1
tm = openmonth <> 6 and openmonth <> 7 and openmonth <> 8
td = opendayofweek >= 1 and opendayofweek <= 4
tt = time = 133000
c = close > exponentialaverage [6] (close)
if tm and td and tt and c then
buy ordersize contracts at market
endif
if onmarket and time = 080000 then
sell at market
endif
set target %profit 1.5
// until then
Hi JohnScher, Thanks a lot for your contribution. Consider this release to avoid overfit. Some others suggestions? Kind Regards. //------------------------------------------------------- // late lunch trade // instrument dax40 // timezone europe, berlin // timeframe 30m // created and coded by JohnScher //------------------------------------------------------- defparam cumulateorders= false EntraLong=1 EntraShort=1 TagliaPosizione=1 MySL=3 MyTP=3 time2trade = time = 133000 TriggerL = close > exponentialaverage [6] (close) TriggerS = close < exponentialaverage [6] (close) PatternL=rsi[2](Close)>65 PatternS=not (dlow(1)>dlow(5)) if EntraLong AND time2trade AND TriggerL AND PatternL then buy TagliaPosizione contracts at market endif if EntraShort AND time2trade AND TriggerS AND PatternS then sellshort TagliaPosizione contracts at market endif ExitL=time=080000 ExitS=time=213000 If LongOnMarket AND ExitL then sell at market endif If ShortOnMarket AND ExitS then exitshort at market endif If OnMarket AND MySL>0 then set stop %loss MySL endif If OnMarket AND MyTP>0 then set target %profit MyTP endif