ATR Crossover EUR/USD 5min
Forums › ProRealTime English forum › ProOrder support › ATR Crossover EUR/USD 5min
- This topic has 8 replies, 2 voices, and was last updated 7 years ago by
imokdesign.
-
-
07/03/2017 at 8:48 AM #39630
Hi, I want to share my first simple EUR/USD (mini) 5 min Strategy, based on the ATR and two Moving Averages. As you can see it reacts to the recurring ATR pattern, when the EU Session starts, some Volume and Volatility came into the Market. It Trades Long, when the ATR Crosses above 0,0003 and the moving averages are positiv. It Trades Short, when the ATR Crosses above 0,0003 and the moving averages are negativ. I test it with a 1,5 Spread.
I also test the Strategie with the following parameters:
ATR (14)
Stop 40
Profit 40It is slightly worse than the current parameters, but it has not such a Drawdown at the end. Unfortunately I can not make a longer backtest. If someone has the possibility, I would be very happy, also if someone had good ideas to optimize it. 🙂
12345678910111213141516171819202122232425262728293031323334353637383940414243// Festlegen der Code-ParameterDEFPARAM CumulateOrders = False // Kumulieren von Positionen deaktiviert// Das Handelssystem wird um 0:00 Uhr alle pending Orders stornieren und alle Positionen schließen. Es werden vor der "FLATBEFORE"-Zeit keine neuen Orderaufträge zugelassen.DEFPARAM FLATBEFORE = 080000// Stornieren aller pending Orders und Schließen aller Positionen zur "FLATAFTER"-ZeitDEFPARAM FLATAFTER = 210000// Verhindert das Platzieren von neuen Ordern zum Markteintritt oder Vergrößern von Positionen vor einer bestimmten UhrzeitnoEntryBeforeTime = 080000timeEnterBefore = time >= noEntryBeforeTime// Verhindert das Platzieren von neuen Ordern zum Markteintritt oder Vergrößern von Positionen nach einer bestimmten UhrzeitnoEntryAfterTime = 153000timeEnterAfter = time < noEntryAfterTime// Verhindert das Trading an bestimmten WochentagendaysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0// Bedingungen zum Einstieg in Long-Positionenindicator1 = AverageTrueRange[5](close)c1 = (indicator1 CROSSES OVER 0.0003)indicator2 = Average[10](close)indicator3 = Average[20](close)c2 = (indicator2 > indicator3)IF (c1 AND c2) AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry THENBUY 1 CONTRACT AT MARKETENDIF// Bedingungen zum Einstieg in Short-Positionenindicator4 = AverageTrueRange[5](close)c3 = (indicator4 CROSSES OVER 0.0003)indicator5 = Average[10](close)indicator6 = Average[20](close)c4 = (indicator5 < indicator6)IF (c3 AND c4) AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry THENSELLSHORT 1 CONTRACT AT MARKETENDIF// Stops und TargetsSET STOP pLOSS 36SET TARGET pPROFIT 5407/03/2017 at 8:52 AM #39634Hi @imokdesign, great idea and nice post. I moved your strategy to the forum instead, to discuss about it. I made longer backtest and even if the result is not so bad, I should it should desserve a deeper analysis to make it even better! 🙂
Did you try to make dynamic stoploss and takeprofit instead of fixed ones in points?
07/03/2017 at 9:50 PM #39727Thanks for the qick reply. Yes, it would be nice if it will be discussed. 🙂 During the construction, I also tried just a ptrailingstop. But it didn’t work well. What do you mean exactly with “dynamic” Stop or Profit? Stop by an other indikator, ATR, or Trendstop at point3, etc. ? … or more then one Profittarget? Maybe I have to look at it a little bit closer again, it looks that it close its actual position when the next signal comes (screenshot). Maby I could change something at this point, or maby it needs a just a simple 200 sma.
07/03/2017 at 9:55 PM #39729… oh I am sorry: that was the wrong screenshot here is the correct one:
07/04/2017 at 9:56 AM #39763Stop by an other indikator, ATR, or Trendstop at point3, etc. ?
Exactly, a 54 points profit target doesn’t mean the same thing in a quiet market than in a strong directional one. By increasing the target/profit, you could also increase the risk reward ratio and afford to reduce the win/loss one.
07/05/2017 at 9:10 PM #39923I think my knowledge for an coding an ATR Stop is not enough at the moment. I looked at some Threads, and find some snippets from this post.
https://www.prorealcode.com/topic/open-range-breakout-atr14/
But i dont know it is the right way, maby i need some help, or just a small note.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748// Festlegen der Code-ParameterDEFPARAM CumulateOrders = False // Kumulieren von Positionen deaktiviert// Das Handelssystem wird um 0:00 Uhr alle pending Orders stornieren und alle Positionen schließen. Es werden vor der "FLATBEFORE"-Zeit keine neuen Orderaufträge zugelassen.DEFPARAM FLATBEFORE = 080000// Stornieren aller pending Orders und Schließen aller Positionen zur "FLATAFTER"-ZeitDEFPARAM FLATAFTER = 210000// Verhindert das Platzieren von neuen Ordern zum Markteintritt oder Vergrößern von Positionen vor einer bestimmten UhrzeitnoEntryBeforeTime = 080000timeEnterBefore = time >= noEntryBeforeTime// Verhindert das Platzieren von neuen Ordern zum Markteintritt oder Vergrößern von Positionen nach einer bestimmten UhrzeitnoEntryAfterTime = 153000timeEnterAfter = time < noEntryAfterTime// Verhindert das Trading an bestimmten WochentagendaysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0price = closeatr = averagetruerange[5]*2triggerB = price+atrtriggerS = price-atr// Bedingungen zum Einstieg in Long-Positionenindicator1 = AverageTrueRange[5](close)c1 = (indicator1 CROSSES OVER 0.0003)indicator2 = Average[10](close)indicator3 = Average[20](close)c2 = (indicator2 > indicator3)IF (c1 AND c2) AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry THENBUY 1 share at triggerB stopENDIF// Bedingungen zum Einstieg in Short-Positionenindicator4 = AverageTrueRange[14](close)c3 = (indicator4 CROSSES OVER 0.0003)indicator5 = Average[10](close)indicator6 = Average[20](close)c4 = (indicator5 < indicator6)IF (c3 AND c4) AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry THENSELLSHORT 1 share at triggerS stopENDIF// Stops und TargetsSET STOP pLOSS atrSET TARGET pPROFIT 1507/06/2017 at 9:06 AM #3993207/21/2017 at 10:44 AM #41273Thanks for the note, I had it totally overlooked. Last Weeks, I have now tried to improve the Strategy and stoptechniques, but In no attempt I have come to a better result. There is a thing, I do not quite understand yet. If I make certain stop atr settings, it looks as if it is Trade less. Why that? The strategy is the same, i just change the stop loss?
08/11/2017 at 11:59 AM #43020I have been watching this strategy for several Weeks. Sometimes (Rare) it happens that the strategy turns itself off, without the regularly Date update has expired. Does anyone know why that is, or is it due to the new LRAccount and Proorder requirements? I can not find a Codeline that speaks for it.
Would it be possible to program an email message when this case arrives?
-
AuthorPosts
Find exclusive trading pro-tools on