We buy when the price is below the EMA200 and above the EMA50 (sik!).
As a filter we use a simple linear regression slope.
We sell when the price is above the EMA28 and below the EMA7.
It really couldn’t be easier
thats all for today
until then
//-------------------------------------------------------------------------
// maincode : everytimelong g50 k100 lrs
//-------------------------------------------------------------------------
// ger40 longonly strategie
// timezone europe, berlin
// timeframe 4h
// created and coded by johnscher
defparam cumulateorders = true // false is working well
once ordersize = 1
TradingDay = Opendayofweek = 1 or Opendayofweek = 2 or Opendayofweek = 3 or Opendayofweek = 4 or Opendayofweek = 5
TradingTime = time >= 090000 and time <= 170000
c1 = close > Exponentialaverage [50] (close)
c2 = close < Exponentialaverage [100] (close)
c3 = close > close [1]
c4 = LinearRegressionSlope[100] (close) < 0
IF TradingDay and TradingTime then
If c1 and c2 and c3 and c4 then
buy ordersize contract at market
Endif
ENDIF
c5 = close < Exponentialaverage [7] (close)
c6 = close > Exponentialaverage [28] (close)
IF longonmarket then
If c5 and c6 then
sell at market
Endif
Endif
Set Stop %Loss 10 //as insurance
Set Target %profit 2.75