Joe. Swing-trade your way to a baby equity millipede
-
andydoc
- Trader
- Posts: 53
- Joined: Sun Dec 11, 2011 8:26 am
- Location: West Brom, UK
Re: Joe. Swing-trade your way to a baby equity millipede
well done - beat me by a couple of minutes - and yours was more elegant!
However, now not closing the 50% on trend weakening?
However, now not closing the 50% on trend weakening?
- gaheitman
- Trader
- Posts: 655
- Joined: Tue Nov 15, 2011 10:55 pm
- Location: Richmond, VA, US
Re: Joe. Swing-trade your way to a baby equity millipede
Well, it does call it some...andydoc wrote:well done - beat me by a couple of minutes - and yours was more elegant!
However, now not closing the 50% on trend weakening?
In StrategyLookForTradeClosure(), it is looking at the close of the FbCandleShift + 1 bar:
Code: Select all
if (BuyOpen)
if (Close[FbCandleShift + 1] < Low[PreviousUpBar(FbCandleShift + 1)]) CloseHalf=true;
if (SellOpen)
if (Close[FbCandleShift + 1] > High[PreviousDnBar(FbCandleShift + 1)]) CloseHalf=true;
George
-
andydoc
- Trader
- Posts: 53
- Joined: Sun Dec 11, 2011 8:26 am
- Location: West Brom, UK
Re: Joe. Swing-trade your way to a baby equity millipede
Cool that works - still have some problems with modify to BE and trading beforehand though:
then it modifies only one with each new bar:then it stops modding altogether
but keeps stacking
Code: Select all
10:12:47 2011.03.21 00:00 smFlyingBuddha Signals_v2 GBPUSD,H4: loaded successfully
10:12:47 2011.03.21 00:00 smFlyingBuddha Signals_v2 GBPUSD,Daily: loaded successfully
10:12:48 2011.03.22 00:00 Joe GBPUSD,H4: open #1 sell 0.01 GBPUSD at 1.63048 sl: 1.63206 ok
10:12:48 2011.03.22 01:11 Joe GBPUSD,H4: close #1 sell 0.01 GBPUSD at 1.63048 sl: 1.63206 at price 1.63120
10:12:48 2011.03.22 04:00 Joe GBPUSD,H4: open #2 sell 0.01 GBPUSD at 1.63082 sl: 1.63195 ok
10:12:48 2011.03.22 04:06 Joe GBPUSD,H4: close #2 sell 0.01 GBPUSD at 1.63082 sl: 1.63195 at price 1.63109
10:12:53 2011.03.22 16:00 Joe GBPUSD,H4: open #3 sell 0.01 GBPUSD at 1.63700 sl: 1.64051 ok
10:12:55 2011.03.22 20:01 Joe GBPUSD,H4: open #4 sell 0.01 GBPUSD at 1.63792 sl: 1.63983 ok
10:12:56 2011.03.23 00:00 Joe GBPUSD,H4: open #5 sell 0.01 GBPUSD at 1.63709 sl: 1.63916 okCode: Select all
10:12:57 2011.03.23 04:00 Joe GBPUSD,H4: modify #5 sell 0.01 GBPUSD at 1.63709 sl: 1.63700 tp: 0.00000 ok
10:12:58 2011.03.23 04:59 Tester: stop loss #5 at 1.63700 (1.63687 / 1.63701)
10:12:58 2011.03.23 05:00 Joe GBPUSD,H4: object name passed to ObjectType function cannot be an uninitialized or empty string
10:13:00 2011.03.23 07:24 Joe GBPUSD,H4: open #6 sell 0.01 GBPUSD at 1.63567 sl: 1.63765 ok
10:13:00 2011.03.23 07:41 Joe GBPUSD,H4: close #6 sell 0.01 GBPUSD at 1.63567 sl: 1.63765 at price 1.63679
10:13:00 2011.03.23 08:00 Joe GBPUSD,H4: modify #4 sell 0.01 GBPUSD at 1.63792 sl: 1.63700 tp: 0.00000 ok
10:13:00 2011.03.23 08:00 Joe GBPUSD,H4: open #7 sell 0.01 GBPUSD at 1.63643 sl: 1.63869 ok
10:13:00 2011.03.23 08:00 Tester: stop loss #4 at 1.63700 (1.63686 / 1.63700)
10:13:00 2011.03.23 08:13 Joe GBPUSD,H4: close #7 sell 0.01 GBPUSD at 1.63643 sl: 1.63869 at price 1.63783
10:13:00 2011.03.23 08:15 Joe GBPUSD,H4: object name passed to ObjectType function cannot be an uninitialized or empty string
10:13:00 2011.03.23 12:00 Joe GBPUSD,H4: modify #3 sell 0.01 GBPUSD at 1.63700 sl: 1.63700 tp: 0.00000 okCode: Select all
10:13:00 2011.03.23 12:00 Joe GBPUSD,H4: open #8 sell 0.01 GBPUSD at 1.62904 sl: 1.63869 ok
10:13:01 2011.03.23 16:16 Joe GBPUSD,H4: open #9 sell 0.01 GBPUSD at 1.62564 sl: 1.62994 ok
10:13:03 2011.03.23 20:00 Joe GBPUSD,H4: open #10 sell 0.01 GBPUSD at 1.62440 sl: 1.62744 ok
10:13:05 2011.03.24 02:06 Joe GBPUSD,H4: close #10 sell 0.01 GBPUSD at 1.62440 sl: 1.62744 at price 1.62658
10:13:05 2011.03.24 04:00 Joe GBPUSD,H4: open #11 sell 0.01 GBPUSD at 1.62454 sl: 1.62711 ok
10:13:07 2011.03.24 08:00 Joe GBPUSD,H4: open #12 sell 0.01 GBPUSD at 1.62273 sl: 1.62504 ok
10:13:09 2011.03.24 12:00 Joe GBPUSD,H4: open #13 sell 0.01 GBPUSD at 1.61897 sl: 1.62363 ok
10:13:12 2011.03.24 16:50 Joe GBPUSD,H4: open #14 sell 0.01 GBPUSD at 1.61742 sl: 1.62163 ok
10:13:17 2011.03.24 20:00 Joe GBPUSD,H4: open #15 sell 0.01 GBPUSD at 1.61065 sl: 1.62209 ok
10:13:19 2011.03.25 00:18 Joe GBPUSD,H4: open #16 sell 0.01 GBPUSD at 1.61128 sl: 1.61308 ok
10:13:21 2011.03.25 04:00 Joe GBPUSD,H4: open #17 sell 0.01 GBPUSD at 1.61039 sl: 1.61304 ok
10:13:23 2011.03.25 06:27 Joe GBPUSD,H4: close #17 sell 0.01 GBPUSD at 1.61039 sl: 1.61304 at price 1.61219
10:13:23 2011.03.25 06:28 Joe GBPUSD,H4: close #16 sell 0.01 GBPUSD at 1.61128 sl: 1.61308 at price 1.61222
10:13:25 2011.03.25 08:12 Joe GBPUSD,H4: open #18 sell 0.01 GBPUSD at 1.61153 sl: 1.61347 ok
10:13:25 2011.03.25 08:41 Joe GBPUSD,H4: close #18 sell 0.01 GBPUSD at 1.61153 sl: 1.61347 at price 1.61263
10:13:26 2011.03.25 12:02 Joe GBPUSD,H4: open #19 sell 0.01 GBPUSD at 1.61001 sl: 1.61459 ok
10:13:30 2011.03.25 16:01 Joe GBPUSD,H4: open #20 sell 0.01 GBPUSD at 1.60792 sl: 1.61119 ok
10:13:33 2011.03.25 20:00 Joe GBPUSD,H4: open #21 sell 0.01 GBPUSD at 1.60136 sl: 1.60928 ok
10:13:38 2011.03.28 16:00 Joe GBPUSD,H4: close #21 sell 0.01 GBPUSD at 1.60136 sl: 1.60928 at price 1.60241
10:13:38 2011.03.28 16:00 Joe GBPUSD,H4: close #20 sell 0.01 GBPUSD at 1.60792 sl: 1.61119 at price 1.60241
10:13:38 2011.03.28 16:00 Joe GBPUSD,H4: close #19 sell 0.01 GBPUSD at 1.61001 sl: 1.61459 at price 1.60241
10:13:38 2011.03.28 16:00 Joe GBPUSD,H4: close #15 sell 0.01 GBPUSD at 1.61065 sl: 1.62209 at price 1.60241- gaheitman
- Trader
- Posts: 655
- Joined: Tue Nov 15, 2011 10:55 pm
- Location: Richmond, VA, US
Re: Joe. Swing-trade your way to a baby equity millipede
CountOpenTrades() goes backwards through the list of open trades, so the test to see if the last trade in the stack was at break even was actually testing the first trade. Testing fix now....
George
George
- 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: Joe. Swing-trade your way to a baby equity millipede
George's latest is in post 1 now.
Thanks George. I was really frustrated and fed up last night, so I am ever so grateful.

Thanks George. I was really frustrated and fed up last night, so I am ever so grateful.
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.
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.
-
andydoc
- Trader
- Posts: 53
- Joined: Sun Dec 11, 2011 8:26 am
- Location: West Brom, UK
Re: Joe. Swing-trade your way to a baby equity millipede
Hi George - you must be beat at your time! Happy to take over when you are too tired as I am now in bed with flu!
-
andydoc
- Trader
- Posts: 53
- Joined: Sun Dec 11, 2011 8:26 am
- Location: West Brom, UK
Re: Joe. Swing-trade your way to a baby equity millipede
Hi Steve - sorry I got you wound up last night! George is making great progress
- gaheitman
- Trader
- Posts: 655
- Joined: Tue Nov 15, 2011 10:55 pm
- Location: Richmond, VA, US
Re: Joe. Swing-trade your way to a baby equity millipede
Sorry you aren't feeling well. No worries on the tiredness, I trade the European session every day and have adjusted my sleep accordingly.andydoc wrote:Hi George - you must be beat at your time! Happy to take over when you are too tired as I am now in bed with flu!
OK, new update includes a couple of fixes. I now save off the ticket number and reselect it after the call to CountOpenTrades so that the test in the LookForTradingOpportunities() is checking the correct one. I also changed that same test to exit LFTO() if the previous order is not in profit yet. Before it was just not trying to move it to BE, but still went on with the new trade....
The code is still peppered with Alert calls (Print calls don't appear in ST near as I can tell) so we'll need to clean it up at some point.
George
You do not have the required permissions to view the files attached to this post.
- 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: Joe. Swing-trade your way to a baby equity millipede
No, it wasn't you, it was the code. All you were doing was reporting bugs. I hope you get over yours quickly.andydoc wrote:Hi Steve - sorry I got you wound up last night! George is making great progress
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.
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.
- gaheitman
- Trader
- Posts: 655
- Joined: Tue Nov 15, 2011 10:55 pm
- Location: Richmond, VA, US
Re: Joe. Swing-trade your way to a baby equity millipede
Don't worry about it, we've all been there. Heck, I may be there next.SteveHopwood wrote:George's latest is in post 1 now.
Thanks George. I was really frustrated and fed up last night, so I am ever so grateful.
On a side note, we used to joke about how programmers (myself included) were horrible at giving estimates on when something would be done (I think that is because we are optimists and think "this has to be the last bug...."). To be safe, you double the estimate....and raise it to the next time period. So if a programmer thinks it will take 2 hours, you plan for 4 days.