MPTM's new home

MPTM's new home
Locked
dudest
Trader
Posts: 1847
Joined: Tue May 08, 2012 2:37 pm

Re: MPTM's new home

Post by dudest »

lsburrows wrote:Hi:

For some reason I am not able to view the MPTM properties when I right click on the chart where it is running. I am certain this used to work. The problem exists on several brokers. I get the dialogue box when there are trades in process so it seems to be running. Smiley face is present.

Any suggestions?
lawrence_s_burrows@yahoo.com
If AlwaysOn = true, you won't be able to right-click and view properties.

Although the best way to edit properties is to:
1) Load EA on chart afresh
2) Load setfile and make changes
3) Save setfile and OK

Same info available in this thread on this page: http://www.stevehopwoodforex.com/phpBB3 ... 4&start=60

Cheers!
dudest
Trader
Posts: 1847
Joined: Tue May 08, 2012 2:37 pm

Re: MPTM's new home

Post by dudest »

Resolved:

Found out that: If HedgeAtLossPips is too close to original trade's SL, MPTM may fail to open hedge trade (due to slippage, momentum, etc)

Earlier: original trade's SL = 30pips, HedgeAtLossPips=29pips ===> issues

Currently: original trade's SL = 30pips, HedgeAtLossPips=27pips ==> hedging is working fine
[ due to slippage, momentum, etc, sometimes hedge kicks in at 29 or 30pips, which is still ok for me ]

Cheers!
dudest wrote:Hallo Steve, all,

I'm facing an issue with the Hedging functionality.

I've noticed that when CloseAtBreakEven=0, hedge trade is NOT opened (regardless of whether or not I've set HedgeTradeStopLoss and HedgeTradeTakeProfit)

When I set CloseAtBreakEven=1, hedge trade is opened OK (regardless of whether or not I've set HedgeTradeStopLoss and HedgeTradeTakeProfit)

I checked the GlobalVariables, and they were set OK

I've gone through the code (as best as I can), and I don't see anything wrong... :/

There are no errors in experts or journal tabs.

Has anyone else faced this? Is anyone running the latest MPTM with Hedging enabled and CloseAtBreakEven=0?

Holla!

Thanks

Attached: mptm setfile
dudest
Trader
Posts: 1847
Joined: Tue May 08, 2012 2:37 pm

Re: MPTM's new home

Post by dudest »

Hallo Steve, peeps,

Me again :)

MPTM is by far the best trade manager ever! I've been delving into it alot of late (hence the posts)

This time around: part-close functionality under scrutiny.

I've observed the default behaviour thus:

MPTM:
JumpingStop=1
JumpingStopPips=40
PartCloseEnabled=1
Close_LotsFract=0.25

My trade order size: 0.04 lots (example)

At MPTM init:
--> Close_Lots = 0.01
--> Preserve_Lots = 0.03 =====> this remains the same for the duration of the trade (?)

When price gets to +40pips profit ---> SL moved to BE, 0.01 closed at 40pips ==> OK
After that, trade carries on with Preserve_Lots lot size.

==

What I'd like to happen:

+40pips ---> SL at BE, 0.01 closed
+80pips ---> SL at +40pips, 0.01 closed
+120pips ---> SL at +80pips, 0.01 closed
+160pips ---> SL at +120pips, 0.01 closed

I.E: would like 0.01 to be closed at each subsequent jump, not only at first jump.

I'm still learning to code in mql, so i'm far from expert level; would the below snippet allow my desired behaviour?

## In PartCloseTradeFunction()

Code: Select all

bool result=OrderClose(OrderTicket(), Close_Lots, price, 5, CLR_NONE);
if (result)
{
  if (ShowAlerts==true) Alert("Partial close of ", OrderSymbol(), " ticket no ", OrderTicket());
  
  Preserve_Lots = Preserve_Lots - Close_Lots;  ////// ADDITION
  
  return(true);
}
NB: The jumping stop part is working flawlessly as always; no issue with that.

Cheers
dudest
Trader
Posts: 1847
Joined: Tue May 08, 2012 2:37 pm

Re: MPTM's new home

Post by dudest »

RESOLVED:

I guess a cleaner workaround (not requiring mod'ing of function code) would be to have Close_Lots and Preserve_Lots as extern (user-modifiable) values, such that:

Close_LotsFract=-1 ( -1 prevents re-calculation of Close_Lots and Preserve_Lots later in the code )
Close_Lots=0.01
Preserve_Lots=0.01

In this case, an order lotsize of, say, 0.06, would be part-closed at every jump for 5 jumps, and leaving the last 0.01 at the table.

And when Close_LotsFract is greater than 0 and less than 1, Close_Lots and Preserve_Lots will be re-calculated accordingly.

Cheers
dudest wrote:Hallo Steve, peeps,

Me again :)

MPTM is by far the best trade manager ever! I've been delving into it alot of late (hence the posts)

This time around: part-close functionality under scrutiny.

..
tommiho
Trader
Posts: 112
Joined: Wed Nov 21, 2012 12:11 pm

Re: MPTM's new home

Post by tommiho »

Hi guys,
I seem to be having a little problem with MPTM and it is as follows.
On the global prime Empty4 platform all pairs have suffix xxxxxx.G (e.g. AUDUSD.G). I have an account with another broker where there is no suffix (AUDUSD). So my trouble is MPTM is not moving SL when the BE conditions are met.Also the jumping SL is not working. This is happening on GP account where the suffix is, but not on the another one which lacks the suffix. Is the suffix presence, not presence the cause of the trouble? Does any of you who has account with GP experienced similar?
The other things not working, when the specified pairs to be traded function is selected( I have changed the names of the pairs to be same as showed on the charts to (AUDUSD.G,EURUSD.G etc.)
I am totally hooked up on MPTM and would really hate to loose the best functions there are.
I can confirm that automatic SL TP setting is working.
If anyone would know a workaround on this any help would be much appreciated.
dudest
Trader
Posts: 1847
Joined: Tue May 08, 2012 2:37 pm

Re: MPTM's new home

Post by dudest »

tommiho wrote:Hi guys,
I seem to be having a little problem with MPTM and it is as follows.
On the global prime Empty4 platform all pairs have suffix xxxxxx.G (e.g. AUDUSD.G). I have an account with another broker where there is no suffix (AUDUSD). So my trouble is MPTM is not moving SL when the BE conditions are met.Also the jumping SL is not working. This is happening on GP account where the suffix is, but not on the another one which lacks the suffix. Is the suffix presence, not presence the cause of the trouble? Does any of you who has account with GP experienced similar?
The other things not working, when the specified pairs to be traded function is selected( I have changed the names of the pairs to be same as showed on the charts to (AUDUSD.G,EURUSD.G etc.)
I am totally hooked up on MPTM and would really hate to loose the best functions there are.
I can confirm that automatic SL TP setting is working.
If anyone would know a workaround on this any help would be much appreciated.
Hallo tommiho,

Please post your MPTM setfile and I'll try to help

Cheers
tommiho
Trader
Posts: 112
Joined: Wed Nov 21, 2012 12:11 pm

Re: MPTM's new home

Post by tommiho »

dudest wrote:
tommiho wrote:Hi guys,
I seem to be having a little problem with MPTM and it is as follows.
On the global prime Empty4 platform all pairs have suffix xxxxxx.G (e.g. AUDUSD.G). I have an account with another broker where there is no suffix (AUDUSD). So my trouble is MPTM is not moving SL when the BE conditions are met.Also the jumping SL is not working. This is happening on GP account where the suffix is, but not on the another one which lacks the suffix. Is the suffix presence, not presence the cause of the trouble? Does any of you who has account with GP experienced similar?
The other things not working, when the specified pairs to be traded function is selected( I have changed the names of the pairs to be same as showed on the charts to (AUDUSD.G,EURUSD.G etc.)
I am totally hooked up on MPTM and would really hate to loose the best functions there are.
I can confirm that automatic SL TP setting is working.
If anyone would know a workaround on this any help would be much appreciated.
Hallo tommiho,

Please post your MPTM setfile and I'll try to help

Cheers
Hi please find set file attached.
Thank you
You do not have the required permissions to view the files attached to this post.
dudest
Trader
Posts: 1847
Joined: Tue May 08, 2012 2:37 pm

Re: MPTM's new home

Post by dudest »

tommiho wrote:
Hi please find set file attached.
Thank you
Thanks.

From your setfile:

1. You're managing specified pairs (to workaround the suffix issue)

Code: Select all

ManageSpecifiedPairs=1
PairsToManage=AUDCAD.G,AUDCHF.G,AUDNZD.G,AUDUSD.G,CADCHF.G,EURAUD.G,EURCAD.G,EURCHF.G,EURGBP.G,EURNZD.G,EURUSD.G,GBPAUD.G,GBPCAD.G,GBPCHF.G,GBPNZD.G,GBPUSD.G,NZDUSD.G,USDCAD.G,USDCHF.G,USDDKK.G,USDSGD.G
2. You are moving to BE at 10pips, and adding a BreakEvenProfit of 1pip

Code: Select all

BE=Break even settings
BreakEven=1
BreakEvenPips=10
BreakEvenProfit=1
HideBreakEvenStop=0
PipsAwayFromVisualBE=100
3. Once BE is achieved, you are jumping every 49pips, and adding the BEP

Code: Select all

JSL=Jumping stop loss settings
JumpingStop=1
JumpingStopPips=49
AddBEP=1
JumpAfterBreakevenOnly=1
HideJumpingStop=0
PipsAwayFromVisualJS=100
Try the setfile attached, and lemme know if it works. Instead of managing specific pairs to workaround suffix, we'll manage all trades ( HOLLA is this is NOT what you want to do )

Also, please post screenshot of chart on which MPTM is running

Cheers
You do not have the required permissions to view the files attached to this post.
tommiho
Trader
Posts: 112
Joined: Wed Nov 21, 2012 12:11 pm

Re: MPTM's new home

Post by tommiho »

dudest wrote:
tommiho wrote:
Hi please find set file attached.
Thank you
Thanks.

From your setfile:

1. You're managing specified pairs (to workaround the suffix issue)

Code: Select all

ManageSpecifiedPairs=1
PairsToManage=AUDCAD.G,AUDCHF.G,AUDNZD.G,AUDUSD.G,CADCHF.G,EURAUD.G,EURCAD.G,EURCHF.G,EURGBP.G,EURNZD.G,EURUSD.G,GBPAUD.G,GBPCAD.G,GBPCHF.G,GBPNZD.G,GBPUSD.G,NZDUSD.G,USDCAD.G,USDCHF.G,USDDKK.G,USDSGD.G
2. You are moving to BE at 10pips, and adding a BreakEvenProfit of 1pip

Code: Select all

BE=Break even settings
BreakEven=1
BreakEvenPips=10
BreakEvenProfit=1
HideBreakEvenStop=0
PipsAwayFromVisualBE=100
3. Once BE is achieved, you are jumping every 49pips, and adding the BEP

Code: Select all

JSL=Jumping stop loss settings
JumpingStop=1
JumpingStopPips=49
AddBEP=1
JumpAfterBreakevenOnly=1
HideJumpingStop=0
PipsAwayFromVisualJS=100
Try the setfile attached, and lemme know if it works. Instead of managing specific pairs to workaround suffix, we'll manage all trades ( HOLLA is this is NOT what you want to do )

Also, please post screenshot of chart on which MPTM is running

Cheers
Hi, thanks very much for answer.
Just for the recap you have changed
  • manage specified pairs false
  • manage all trades true
  • pips away from Visual BE from 0 to100
  • pips away from Visual JS from 0 to 100
Are there any differences I missed?

Ok now what seemed to work form me these days, I had a one MPTM which was managing all JPY crosses.One MPTM which managed all non JPY crosses and one MPTM only for Gold.Each one was set to different SL BE and one of them was adding automatic SL after trade execution.That`s why I was using specified pairs.

The set file you sent me is working in the terms of trailing SL move and BE setting.

My feeling is that MPTM does not like suffixes on the pair names specified when the manage specified pairs option is set to true.

Why I was specifying pairs to be traded is not to load MPTM on every chart, rather I have created filters this way.
I will have to think about how to work with it if the pairs specification will be a problem hm.

Thank you for the help an if you think of how to work around this pair specification, that would be great as it seems to me as the cleanest way to micromanage all the MPTM functions to our advantage.

Attached is the screen where is MPTM running with your set file.
And newbe question would you know how to recall the alert window when BE is triggered?
You do not have the required permissions to view the files attached to this post.
dudest
Trader
Posts: 1847
Joined: Tue May 08, 2012 2:37 pm

Re: MPTM's new home

Post by dudest »

tommiho wrote:
Hi, thanks very much for answer.
Just for the recap you have changed
  • manage specified pairs false
  • manage all trades true
  • pips away from Visual BE from 0 to100
  • pips away from Visual JS from 0 to 100
Are there any differences I missed?
None, the listed are the changes made :)

Ok now what seemed to work form me these days, I had a one MPTM which was managing all JPY crosses.One MPTM which managed all non JPY crosses and one MPTM only for Gold.Each one was set to different SL BE and one of them was adding automatic SL after trade execution.That`s why I was using specified pairs.

The set file you sent me is working in the terms of trailing SL move and BE setting.

My feeling is that MPTM does not like suffixes on the pair names specified when the manage specified pairs option is set to true.

Why I was specifying pairs to be traded is not to load MPTM on every chart, rather I have created filters this way.
I will have to think about how to work with it if the pairs specification will be a problem hm.
By the way, are you using an EA to enter trades?
Coz you could do exactly as you wish above using ManageByMagicNumber or ManageByTradeComment
ManageByTradeComment could also work for manual trading.

I honestly think MPTM shouldn't have a problem with the suffix; I'm sure there are many guys on Cowboy IBFX with AUDUSDm and MPTM is working OK. Why not in your case, still haven't figured it out.
Thank you for the help an if you think of how to work around this pair specification, that would be great as it seems to me as the cleanest way to micromanage all the MPTM functions to our advantage.

Attached is the screen where is MPTM running with your set file.
And newbe question would you know how to recall the alert window when BE is triggered?
When dragging MPTM to the chart, under Common tab,
-> Enable alerts = true (checked)
-> Disable alert once hit = true (checked)

Cheers
Locked

Return to “Utilities Indicators and Scripts”