stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Bob and Shelley Again
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=2759
Page 2 of 120
Author:  SteveHopwood [ Sun Jul 28, 2013 10:06 pm ]
Post subject:  Re: Bob and Shelley Again

fxozgirl wrote:And we're off...Perfect first trade:

Main entry audcad sell, let's see how it works out :D
audcad.gh4_firsttrade.png
I came on to post exactly that trade, so me too.

:D
Author:  trader689 [ Sun Jul 28, 2013 11:53 pm ]
Post subject:  Re: Bob and Shelley Again

well im stumped. i loaded it onto a different broker's Empty4 platform and same problem

"Cannot open file 'D:\Program Files\DF Markets Empty4 4 - 14\experts\indicators\10.4 4H RSI2 modified for automation.ex4' "

i've been using EAs for years so I don't think it's some elementary gaffe i'm making here. :?
Author:  OldTrader [ Mon Jul 29, 2013 4:07 am ]
Post subject:  Re: Bob and Shelley Again

I had a similar problem a few weeks ago, when trying to test an ea. Couldnt figure it out, but same problem, it would not compile in the certain build of Empty4 i had (which was no different than all the others). Finally how I solved it was to open a different mt4editor, one from another platform, and compile with that one, then move the ex4 over.
Don't ask me why, never figured it out and never made any sense. But that's Empty4 for ya lol
If you look, i bet the ex4 isnt in your folder, just the mq4. So it's not compiling, and you'll have to figure out how to compile it (or ask someone to compile it and send you the ex4 i guess)
Author:  SteveHopwood [ Mon Jul 29, 2013 8:45 am ]
Post subject:  Re: Bob and Shelley Again

.ex4 file attached. See if it does the trick.

:D
Author:  fxozgirl [ Mon Jul 29, 2013 9:10 am ]
Post subject:  Re: Bob and Shelley Again

Steve, just blowing in from work & gotta go again, but looks like there might be a bit of a glitch with the TP/SL calculations.

I have set 100SL, 300TP, BE 30 +2, JS 50
If you see the screenshot, it looks like the EA has set 100TP, 50SL

I will take a look the code when I'm back home in a couple of hours :D
basa_opentrades.png
Author:  fxozgirl [ Mon Jul 29, 2013 12:00 pm ]
Post subject:  Re: Bob and Shelley Again

I've just realised I uploaded an incorrect set file...for the people who have downloaded it please download again from the post above.
You will have an incorrect stochastic reading with the first version I posted...sorry :oops:
Author:  trader689 [ Mon Jul 29, 2013 12:09 pm ]
Post subject:  Re: Bob and Shelley Again

thanks steve i wil try that when i get home. oldtrader thanks for the tip but the ex4 is definitely in the folder....
Author:  SteveHopwood [ Mon Jul 29, 2013 3:04 pm ]
Post subject:  Re: Bob and Shelley Again

We might need a minimum separation between the two moving averages.
eurcad.gh4.png
:D
Author:  OldTrader [ Mon Jul 29, 2013 5:13 pm ]
Post subject:  Re: Bob and Shelley Again

I too can report that for some reason, my gbpaud trade set (and hit) a 50pip SL, although I have it set to 100. My jumping stop is 50 pips, maybe it's prematurely setting the JS ? No idea
Author:  SteveHopwood [ Mon Jul 29, 2013 8:01 pm ]
Post subject:  Re: Bob and Shelley Again

fxozgirl wrote:Steve, just blowing in from work & gotta go again, but looks like there might be a bit of a glitch with the TP/SL calculations.

I have set 100SL, 300TP, BE 30 +2, JS 50
If you see the screenshot, it looks like the EA has set 100TP, 50SL

I will take a look the code when I'm back home in a couple of hours :D
I am struggling a bit here, because this has not happened to my trades.

Looking at the code, I saw that the relevant functions such as double CalculateStopLoss(int type, double price) had the trade price passed as a parameter, but then price was reset to Ask/Bid within the functions.

Then, void CheckTpSlAreCorrect(int type) calls CalculateStopLoss(int type, double price) etc to ensure that the TP/SL are correct. As previously coded, CheckTpSlAreCorrect(int type) would call CalculateStopLoss(int type, double price) etc with the OrderOpenPrice(), which would be reset to Ask/Bid in CalculateStopLoss(int type, double price) etc.

So, my best guess is that the use of Ask/Bid in the sl/tp calculation functions is causing the problem. Not certain, mind.

Hey, don't we sound terribly clever discussing this stuff? :lol:

Mind, this is nothing compared to what is coming. Dewey McG has asked me to code a public EA that involves calculating the Bollinger Band of the Stochastic indi. I have spent the day working out how to do the calculation, and boy but I will show off when the EA comes out. :lol:

:D
All times are UTC Page 2 of 120