Euro Grid by Dietmar

scalpz
Trader
Posts: 42
Joined: Tue Jan 17, 2012 3:27 am

Re: Euro Grid by Dietmar

Post by scalpz »

garyfritz wrote:That doesn't look right to me, Dietmar. The "bool" statements were supposed to initialize the values to False, and then the "if" statements set them to True if the conditions were right. It looks to me like it will ALWAYS return true now.
I agree. Dietmar, I think your alteration is not good.
The ea uses chart time for starting the grid and uses your local time to see if its ok to be running.
Well thats what I read in the instructions or within the ea itself maybe.

Loaded up ea yesterday at 2:10 gmt/ chart time. Altered grid start to 02:15 cause I wanted to see it triggered and the asia session had been flat till then. 02:15 oh look at that 6 pending trades placed. Nice but they are .01 .02 .03 lots. mmmm :?

Checked settings - ok well now I see the usemultiplier & its at 1.5 - Well I will just run with that this time while I think that thru a bit.

All 3 buys eventually triggered & finally closed at 144 pip profit. All pending trades closed, including those sell-stops added at each buy trade opening.

Not bad, but for quite a while it looked as if the basket/grid would not have closed if it had been applied around the 7 or 8am gmt area.

Noticed the 3 sell-stop trades applied when the 3rd buy trade triggered had 4 or 5 pip higher settings for everything including SL. So heaps of extra red lines on the chart.

Not sure at all about the value of increasing lot size for the 2nd & 3rd trades. Makes it an all or nothing play until TP hit.

Now wondering if I can amend this ea to do the Graeme millipede type of baskets.

Play time.

cheers scalpz :D
Target 1 : SL in the green.
User avatar
forextrader-radioman
Trader
Posts: 156
Joined: Sun Nov 27, 2011 11:11 am
Location: Hamburg/Germany

Post by forextrader-radioman »

garyfritz wrote:That doesn't look right to me, Dietmar. The "bool" statements were supposed to initialize the values to False, and then the "if" statements set them to True if the conditions were right. It looks to me like it will ALWAYS return true now.
Garyfritz, I wondered about that, too ... but if the settings (only to see in MetaEditor, not in the "user inferface") are set at : 00:00 to 12:00 and 12:00 to 24:00 then the EA should run all the time.

But it did not! ... It stopped trading at 23:xx br0ker time.

I think, with setting "00:00 to 12:00 and 12:00 to 24:00" it is not relevant which time (br0ker or local) I use. All time is all time with no exeption.

And after I changed that from "false" to "true" EA is working as it should do here, full time, 24 hours a day (until trade has finished, that may be 1 hour or 1 day or 3 days... then it has to stop, not at a specified hour)

thank you for your input!
I hope that Dragos is looking at the EA again some time to make the small improvement ...

all the best,
Dietmar

PS: be careful, today is NFP
„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
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 »

scalpz wrote:
garyfritz wrote:That doesn't look right to me, Dietmar. The "bool" statements were supposed to initialize the values to False, and then the "if" statements set them to True if the conditions were right. It looks to me like it will ALWAYS return true now.
I agree. Dietmar, I think your alteration is not good.
The ea uses chart time for starting the grid and uses your local time to see if its ok to be running.
Well thats what I read in the instructions or within the ea itself maybe.

Loaded up ea yesterday at 2:10 gmt/ chart time. Altered grid start to 02:15 cause I wanted to see it triggered and the asia session had been flat till then. 02:15 oh look at that 6 pending trades placed. Nice but they are .01 .02 .03 lots. mmmm :?

Checked settings - ok well now I see the usemultiplier & its at 1.5 - Well I will just run with that this time while I think that thru a bit.

All 3 buys eventually triggered & finally closed at 144 pip profit. All pending trades closed, including those sell-stops added at each buy trade opening.

Not bad, but for quite a while it looked as if the basket/grid would not have closed if it had been applied around the 7 or 8am gmt area.

Noticed the 3 sell-stop trades applied when the 3rd buy trade triggered had 4 or 5 pip higher settings for everything including SL. So heaps of extra red lines on the chart.

Not sure at all about the value of increasing lot size for the 2nd & 3rd trades. Makes it an all or nothing play until TP hit.

Now wondering if I can amend this ea to do the Graeme millipede type of baskets.

Play time.

cheers scalpz :D
Hy Scalpz,

well, look at some posts b4 ... it looks like the lot multiplier is not working correct with that input. I run the EA here all time wit lot multi set to "2.0" and that works fine. First level is 0.01 (or 0.1) lot, second level is 0.02 (or 0.2) and third level is 0.04 (or 0.4) and thats exact what it should do with this setting.

But I can not check (and fix it) in MetaEditor why other settings (for example "1.5") are not working.

And today morning I also see that my EURJPY trades are closed, TP was hit but there where still some buy stop pending orders in the order book and chart. They where not deleted and that could be the reason why some have trouble with backtests over some days in a row. There is a bug in the EA ... so only run the EA at "one run only". Not in full automatic mode.

All the best to you and yours,
Dietmar
„Reality is merely an illusion, albeit a very persistent one.” (Albert Einstein) "Realität ist lediglich eine Illusion, allerdings eine sehr hartnäckige."
scalpz
Trader
Posts: 42
Joined: Tue Jan 17, 2012 3:27 am

Re: Euro Grid by Dietmar

Post by scalpz »

forextrader-radioman wrote: Hy Scalpz,

well, look at some posts b4 ... it looks like the lot multiplier is not working correct with that input. I run the EA here all time wit lot multi set to "2.0" and that works fine. First level is 0.01 (or 0.1) lot, second level is 0.02 (or 0.2) and third level is 0.04 (or 0.4) and thats exact what it should do with this setting.
Looks like the multiplier is working to me. 1.5 on 0.01 gives 0.02 then 0.03
0.01x1.5=0.015 which rounds up to 0.02 then 0.02x1.5=0.03 all good. I just dont like the idea of loading up as the risk increases.
forextrader-radioman wrote: And today morning I also see that my EURJPY trades are closed, TP was hit but there where still some buy stop pending orders in the order book and chart. They where not deleted and that could be the reason why some have trouble with backtests over some days in a row. There is a bug in the EA ... so only run the EA at "one run only". Not in full automatic mode.
Not an ea bug, just the way crap Empty4 works. When another tick arrives, the ea is stopped from doing whatever it is up to (like deleting pending orders) and restarts at the start() function.
Could maybe have some other function coded in to recheck for stray pending orders, but the logic would have to be pretty good as you wouldnt want it removing pending orders too early while it has open trades.
- Head starts hurting with that stuff :?

Had a good set of trades last night, sells through the London sess. TPs giving 67 +86 +60 pips. 213 in total :o
I noticed again that the set TP cuts off trades earlier than price action or trailing stops would have done. Once the 3rd trade is in the green for 10 or more, may be worth a move of the SL to the 2nd trade BE or better.

cheers scalpz :D

Ha - look at that I managed to split a post. Now just need to learn how to refer to 2 different posts in the 1 reply.
Target 1 : SL in the green.
garyfritz

Re: Euro Grid by Dietmar

Post by garyfritz »

scalpz wrote:Not an ea bug, just the way crap Empty4 works. When another tick arrives, the ea is stopped from doing whatever it is up to (like deleting pending orders) and restarts at the start() function.
You sure about that? I thought it *ignored* and dropped all incoming ticks until it finished with the last one...

Dietmar, could you post some times when you've initiated your traps with your "wait for ranging market" rules? I tried implementing it in Tradestation and the results weren't too impressive. Maybe I change how I detect the ranges.

Actually I was wondering if it would work better to wait for a market that's *moving* strongly, and set the trap there. If the market keeps moving, it'll blow right through your price levels in your trap, which is the ideal. When you set the trap on a range, the market might wander back & forth inside your trap for a while before it finally breaks out -- causing losses.
scalpz
Trader
Posts: 42
Joined: Tue Jan 17, 2012 3:27 am

Re: Euro Grid by Dietmar

Post by scalpz »

garyfritz wrote:
scalpz wrote:Not an ea bug, just the way crap Empty4 works. When another tick arrives, the ea is stopped from doing whatever it is up to (like deleting pending orders) and restarts at the start() function.
You sure about that? I thought it *ignored* and dropped all incoming ticks until it finished with the last one...
Well thanks :| - No I'm not sure now. :lol:
My version explains the type of errors I have seen occasionally, especially in multi pair trading ea's.

Cant immagine how to check that myself either. Will have to track out a super smart coder for that type of code.
A couple of counters running & store them into arrays & running after a set time for say 1 - 10 min. Maybe 2 eas on diferent charts, same pair.
ou shit my head hurts :lol:
Will ask around. ;)

cheers scalpz :D
Target 1 : SL in the green.
garyfritz

Re: Euro Grid by Dietmar

Post by garyfritz »

I checked -- see http://book.mql4.com/programm/special
In Expert Advisors the special function start() is called (and executed) immediately after a new tick comes. If a new tick has come during the execution of the special function start(), this tick will be ignored, i.e. the special function start() will not be called for execution when such a tick comes. All quotes received during the execution of the special function start() will be ignored. Start of the special function start() for execution is performed by the client terminal only provided that the previous operation session has been completed, the control has been returned to the client terminal and the special function start() is waiting for a new tick.
So yes, it definitely ignores and drops all ticks that arrive while you're in the start() function.
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 »

garyfritz wrote: [...] Dietmar, could you post some times when you've initiated your traps with your "wait for ranging market" rules? I tried implementing it in Tradestation and the results weren't too impressive. Maybe I change how I detect the ranges.

Actually I was wondering if it would work better to wait for a market that's *moving* strongly, and set the trap there. If the market keeps moving, it'll blow right through your price levels in your trap, which is the ideal. When you set the trap on a range, the market might wander back & forth inside your trap for a while before it finally breaks out -- causing losses.
Hy Garyfritz,

well, I use the last swing high and low at M15 time frame which is to see one hour before Frankfurt open, 2 hours before London open, and at pairs which did not made a huge move during the asia session.

I take the fibonacci tool, place it at high and low and 50% level will be my middle of trap. I measure the pips between high and low and divide it by 2.3 ... that is my level value. It should not be smaller than 15 pips. If it is smaller than 15 Pips, I use 15.

When you look at some days back you can see, that the fib extension at 2.382 is one of the mostly reached targets and with that calculation (range / 2.3) the EA should have placed the take profit level close to that region (some pips before it).

That is all used with the "old strategy" with 3 levels of pending orders and the 4th level is the common take profit and common stop loss.

Sometimes, if there is not so much momentum, the price will only go to the 61.8 fib extension level. If you are in profit there, I would take profit before price turns back.

What (for me) works also excellent is to place the trap during London or New York session if I can see a pinbar at M15 timeframe at top or bottom of a swing high or low. Then I use almost a fixed level of 15 pips and close all trades if I am in profit for something about 20-40 pips.

Thats the reason why I now try to trade with the trap with only 2 levels at those pinbars. (see my next posting)

All the best,
Dietmar
„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
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 »

Hy Dragos,

I have a question: how I can operate with only 2 pending order levels, take profit and stop loss should be at the next level, that is level 3.

I tried several settings but the take profit level was always -not- placed at level 3 ... no matter what settings I use.

My Inputs:

UseFixedStop = true (because I will have a common fixed stop -> at level 3)
UseDynamicStop = false
StopLevel = 3 (because there should be the common fixed stop)

UseFixedProfit = true (because I will have a common take profit -> at level 3)
Use Dynamic Profit = false
ProfitLevel = 3 (because there should be the common fixed stop)

NoOfLevels = 2 (Because there should be 2 levels for pending orders, the third level should be the common take profit and stop loss

It never works. I can manage it to place 2 levels of pending orders and I can manage it to place the common stop loss at level 3 but it is (for me) impossible to set the common take profit level also at level 3, no matter what I try.

Helpless greetings,
Dietmar :)
„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
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 »

I´ve funded a small USD Account for the EA and linked it to Myfxbook.

Only trading one pair at the same time ...

best wishes,
Dietmar

http://www.myfxbook.com/members/Radioma ... pea/263168
„Reality is merely an illusion, albeit a very persistent one.” (Albert Einstein) "Realität ist lediglich eine Illusion, allerdings eine sehr hartnäckige."
Post Reply

Return to “Automated trading systems”