James16: the EA

Locked
User avatar
fxozgirl
Trader
Posts: 1176
Joined: Wed Nov 16, 2011 9:16 am
Location: Melbourne, Australia

Re: James16: the EA

Post by fxozgirl »

SteveHopwood wrote: Shelley, that is just plain awesome.

What I coded was a misunderstanding of the idea, so the correction is in post 1. At least it should be. I have had a busy day, am tired, and made the correction under The Affluence. It might need checking in the sober light of tomorrow. :lol:

Note to fledgling coders: despite being a non-coder, Shelley was able to spot my error because of the comment that showed what I had coded. Ok, so she clearly has a brain the size of Jupiter, but the comment merely made it easier for her to spot the error. So, comment everything you do. I am not the greatest commenter in the world, but am getting better. I once read some advice from a pro programmer who said that his comments were always longer than his code. I am gradually coming to understand why.

If you look at code produced by the likes of squalou, the comments are both extensive and comprehensive. So yep; comment everything.

Nice one Shelley.

:D
LOL Steve, not sure about a brain the size of Jupiter...some days I'm pretty sure it shrinks to the size of Pluto instead :lol:

And....

the only way I would have picked up the error/misunderstanding was because of your comments...if you hadn't commented it, I would still have been sitting here with eyes glazed over completely oblivious :oops:

Anyway, thanks for the fix, hopefully we shall see when markets open on Monday that all is well :D

Thanks again :D
User avatar
fxozgirl
Trader
Posts: 1176
Joined: Wed Nov 16, 2011 9:16 am
Location: Melbourne, Australia

Re: James16: the EA

Post by fxozgirl »

blahn wrote:
fxozgirl wrote:
blahn wrote:Ya, that's what I figured. D1 is pretty smooth. On the other hand, my 16 h1 trades at $45 have increased to 18 floating trades at over $80 profit. it's been a while since i've had a demo acct show roughly 800 pips profit in 1 day. will have to wait to see how it handles the closures tho.
james floating 2.gif

Very nice...what are you using as your exit strategy?
...I'll probably just use mptm with really loose break evens and jumps depending how strong the signals are.
Yes, this is important...either trail too close and get closed out on a smallish retrace, and then have price push ahead on you or don't trail close enough and fail to lock in pips.

So far on the Daily chart, I feel setting BE at 30 pips has been ideal, I have a JS set at 20, but still deliberating whether it would get more pips at JS30...just trial and error I guess.
User avatar
fxozgirl
Trader
Posts: 1176
Joined: Wed Nov 16, 2011 9:16 am
Location: Melbourne, Australia

Re: James16: the EA

Post by fxozgirl »

fxozgirl wrote:AUDUSD TMH - Potential set up

Looks like there is a TMH setting up for audusd, current and previous candle's highs are within 2 pips of each other, so if the current candle's high remains within the 2 pips and then continues up and breaks the high, we should be looking at a buy trade...

These trades seem to be fairly rare, so we will see what happens
audusd_tmh001.gif

The EA didn't take this trade, so I set up a pending buy order at 1.05601 (which was 5 pips above the high of the first candle), Buy order was triggered and break even has been set. At close of trading it was +27 pips
audusd_tmh001a.gif
You do not have the required permissions to view the files attached to this post.
User avatar
fxozgirl
Trader
Posts: 1176
Joined: Wed Nov 16, 2011 9:16 am
Location: Melbourne, Australia

Re: James16: the EA

Post by fxozgirl »

fxozgirl wrote: I have set up a myfxbook link, however when viewing the trade history you will need to ignore the TMHL trades as they were all taken due to a bloop in the EA when that strategy was first added & I just closed the trades (Steve has since fixed this).

In addition to ignoring the TMHL commented trades for now, I have also been taking a few manual trades to help me learn and understand the strategy better, so the stats are getting a bit messy...sorry
MiTija

Re: James16: the EA

Post by MiTija »

fxozgirl wrote:
In addition to ignoring the TMHL commented trades for now, I have also been taking a few manual trades to help me learn and understand the strategy better, so the stats are getting a bit messy...sorry
No Worries!!! This is a work in progress.

Rage on, someday it will be a ripper.

Cheers,


MiTija
garyfritz

Re: James16: the EA

Post by garyfritz »

SteveHopwood wrote:Shelley, that is just plain awesome.

What I coded was a misunderstanding of the idea, so the correction is in post 1. At least it should be. I have had a busy day, am tired, and made the correction under The Affluence. It might need checking in the sober light of tomorrow. :lol:
Steve, if I understand the code right, I think you still have a problem. Note the two cases:

Code: Select all

//2nd bars high must be no higher than 2 pips above the first
if (iHigh(NULL, Dbc.TimeFrame, 2) - iHigh(NULL, Dbc.TimeFrame, 1) > (Dbc.Pips * Point) ) SendLong = false;

//2nd bars low must be no lower than 2 pips above the first
if (iLow(NULL, Dbc.TimeFrame, 2) - iLow(NULL, Dbc.TimeFrame, 1) > (Dbc.Pips * Point) ) SendShort = false;
The first one says "H[2] - H[1] must be <= 2 pips."
The second one says "L[2] - L[1] must be <= 2 pips."

The two tests are the same, but since one tests highs & one tests lows, they should be mirror images. Assuming "2nd bar" in your comment means bar #1 (the most recent bar, the second bar in the sequence), then I think the test on highs is backwards.

Also: Shelley actually said the two highs/lows have to be "within 2 pips of each other." Right, Shelley? If so, then shouldn't the test be something like
if (MathAbs(iHigh(NULL, Dbc.TimeFrame, 2) - iHigh(NULL, Dbc.TimeFrame, 1)) > (Dbc.Pips * Point) ) SendLong = false;
?
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: James16: the EA

Post by SteveHopwood »

Nice one again Gary, thanks.

It is the High code that is wrong. It should be :

Code: Select all

      //2nd bars high must be no higher than 2 pips above the first
      if (iHigh(NULL, Dbc.TimeFrame, 1) - iHigh(NULL, Dbc.TimeFrame, 2) > (Dbc.Pips * Point) ) SendLong = false;
Fix in post 1 for those of you unable to make this change yourselves.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
garyfritz

Re: James16: the EA

Post by garyfritz »

So it shouldn't be the "within 2 pips" test using MathAbs?
User avatar
fxozgirl
Trader
Posts: 1176
Joined: Wed Nov 16, 2011 9:16 am
Location: Melbourne, Australia

Re: James16: the EA

Post by fxozgirl »

garyfritz wrote: Also: Shelley actually said the two highs/lows have to be "within 2 pips of each other." Right, Shelley?
That's correct
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: James16: the EA

Post by SteveHopwood »

Nice one again Gary. Thanks. My misunderstanding. My thread starters often include statements along the lines of, "I have coded my understanding of xxxxx. I may have misunderstood." I am not joking when I write this. :lol:

Correction made to the latest update in post 1.

Cheers

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
Locked

Return to “Automated trading systems”