It’s pretty simple.
We take a fast average and a slow average.
We set two filters: the ATR and the time.
Now if the fast average is above the slow average and we get a simple 3 candle reversal we sell.
There is a fifty fifty chance, but this time we win.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
//------------------------------------------------------------------ // OnlyShort Strategy on Dax // Dax 1 Euro Mini // TimeZone europe, berlin // TimeFrame 4H // MainCode : 4HS STORM - ShorT On Rising Markets // created and coded by JohnScher //------------------------------------------------------------------ defparam cumulateorders = false // works with true too once ordersize = 1 //Pentuple Exponential Moving Average period1 = 50 Period = MAX(Period1, 1) MA1 = ExponentialAverage[Period](close) MA2 = ExponentialAverage[Period](MA1) MA3 = ExponentialAverage[Period](MA2) MA4 = ExponentialAverage[Period](MA3) MA5 = ExponentialAverage[Period](MA4) MA6 = ExponentialAverage[Period](MA5) MA7 = ExponentialAverage[Period](MA6) MA8 = ExponentialAverage[Period](MA7) PEMA = (8 * MA1) - (28 * MA2) + (56 * MA3) - (70 * MA4) + (56 * MA5) - (28 * MA6) + (8 * MA7) - MA8 //Hull Moving Average period2 = 100 Period2 = MAX(Period2, 1) HMA = WeightedAverage[ROUND(SQRT(Period2))](2 * WeightedAverage[ROUND(Period2 / 2)](close) - WeightedAverage[Period2](close)) // filter time tm = openmonth <> 4 and openmonth <> 10 td = opendayofweek >= 2 and opendayofweek <= 5 tt = time >= 090000 and time <= 210000 // conditions c1 = close > PEMA c2 = PEMA > HMA c3 = close < close[1] // 3-candle-revers, could be tested with some bearish candlestick pattern c4 = close[2] < close[1] c5 = averagetruerange [5] > 40 // filter, someone could be find betterone // maincode if tm and td and tt then if c1 and c2 and c3 and c4 and c5 then sellshort ordersize contracts at market endif endif // fifty fifty chance set stop %loss 2 set target %profit 2 // no trailing, no strategyprofit, no ... |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :
Filename : download the ITF files
How to import ITF files into ProRealTime platform?
PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Thanks for sharing your strategy. Would it be possible to make it work in shorter TF’s like 5m or 1m?
Rgds
With averages you can play around a lot, also in the lower timeframes, there are dozens possibilities.
Compare averages here – https://www.prorealcode.com/prorealtime-trading-strategies/optimization-ma-cross-machine-learning/
To keep it simple I use here 2 known averages in default settings and set the filters time and ATR.
nothing completly indifferent
JohnScher, merci de partager ta stratégie.
Je suis nouveau dans ce domaine, sur ton code quel est le stop loss ?
D’avance merci
As a percentage of the price, here 2%.
StopLoss as well as TargetProfit.
SL and TP come from my basic approach to trading.
Every time we have a 50/50 chance to win a trade with the same SL and same TP. In the end over countless trades we have to suffer a loss because of the spread.
And now add the conditions at which we enter a trade. If we enter the trade on our conditions, the scales tip in our favor.
// fifty fifty chance
set stop %loss 2
set target %profit 2
I absolutely love the simplicity of this mean-reversion strategy.
Well done!