Shelley's multi-pair basket trader

Share your 10.x automated traders here.
Post Reply
spotdespot
Trader
Posts: 768
Joined: Sun Jan 22, 2012 11:38 pm

Re: Shelley's multi-pair basket trader

Post by spotdespot »

SteveHopwood wrote:

Waaaaaayyyyyy ahead of you.

Still awaiting the plumber, so V 1e is in post 1.

AdaptivePipsTakeProfit is multiplied by the number of open trades to arrive at a pips tp for the entire basket. Eventually, I will extend this to the cash take profit.
I knew you were intending on it working that way - what I meant was that I have limited experience (1 basket) to work out what the value of AdaptivePipsTakeProfit should be - this morning 12 trades were opened so I would start with 400/12. But I thought others with more baskets under their belt might know if 12 was high/low etc?
SteveHopwood wrote:
Thinking about it, I have a few hours yet. For those of you who know UK geography, my journey down to Somerset takes me around the Birmingham box. If I leave here at about 2/00 pm, I will hit the box just as it gridlocks for the evening rush. I may as well leave later, as I will not arrive any later.
I live South of Manchester, parents live near Abergavenny......I feel your pain. :cry:
You never know - the decent weather may have meant more people staying put at home.
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: Shelley's multi-pair basket trader

Post by SteveHopwood »

1f is in post 1.

I have extended the breakeven stuff to allow cash-based breakevens. The code is not quite robust enough to withstand you mixing both cash and pips-based breakevens, so only use either one or the other.

I have added code that should allow the breakeven to remain in place following a platform restart.

I have tested none of this code, so there may be the odd bug lurking.

No more planned for now, so download with a reasonable degree of confidence that the next update is a couple of days away.

I am having a blast. I hope Bob is watching this, Shelley. He loves it when someone finds an extra wrinkle in his systems and he will be very proud of you.

: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.
cytek
Trader
Posts: 43
Joined: Wed May 16, 2012 4:31 pm

Re: Shelley's multi-pair basket trader

Post by cytek »

fxozgirl wrote:
spotdespot wrote:Just an idea - wouldn't it be useful to use a basket PIP breakeven feature? Obviously couldn't be any hard stops. So for example basket makes 200 pips, basket SL set to +20 pips or whatever?

Apologies if this can already be done with MPTM but it doesn't look like it to me and it seems like it would be a pretty good idea for this strategy to avoid issues of setting the EA running then seeing a significant retrace?

I like the idea of this as well :D
Yep - loving this idea. Just out of interest, I set my basket to 400 pips this morning, and it got to 350 before the retrace. Now sitting close to break even after today's retrace of London open. So something like this would have banked profits after a portion of that retrace. think its a super idea. :idea:
cytek
Trader
Posts: 43
Joined: Wed May 16, 2012 4:31 pm

Re: Shelley's multi-pair basket trader

Post by cytek »

SteveHopwood wrote:1f is in post 1.

I have extended the breakeven stuff to allow cash-based breakevens. The code is not quite robust enough to withstand you mixing both cash and pips-based breakevens, so only use either one or the other.

I have added code that should allow the breakeven to remain in place following a platform restart.

I have tested none of this code, so there may be the odd bug lurking.

No more planned for now, so download with a reasonable degree of confidence that the next update is a couple of days away.

I am having a blast. I hope Bob is watching this, Shelley. He loves it when someone finds an extra wrinkle in his systems and he will be very proud of you.

:D

Woohoo! You rock :) thanks Matey
cytek
Trader
Posts: 43
Joined: Wed May 16, 2012 4:31 pm

Re: Shelley's multi-pair basket trader

Post by cytek »

verb wrote:
SWG123 wrote:This is great - thanks Steve & Shelley.

Is the global closure working? Mine's set to OOTB 400 pips - I'm currently up over 500 and still going strong, all in the last hour! :D
I've noticed that OOTB 400 pips is really 4000 pips on a 5 digit criminal. I put mine 40 pips in the EA and it's now correctly targeting 400.0 pips.

Ah! Was wondering myself as I'm also on 5 digit crim. Thanks - you saved me giving everything back to the market. Running it on demo anyways, so best to learn and make mistakes in the sand pit ;)
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: Shelley's multi-pair basket trader

Post by SteveHopwood »

Could someone explain the difference between pips and points to the newbs, please. I am off to Somerset.

Wish me luck. :lol:

: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.
spotdespot
Trader
Posts: 768
Joined: Sun Jan 22, 2012 11:38 pm

Re: Shelley's multi-pair basket trader

Post by spotdespot »

SteveHopwood wrote:Could someone explain the difference between pips and points to the newbs, please. I am off to Somerset.

Wish me luck. :lol:

:D
Good luck.

Actually I think the guys have a point ( :lol: ). Pips and points have become a little confused in the EA somewhere - I was up "400 points" according to the EA this morning (with a 4000 point target) but it was actually 400 pips.

EDIT: I have tried to see if I can spot the issue but it is too damned hot in this cr@ppy office to concentrate.
garyfritz

Re: Shelley's multi-pair basket trader

Post by garyfritz »

SteveHopwood wrote:AdaptivePipsTakeProfit is multiplied by the number of open trades to arrive at a pips tp for the entire basket. Eventually, I will extend this to the cash take profit.
Excellent! I was just going to request that. :D
Armen

Re: Shelley's multi-pair basket trader

Post by Armen »

Dear Steve,
First of all I would like to thank you for everything, indeed.

Now, I have noticed that if there are pending orders when you put the EA on it shows Pips Take Profit points equal to 250 multiplied by the number of pending orders.
I assume there should not be pending orders when starting EA.
Is that correct or there is another issue?
Thanks,

Armen
spotdespot
Trader
Posts: 768
Joined: Sun Jan 22, 2012 11:38 pm

Re: Shelley's multi-pair basket trader

Post by spotdespot »

spotdespot wrote:
SteveHopwood wrote:Could someone explain the difference between pips and points to the newbs, please. I am off to Somerset.

Wish me luck. :lol:

:D
Good luck.

Actually I think the guys have a point ( :lol: ). Pips and points have become a little confused in the EA somewhere - I was up "400 points" according to the EA this morning (with a 4000 point target) but it was actually 400 pips.

EDIT: I have tried to see if I can spot the issue but it is too damned hot in this cr@ppy office to concentrate.
OK - I think I have found the issue PLEASE NOTE - I haven't coded in years and am not that familiar with MQL (getting more familiar every day though :) ) so I STRONGLY suggest you wait until a proper coder like Steve or Philippe confirms this works!!!

Code: Select all


double BrokerPoint(string symbol)
{
    //Returns Point for the symbol. Necessary because MarketInfo(symbol,MODE_POINT) sometimes returns zero.
    //Code from scoobs Forex Robot. Cheers scoobs.
    int    digits = MarketInfo(symbol,MODE_DIGITS);
    double point  = 0.01;
    if(digits > 3)
    {
      point = 0.0001;
    }
    return(point);
}//End double BrokerPoint(string symbol)
I think should read:

Code: Select all


double BrokerPoint(string symbol)
{
    //Returns Point for the symbol. Necessary because MarketInfo(symbol,MODE_POINT) sometimes returns zero.
    //Code from scoobs Forex Robot. Cheers scoobs.
    int    digits = MarketInfo(symbol,MODE_DIGITS);
    double point  = 0.001;
    if(digits > 3)
    {
      point = 0.00001;
    }
    return(point);
}//End double BrokerPoint(string symbol)
Note the extra zero in both point assignments. I BELIEVE this then displays the point profit value correctly in the Open Profit display line and will close the basket when it reaches the right target (if target set as one of the "pips" not cash options of course).

I have tested this and it worked fine but please wait for confirmation.
Post Reply

Return to “10.x EA forum”