The Grinder EUR/USD 5 min / intraday trading strategy

Category: Strategies By: TempusFugit Created: March 30, 2017, 6:59 PM
March 30, 2017, 6:59 PM
Strategies
23 Comments

This is my first autosystem, thanks to the many people in this web that help me with it. I designed it with the idea of being versatile so it can work within bulls, bears and neutrals periods, also with different markets, timeframes or indicators. I put here one of the setups I designed but I have tried others with similar results in backtesting, e.g. DOW-15m-MACD.

There´s not size management. I have tried roughly several approachs but I was not convinced about them. I decided to leave the size of the positions to the monetary circumstances of each one. Also it can be a good topic to contribute ideas here.

I can only backtest with 100k candles, it would be nice if someone can do it before that.

To use you need to import in PRT the Divergence Indicator “Divergence-RSI-V3.itf” and the system itself “The Grinder-EUSD-5M-v0.itf”

SETUP:

  • EUR/USD Intraday, from 08:00 to 19:00
  • 5 minutes TimeFrame

HOW IT WORKS:

  • It uses an indicator that detectes divergences between price and RSI to look for swing highs and lows (This indicator is based in an original idea of “jose7674”. Thanks for it Jose, sorry I don´t remember where I get it, not in this web)
  • It filters trends with a modified Donchian Channel
  • Additionally when a %Loss is reached it switchs to the opposite direction as a trend should be underway
  • The %Profit is high and rarely used as the system itself look for highs and lows to change position
  • The %Loss is not used, coded as a precaution, as the system switch direction before getting to it
// System parameters
DEFPARAM CumulateOrders = False
DEFPARAM PRELOADBARS = 2000
DEFPARAM FLATBEFORE = 080000
DEFPARAM FLATAFTER = 190000
LimitEntryTime = 184000 //No Entries after this time

// Divergence Indicator RSI
ignored, DRSI = CALL "Divergence RSI v3"[24,8,1,0]
BullishDivergence = DRSI = 1
BearishDivergence = DRSI = -1

// Filter to avoid entries on a trend (Delayed Donchian Canal with a Margin)
NotBearTrend = LOWEST[120](close[15]) < (close+((close*SafetyMargin)/100))
NotBullTrend = HIGHEST[120](close[15]) > (close-((close*SafetyMargin)/100))
SafetyMargin = 0.15

// Conditions for Entry of Long Positions
IF BullishDivergence AND NotBearTrend AND OPENTIME<=LimitEntryTime THEN
 BUY 1 CONTRACTS AT MARKET
ELSIF SHORTONMARKET AND ((CLOSE-TRADEPRICE)/TRADEPRICE)*100 > FlipPosition THEN// Change from short to long position when the FlipPosition Stop reached, because a trend is underway
 BUY  1 CONTRACTS AT MARKET
ENDIF

// Conditions for Entry of Short Positions
IF BearishDivergence AND NotBullTrend AND OPENTIME<=LimitEntryTime THEN
 SELLSHORT 1 CONTRACTS AT MARKET
ELSIF LONGONMARKET AND ((CLOSE-TRADEPRICE)/TRADEPRICE)*100 < -FlipPosition THEN// Change from long to short position when the FlipPosition Stop reached, because a trend is underway
 SELLSHORT 1 CONTRACTS AT MARKET
ENDIF

// Loss, Profit and Flip Stops
SET STOP %LOSS 3 // Not used because the Flip Stop is lower, just in case.
SET TARGET %PROFIT 3
FlipPosition = 1.5 // It this %Loss is reached the position turns in the opposite direction (Long->Short or Short->Long)

// END

 

Download
Filename: The-Grinder-EUSD-5m-v0.itf
Downloads: 690
Download
Filename: Divergence-RSI-v3.itf
Downloads: 702
TempusFugit Veteran
I usually let my code do the talking, which explains why my bio is as empty as a newly created file. Bio to be initialized...
Author’s Profile

Comments

Logo Logo
Loading...