Euro Grid by Dietmar

Post Reply
DragosDanescu
Trader
Posts: 118
Joined: Wed Nov 16, 2011 5:18 pm
Location: Oradea, Western Romania

Euro Grid by Dietmar

Post by DragosDanescu »

SERIOUS WARNING

* Most Forex traders lose all their money.
* Using the robot posted here in trading Forex does not guarantee success.
* Trading this robot could lead to serious financial loss.
* Trading this robot without understanding its underlying trading strategies guarantees traders will lose their money.
* This is not a set-and-forget ea; there is no such thing and anyone who tries to claim there is, is either stupid or lying. This ea requires frequent manual intervention.
* At best, a trading robot is only 90% as good as the manual strategy it trades. At best. At worst, it can be much less effective. If the strategy is rubbish, so is the robot.
* To trade this robot, you have to understand:
* How to use EA's.


DO NOT USE THIS EA ON A LIVE ACCOUNT. IT IS EXPERIMENTAL.

Essential posts to read

A description of Dietmar strategy can be found here http://www.stevehopwoodforex.com/phpBB3 ... f=16&t=101. I basically add almost everything that comes to my brain tonight to the EA options, but new ideas are always welcome.

As a summary:
* option to send NewGrid, even the previous one is not closed yet;
* Different Level Lots, considering Base as reference price(Close of the trigger candle), lots are multiplied for every Level, until TP.I think EA inputs are self explanatory;
* Use Martingale, in the orders sequence.If a level is touched by price once, lotsize is starting size, if opposite level touched, the Martingale starts, and so on.It activates only on touching the opposite level.
CAUTION! Even it can be used simultaneously with Different Level Lots, I DON'T ADVISE this, as lotsize can reach huge values really fast.Use them at your own risk.
* User configurable info display, can be turned off.

UPDATE 1 dec 2011
*Fixed bugs about order selection, deleting pendings left and some other bugs;
*Fixed routine to postpone a new grid up to 5 days from the initial one, if the initial one is not yet closed.(That would be a real problem if happens)
*Also, improved user display, so EA will show it's trading status.
*Any TIME input is corresponding to BROKER time now, to avoid confusion.Grid start time must be converted to GMT.

UPDATE 6 dec 2011
*Trading times removed.
*Added LevelOffset dinamic calculation based on previous day range.If that is greater than the fixed value, and previuos day range > 80 pips(just a guess), EA will use dinamic value.
*Also hope I solved issues of not launching pending grid orders.
*EDITED: Also implemented option to increase lotsize of next opposite grid trades, if number of open trades(market orders) is above a selected value.That's TradesNo and LotsIncrease options.

UPDATE 7/8 dec 2011
*Added Variable SL options.Those are as follows:
--> UseFixedStop. Selecting this option as true, sets a fixed level for SL for all levels of the grid, but, instead of the original strategy, you can select which of the 4 levels(3 order levels + TP level) you wanna use as SL for opposite orders. Example: we set StopLevel at 2(meaning opposite Level 2 of grid);all but orders will have SL at level 2 of sell grid(instead at sell TP), reverse for all sell orders; setting StopLevel at 4, results in original strategy SL.
Cannot be used together with UseDynamicStop, also cancels original SL strategy.
--> UseDynamicStop. Selecting this as true, sets a fixed value for SL, value corresponding to a certain level of the grid, BUT the value is the same for all grid levels. Example: with UseDynamicStop = true, we set StopLevel at 2; 1st buy pending will have SL at level 2 from sell grid(that means also a difference of 3 LevelsOffset, so, basically, for each buy order, SL = 3*LevelsOffset). 2nd buy order will have SL at level 1 from sell grid, 3rd at Base(Base meaning the reference price level of grid = close of 6:45 candle). Reverse for the sell grid.
Cannot be used together with UseFixedStop, also cancels original SL strategy.

If both are set as false, EA will use original SL strategy, which is TP of opposite pending grid.

I have applied same logic for TP in the v.4. It's just a difference: UseFixedProfit and it's value ProfitLevel, means at x LevelsOffset form the open price of the highest/lowest order in grid.

Those been said, have fun!

Dragos
You do not have the required permissions to view the files attached to this post.
Last edited by DragosDanescu on Fri Dec 09, 2011 9:00 am, edited 15 times in total.
Image
User avatar
Gamma_gallus
Trader
Posts: 118
Joined: Wed Nov 16, 2011 2:03 pm
Location: France

Re: Euro Grid by Dietmar

Post by Gamma_gallus »

Great ! Thanks a lot.

I put it on demo too, I'll share the results.

Quick question : trading hours options are based on the computer time, right ?

I tried to run a backtest, and it seems we need to have one of the margin check chosen (Kiwi or Scoobs) otherwise we get an error (ordersend error 4501). Backtests finished empty so it looks like we can only make forward testings

Gamma
DragosDanescu
Trader
Posts: 118
Joined: Wed Nov 16, 2011 5:18 pm
Location: Oradea, Western Romania

Re: Euro Grid by Dietmar

Post by DragosDanescu »

Gamma_gallus wrote:Great ! Thanks a lot.

I put it on demo too, I'll share the results.

Quick question : trading hours options are based on the computer time, right ?

I tried to run a backtest, and it seems we need to have one of the margin check chosen (Kiwi or Scoobs) otherwise we get an error (ordersend error 4501). Backtests finished empty so it looks like we can only make forward testings

Gamma
Sorry, was a bloop in the code, please redownload. Sorry again.
Yes, computer time, converted to GMT.
Image
User avatar
forextrader-radioman
Trader
Posts: 156
Joined: Sun Nov 27, 2011 11:11 am
Location: Hamburg/Germany

Re: Euro Grid by Dietmar

Post by forextrader-radioman »

Dragos,
thank you very very much for coding that EA to manage the strategy!

lets start testing with this baby :)

, Dietmar

PS: just running a backtest (Empty4 strategytester) at my VPS ... if I look at GBPUSD ... maybe it would be nice to have the option:

- trade on friday (true/false)
- trade on monday (true/false)

... and it looks like the EA is creating new pending orders not at the same levels as before.

Example:
If short1 is triggered, there must be set additional pending orders at long1, long2 and long3 levels, but not at new prices ... the new additional long1, long2 and long3 pending orders must have the same entry price as the old long1, long2 and long3 ... and also the same old TP and SL level ...
„Reality is merely an illusion, albeit a very persistent one.” (Albert Einstein) "Realität ist lediglich eine Illusion, allerdings eine sehr hartnäckige."
User avatar
fxozgirl
Trader
Posts: 1176
Joined: Wed Nov 16, 2011 9:16 am
Location: Melbourne, Australia

Re: Euro Grid by Dietmar

Post by fxozgirl »

Looking forward to giving this a go...

thanks Dietmar and Dragos :)
DragosDanescu
Trader
Posts: 118
Joined: Wed Nov 16, 2011 5:18 pm
Location: Oradea, Western Romania

Re: Euro Grid by Dietmar

Post by DragosDanescu »

forextrader-radioman wrote:Dragos,
thank you very very much for coding that EA to manage the strategy!

lets start testing with this baby :)

, Dietmar

PS: just running a backtest (Empty4 strategytester) at my VPS ... if I look at GBPUSD ... maybe it would be nice to have the option:

- trade on friday (true/false)
- trade on monday (true/false)

... and it looks like the EA is creating new pending orders not at the same levels as before.

Example:
If short1 is triggered, there must be set additional pending orders at long1, long2 and long3 levels, but not at new prices ... the new additional long1, long2 and long3 pending orders must have the same entry price as the old long1, long2 and long3 ... and also the same old TP and SL level ...
It should do exactly that way, yes, but I forgot to add some code to the section designed to prevent opening a new grid, if one in place. During the same day, it uses as reference only the close of the previous cadle compared to the Grid send time. But on the start time next day, if grid is still in place comapres with the new candle, even if it doesn't send a new initial grid. That's why different levels.

Hold on, I'm on it.
Image
garyfritz

Re: Euro Grid by Dietmar

Post by garyfritz »

I believe you are correct. TP for longs is 60pips above middle price, SL is 60 pips below.

long1 SL:TP is 75:45 = 1.6667:1
long2 SL:TP is 90:30 = 3:1
long3 SL:TP is 105:15 = 7:1

This has been one of the concerns I had about the method. The R:R is very high. I don't know what the win% is. The other major concern is the unbounded position size and therefore unbounded risk. (I think. I'm a bit unclear on exactly how it's supposed to work if the market slops back and forth and causes you to enter many positions.) This is why I was toying with ideas to improve the R:R and put an upper bound on the risk.

Dietmar's results for November were VERY impressive. But I worry that this approach could be like selling options, or like many FX scalpers: lots of little wins, lots of little wins, then WHAM -- a loss that wipes you out. George's recent post showed an example where one day's loss wiped out weeks of profits.

Forward testing won't answer that question unless you happen to hit one of those WHAM events in your test. I'd want to understand the risks very clearly before I committed money to this approach.
DragosDanescu
Trader
Posts: 118
Joined: Wed Nov 16, 2011 5:18 pm
Location: Oradea, Western Romania

Re: Euro Grid by Dietmar

Post by DragosDanescu »

I have fixed some bloops and the orders select functions, it's working properly now, still working on logic for the situation grid is not closed in the same day. Update in post 1.

EDITED

Ok, I think I fixed also the grid not closing in the same day problem. Update in post 1.
Last edited by DragosDanescu on Thu Dec 01, 2011 8:17 pm, edited 1 time in total.
Image
garyfritz

Re: Euro Grid by Dietmar

Post by garyfritz »

Khalaad wrote:What would you say if I tell you Dragos's EA raked in 6449.1 pips in less tan 6 hours trading a 40K demo account winning 289 out of 318 trades :?:
Hm, 6449 pips in a day, I could get used to that. :)

So with a 3.9:1 R:R, and 289 out of 318 = 90.9% win rate, the expectancy is
0.909 * 1 - 0.091 * 3.9 = 0.55 -- an excellent figure, as you'd expect with such a great profitable day.

But that doesn't answer the Black Swan question... which is maybe what you're saving for Part TWO?

My current main system has about a 2:1 R:R (based on actual average sizes over hundreds of trades -- the initial risk per trade is closer to 4:1) and a win rate around 78%. So its expectancy is only 0.78 * 1 - 0.22 * 2 = 0.34. That's a lower expectancy, and it doesn't make nearly the pips that Dietmar's strategy does. But it has clearly-defined maximum risk parameters so I don't worry about getting wiped out.

I think Dietmar's strategy has tremendous potential, but I would only trade it if I could put an acceptable cap on the risk. That also determines the profits you can make from it -- 6500 pips is not too exciting if you have to trade 0.01 lots. But if you can determine your maximum risk, you can size your trades more aggressively and pull a lot more profit out of the system.

But you knew that. :D
DragosDanescu
Trader
Posts: 118
Joined: Wed Nov 16, 2011 5:18 pm
Location: Oradea, Western Romania

Re: Euro Grid by Dietmar

Post by DragosDanescu »

garyfritz wrote:
Khalaad wrote:What would you say if I tell you Dragos's EA raked in 6449.1 pips in less tan 6 hours trading a 40K demo account winning 289 out of 318 trades :?:
Hm, 6449 pips in a day, I could get used to that. :)

So with a 3.9:1 R:R, and 289 out of 318 = 90.9% win rate, the expectancy is
0.909 * 1 - 0.091 * 3.9 = 0.55 -- an excellent figure, as you'd expect with such a great profitable day.

But that doesn't answer the Black Swan question... which is maybe what you're saving for Part TWO?

My current main system has about a 2:1 R:R (based on actual average sizes over hundreds of trades -- the initial risk per trade is closer to 4:1) and a win rate around 78%. So its expectancy is only 0.78 * 1 - 0.22 * 2 = 0.34. That's a lower expectancy, and it doesn't make nearly the pips that Dietmar's strategy does. But it has clearly-defined maximum risk parameters so I don't worry about getting wiped out.

I think Dietmar's strategy has tremendous potential, but I would only trade it if I could put an acceptable cap on the risk. That also determines the profits you can make from it -- 6500 pips is not too exciting if you have to trade 0.01 lots. But if you can determine your maximum risk, you can size your trades more aggressively and pull a lot more profit out of the system.

But you knew that. :D
Gary, you can limit risk in two ways:

1st, if using OverallProfit closing option, this can work both ways, positive or negative, so you can limit your loss, by changing that into a negative value; If Positions profit becomes > Value, orders are closed;

2nd, if using Martingale or DiffLevelLots, both are limited to MaxLots, if SendLots=MaxLots, EA will further send MaxLots;so, if you use a certain value here, Mart will never override that value.

Hope this helps.
Image
Post Reply

Return to “Automated trading systems”