MPTM updated

MPTM's new home
Post Reply
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

MPTM updated

Post by SteveHopwood »

V 1g is in post 1. I discovered a bloop in the equity global profit target function. Fixed in 1g.

:xm: :rocket:
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. [email protected] 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.
User avatar
peje
Posts: 2
Joined: Wed Nov 16, 2011 6:09 am
Location: Czech Republic

MPTM updated

Post by peje »

Hello, I would like to ask if anyone has a similar experience when using a hedge superslope. MPTM opens and closes a hedge immediately. I understand that this can happen when a wrong time frame chosen , but it happens on any timeframe to me as well as when I change MA Slope Period.
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

MPTM updated

Post by SteveHopwood »

peje » Fri Apr 29, 2022 6:56 pm wrote:Hello, I would like to ask if anyone has a similar experience when using a hedge superslope. MPTM opens and closes a hedge immediately. I understand that this can happen when a wrong time frame chosen , but it happens on any timeframe to me as well as when I change MA Slope Period.
Here is the thingy. According to your settings, if one part of the code opens a trade whilst another part of the code closes it, then this is what happens. Literal thingies, my bots. You have to work out the settings for yourself.

:xm: :rocket:
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. [email protected] 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.
danjuma
Trader
Posts: 68
Joined: Mon Jun 10, 2013 4:14 pm

MPTM updated

Post by danjuma »

Hello Steve. If it's not too much trouble and you have got the time, would it be possible to add a trailing stop based on a bar closing below (for a long trade) or above (for a short trade) a user specified moving average? For example, I have a long trade, and want a trailing stop to kick in (after the trade has been part closed at BE) and trail say the 10 EMA, so if the say H1 bar closes below the 10 EMA, the remaining trade is closed. Thank you
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

MPTM updated

Post by SteveHopwood »

danjuma » Sun Jun 05, 2022 7:02 pm wrote:Hello Steve. If it's not too much trouble and you have got the time, would it be possible to add a trailing stop based on a bar closing below (for a long trade) or above (for a short trade) a user specified moving average? For example, I have a long trade, and want a trailing stop to kick in (after the trade has been part closed at BE) and trail say the 10 EMA, so if the say H1 bar closes below the 10 EMA, the remaining trade is closed. Thank you
Prove this is of some value to the rest of us and I might be interested. For now, no.

:xm: :rocket:
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. [email protected] 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.
danjuma
Trader
Posts: 68
Joined: Mon Jun 10, 2013 4:14 pm

MPTM updated

Post by danjuma »

SteveHopwood » Sun Jun 05, 2022 9:42 pm wrote:
danjuma » Sun Jun 05, 2022 7:02 pm wrote:Hello Steve. If it's not too much trouble and you have got the time, would it be possible to add a trailing stop based on a bar closing below (for a long trade) or above (for a short trade) a user specified moving average? For example, I have a long trade, and want a trailing stop to kick in (after the trade has been part closed at BE) and trail say the 10 EMA, so if the say H1 bar closes below the 10 EMA, the remaining trade is closed. Thank you
Prove this is of some value to the rest of us and I might be interested. For now, no.

:xm: :rocket:
Hi Steve, I can't prove its value. It's just another form of trailing stop. It's like saying I should prove the value of trailing stop based on ATR or multiples of ATR, fixed pips, bollinger bands etc. It all depends on one's methods, strategy, risk tolerance etc. None of these things work 100%, it's all probabilities and a numbers game. So, I am sorry you are asking me to find you a unicorn. Anyways, thanks for at least thinking about it. God bless.
Godwin
Posts: 8
Joined: Fri Dec 30, 2011 4:34 am

MPTM updated

Post by Godwin »

Good day Steve. How do I input 11.2 pips or 112 points SL, TP or BE on the MPTM EA?
I am only able to input 11 pips.

Is there a way to add decimal numbers to the pips?
This decimal pips will take care of spread

Thank you
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

MPTM updated

Post by SteveHopwood »

Godwin » Wed Aug 03, 2022 12:48 pm wrote:Good day Steve. How do I input 11.2 pips or 112 points SL, TP or BE on the MPTM EA?
I am only able to input 11 pips.

Is there a way to add decimal numbers to the pips?
This decimal pips will take care of spread

Thank you
There isn't, but there is a work around. I always declare variables concerning pips as integers, then declare a doubles variable that takes a copy of the integer for use throughout the program. I do this to avoid any confusion between pips and points.

The workaround is to convert the integers into doubles. For example:
extern int MissingTakeProfitPips = 200;//Take profit size in pips.
becomes:
extern double MissingTakeProfitPips = 200;//Take profit size in pips.

Do a non-specific search for "takeprofit" and "stoploss" to find the declarations to convert, then recompile the code.



:xm: :rocket:
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. [email protected] 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.
Godwin
Posts: 8
Joined: Fri Dec 30, 2011 4:34 am

MPTM updated

Post by Godwin »

SteveHopwood » Wed Aug 03, 2022 3:40 pm wrote: There isn't, but there is a work around. I always declare variables concerning pips as integers, then declare a doubles variable that takes a copy of the integer for use throughout the program. I do this to avoid any confusion between pips and points.

The workaround is to convert the integers into doubles. For example:
extern int MissingTakeProfitPips = 200;//Take profit size in pips.
becomes:
extern double MissingTakeProfitPips = 200;//Take profit size in pips.

Do a non-specific search for "takeprofit" and "stoploss" to find the declarations to convert, then recompile the code.

:xm: :rocket:
Thank you Steve.

I did convert the "Break Even" and "take profit" from int to double.
The are the following lines in the code
line 134,
line 135
line 204
line 214
I got 4 warnings on recompiling the code

On using the EA , I got the following screen alerts
Attached is the Modified MPTM

What do I do to correct the error.
Thank you
You do not have the required permissions to view the files attached to this post.
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

MPTM updated

Post by SteveHopwood »

Godwin » Fri Aug 05, 2022 11:47 am wrote: Thank you Steve.

I did convert the "Break Even" and "take profit" from int to double.
The are the following lines in the code
line 134,
line 135
line 204
line 214
I got 4 warnings on recompiling the code

On using the EA , I got the following screen alerts
Attached is the Modified MPTM

What do I do to correct the error.
Thank you
Don't worry about the warnings - that is all they are. If they bother you then go to the top of the file and find this line of code: #property strict

Comment it out like this:
//#property strict

The code will turn grey; this is how commented out code looks.

As to the runtime alerts, you have turned of AutoTrading. You will see the button in the top button bar has a red cross. Clidk on it to reenable EA's.

:xm: :rocket:
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. [email protected] 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.
Post Reply

Return to “Utilities Indicators and Scripts”