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

Shelley's multi-pair basket trader
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=583
Page 7 of 87
Author:  spotdespot [ Thu May 24, 2012 12:36 pm ]
Post subject:  Re: Shelley's multi-pair basket trader

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.
Author:  SteveHopwood [ Thu May 24, 2012 1:24 pm ]
Post subject:  Re: Shelley's multi-pair basket trader

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
Author:  cytek [ Thu May 24, 2012 3:11 pm ]
Post subject:  Re: Shelley's multi-pair basket trader

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:
Author:  cytek [ Thu May 24, 2012 3:12 pm ]
Post subject:  Re: Shelley's multi-pair basket trader

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
Author:  cytek [ Thu May 24, 2012 3:16 pm ]
Post subject:  Re: Shelley's multi-pair basket trader

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 ;)
Author:  SteveHopwood [ Thu May 24, 2012 3:31 pm ]
Post subject:  Re: Shelley's multi-pair basket trader

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

Wish me luck. :lol:

:D
Author:  spotdespot [ Thu May 24, 2012 3:36 pm ]
Post subject:  Re: Shelley's multi-pair basket trader

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.
Author:  garyfritz [ Thu May 24, 2012 3:55 pm ]
Post subject:  Re: Shelley's multi-pair basket trader

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
Author:  Armen [ Thu May 24, 2012 4:00 pm ]
Post subject:  Re: Shelley's multi-pair basket trader

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
Author:  spotdespot [ Thu May 24, 2012 4:39 pm ]
Post subject:  Re: Shelley's multi-pair basket trader

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.
All times are UTC Page 7 of 87